summaryrefslogtreecommitdiff
path: root/djgpp
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-09-10 17:49:35 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-09-10 17:49:35 +0000
commit933fea7ffa6c794a1a2b8e713eb2b30851598bc8 (patch)
treef90e88b4e5daecb28dda82759223d272f14525dc /djgpp
parent54a137f5a208ce9a432cfbce29ffe72d9e61bfe9 (diff)
downloadperl-933fea7ffa6c794a1a2b8e713eb2b30851598bc8.tar.gz
dos-djgpp update (from Laszlo Molnar <laszlo.molnar@eth.ericsson.se>)
p4raw-id: //depot/perl@4121
Diffstat (limited to 'djgpp')
-rw-r--r--djgpp/config.over5
-rw-r--r--djgpp/configure.bat1
-rw-r--r--djgpp/djgpp.c13
-rw-r--r--djgpp/djgppsed.sh7
4 files changed, 18 insertions, 8 deletions
diff --git a/djgpp/config.over b/djgpp/config.over
index 4895cf1a43..c624386678 100644
--- a/djgpp/config.over
+++ b/djgpp/config.over
@@ -25,7 +25,10 @@ repair()
-e 's/posix/POSIX/'\
-e 's/sdbm_fil/SDBM_File/'\
-e 's/socket/Socket/'\
- -e 's/thread/Thread/'
+ -e 's/thread/Thread/'\
+ -e 's/byteload/ByteLoader/'\
+ -e 's=devel/peek=Devel/Peek='\
+ -e 's=devel/dprof=Devel/DProf='
}
static_ext=$(repair "$static_ext")
extensions=$(repair "$extensions")
diff --git a/djgpp/configure.bat b/djgpp/configure.bat
index e7d41d7130..6073f442e0 100644
--- a/djgpp/configure.bat
+++ b/djgpp/configure.bat
@@ -29,6 +29,7 @@ goto end
sh -c 'if test ! -d /tmp; then mkdir /tmp; fi'
cp djgpp.c config.over ..
cd ..
+mv ext/B/defsu* ext/B/defsubsh.PL
echo Running sed...
sh djgpp/djgppsed.sh
diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c
index 5c1d3c4de4..5a8fc5fa5c 100644
--- a/djgpp/djgpp.c
+++ b/djgpp/djgpp.c
@@ -123,7 +123,7 @@ convretcode (pTHX_ int rc,char *prog,int fl)
Perl_warner(aTHX_ WARN_EXEC,"Can't %s \"%s\": %s",
fl ? "exec" : "spawn",prog,Strerror (errno));
if (rc > 0)
- return rc <<= 8;
+ return rc << 8;
if (rc < 0)
return 255 << 8;
return 0;
@@ -252,6 +252,7 @@ struct globinfo
int fd;
char *matches;
size_t size;
+ fpos_t pos;
};
#define MAXOPENGLOBS 10
@@ -286,6 +287,7 @@ glob_handler (__FSEXT_Fnumber n,int *rv,va_list args)
if ((gi=searchfd (-1)) == NULL)
break;
+ gi->pos=0;
pattern=alloca (strlen (name+=13)+1);
strcpy (pattern,name);
if (!_USE_LFN)
@@ -332,11 +334,10 @@ glob_handler (__FSEXT_Fnumber n,int *rv,va_list args)
if ((gi=searchfd (fd))==NULL)
break;
- ic=tell (fd);
- if (siz+ic>=gi->size)
- siz=gi->size-ic;
- memcpy (buf,ic+gi->matches,siz);
- lseek (fd,siz,1);
+ if (siz+gi->pos > gi->size)
+ siz = gi->size - gi->pos;
+ memcpy (buf,gi->pos+gi->matches,siz);
+ gi->pos += siz;
*rv=siz;
return 1;
}
diff --git a/djgpp/djgppsed.sh b/djgpp/djgppsed.sh
index 5276f4f67f..a25e894157 100644
--- a/djgpp/djgppsed.sh
+++ b/djgpp/djgppsed.sh
@@ -17,13 +17,15 @@ SCOR='s=c\\\.c|=c\_c|=g'
SHSED='s=\.\(hsed\)=_\1=g'
SDEPTMP='s=\.\(deptmp\)=_\1=g'
SCPP='s=\.\(cpp\.\)=_\1=g'
-SARGV='s=\.\(argv\.\)=_\1=g'
+SARGV='s=\.\(argv\)\.=_\1_=g'
SABC='s=\.\([abc][^a]\)=_\1=g'
SDBMX='s=\.\(dbmx\)=_\1=g'
SDBHASH='s=dbhash\.tmp=dbhash_tmp=g'
SSTAT='s=\.\(stat\.\)=_\1=g'
STMP2='s=tmp2=tm2=g'
SPACKLIST='s=\.\(packlist\)=_\1=g'
+SDEFSUB='s=defsubs\.h=defsubsh=g'
+SPLPLI='s=PL/;=PL/i;=g'
sed -e $SCONFIG -e $SGREPTMP -e $SECHOTMP -e $SDDC -e $SOUT -e 's=\.\( \./\$file\)$=sh\1=g' Configure |tr -d '\r' >s; mv -f s Configure
sed -e $SEXISTS -e $SLIST -e $SCONFIG Makefile.SH |tr -d '\r' >s; mv -f s Makefile.SH
@@ -47,3 +49,6 @@ sed -e $SPACKLIST lib/ExtUtils/Installed.pm >s; mv -f s lib/ExtUtils/Installed.p
sed -e $SPACKLIST lib/ExtUtils/Packlist.pm >s; mv -f s lib/ExtUtils/Packlist.pm
sed -e $SPACKLIST lib/ExtUtils/inst >s; mv -f s lib/ExtUtils/inst
sed -e $SABC t/io/iprefix.t >s; mv -f s t/io/iprefix.t
+sed -e $SDEFSUB ext/B/Makefile.PL >s; mv -f s ext/B/Makefile.PL
+sed -e $SDEFSUB ext/B/B.xs >s; mv -f s ext/B/B.xs
+sed -e $SDEFSUB -e $SPLPLI ext/B/defsubsh.PL >s; mv -f s ext/B/defsubsh.PL