summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-02 03:33:02 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-02 03:33:02 +0000
commiteacfb5f1b1b6501c3ffe81cb467299aad7f0eae6 (patch)
tree07deed80a609f0db2f88f20032868128a87e7175 /os2
parent909b3858a4779b142bf2bf51d648f8d2724db345 (diff)
downloadperl-eacfb5f1b1b6501c3ffe81cb467299aad7f0eae6.tar.gz
Updated.
Diffstat (limited to 'os2')
-rw-r--r--os2/README88
-rw-r--r--os2/diff.configure227
-rw-r--r--os2/diff.installperl82
-rw-r--r--os2/diff.mkdep57
-rw-r--r--os2/diff.x2pMakefile144
-rw-r--r--os2/os2.c3
-rw-r--r--os2/os2ish.h5
7 files changed, 249 insertions, 357 deletions
diff --git a/os2/README b/os2/README
index 20614dd31a..5df90ce03d 100644
--- a/os2/README
+++ b/os2/README
@@ -1,13 +1,4 @@
-# This message contains the description of the patch.
-# The actual patch will be posted to p5-p later, the parts that
-# are relevant to other lists will be posted there separately
-#
-# This is needed _before_ application of the patch:
-
-mkdir os2
-touch os2/Makefile.SH hints/os2.sh os2/os2.c os2/os2ish.h
-touch ext/DynaLoader/dl_os2.xs
-exit 0
+Current state of the patches here is with respect to perl5.002b1d ;-).
========================================================
@@ -24,16 +15,14 @@ metaconfig package that generates Configure.
Notes on the patch:
~~~~~~~~~~~~~~~~~~~
-1) run the above commands
-2) patches should be applied as
+patches should be applied as
patch -p0 <.....
+All the diff.* files and POSIX.mkfifo should be applied.
-Patches are relative to perl5.001n.
-It is tested under Solaris and OS/2.
-The complete distribution of this patch is available on
+Additional files are available on
ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
-The file diff.for.o.Configure should be applied last. It will repatch
-Configure.
+including patched pdksh and gnumake, needed for build.
+
Target:
~~~~~~~
@@ -42,8 +31,8 @@ This is not supposed to make a perfect Perl on OS/2. This patch is
concerned only with perfect _build_ of Perl on OS/2. A lot of good
features from Andreas Kaiser port missed this patch.
-Annotations of changes:
-~~~~~~~~~~~~~~~~~~~~~~~
+Annotations of changes: (part of what is below is already included by Andy,
+~~~~~~~~~~~~~~~~~~~~~~~ thus there are skips below)
1) C files
2) Configure
3) MakeMaker
@@ -59,10 +48,6 @@ Annotations of changes:
f) some diagnostics added to tests
2) Configure
- 0) Differences are provided with plain 5.001m + andys.
- a) New vars exe_ext obj_ext lib_ext ar plibext
- firstmakefile archobjs cldlibs path_sep
- I think they should be set by the hints files only
b) Support for extraction from NE style libraries.
c) a lot of
cc -o whatever
@@ -71,10 +56,6 @@ Annotations of changes:
3) Build tools and libraries
- Since Configure can go out of sync with the other tools,
- all the added configuration variables are checked for
- existence, if not, set to reasonable values. Thus the
- changes are independent of Configure patch.
a) ln changed to $ln in some places
b) Makefiles and related scripts made to use $(O), $(A), $(AR)
@@ -84,21 +65,14 @@ Annotations of changes:
d) $plibext is the extension for the perl library
e) $archobjs is the list of additional object files needed for
local build.
- $cldlibs are libs to use when linking miniperl.
- f) Sanity checks look for perl$Config{exe_ext}.
- g) installperl was looping through config.sh in a wrong way
- h) installperl needs to change permission to 0777 before
- unlink on OS/2.
- i) Cwd.pm updated for OS/2.
- j) Find.pm updated for OS/2.
- k) Shell.pm updated for OS/2.
l) Makefile.SH : added sh in front of some commands
if $d_shrplib is 'custom', looks into
$osname/Makefile.$osname.SH to construct the section
- on shared Perl library.
+ on shared Perl library.
+ !!!!!! Also: installperl installman makedepend
+ !!!!!! added as dependencies to the corresponding
+ !!!!!! targets.
m) clean target extended to delete some intermediate files
- n) Test::Harness works.
-
Notes on build on OS/2:
~~~~~~~~~~~~~~~~~~~~~~~
@@ -106,8 +80,10 @@ The change of C code in this patch is based on the ak port of 5.001+.
a) Make sure your sort is not the broken OS/2 one.
-b) when extraction perl5.001m.tar.gz you need to extract perl5.001m/Configure
+b) when extraction perl5.*.tar.gz you need to extract perl5.*/Configure
separately, since by default perl5.001m/configure overwrites it;
+ like this:
+ tar vzxf perl5.004.tar.gz perl5.004/Configure
c) Necessary manual intervention when compiling on OS/2:
@@ -119,24 +95,29 @@ d) Compile summary:
# I have rather spartan configuration.
# Prefix means where to install:
-sh Configure -des -D prefix=f:/perl5m
+sh Configure -des -D prefix=f:/perl5.005
make
# Will probably die after build of miniperl (unless you have DLL
# from previous compile). Need to move DLL where it belongs
make
# some warnings in POSIX.c
make test
- # some tests fail, 10 on my system
+ # some tests fail, 9 on my system
#
# before this you should create subdirs bin and lib in the
- # prefix directory (f:/perl5m above):
+ # prefix directory (f:/perl5.005 above):
make install
# man pages are not installed
e) At the end of August GNU make and pdksh were too buggy for compile.
Both maintainers have patches that make it possible to compile perl.
-They are included into distribution of this patch on
+The binaries are included in
ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
+patches are available too.
+Note that the beta of pdksh5.2.4 can run Configure, but not build, since
+ sh file
+may actually call file.SH ! The maintainer is notified, I hope this will be
+fixed before actual release.
!!!!!!!!!!!!!!!!!
If you see that some '/' became '\' in pdksh 5.2.3, you did not apply
@@ -153,3 +134,24 @@ c) Get rid of invalid perl.dll on your LIBPATH.
Send comments to ilya@math.ohio-state.edu.
+
+======================================================
+Requires 0.9b (well, provision are made to make it build under 0.9a6,
+but they are not tested, please inform me on success).
+(earlier than 0.9b ttyname was not present, it is hard to maintain this
+difference automatically, though I try).
+======================================================
+
+You may try building with a.out style by using `-D emxaout' on the Configure
+line (dynamic extensions should not use CRT (and/or any perl API) in this
+case, which prohibits most buildin extensions). Probably no extension is
+possible, since boot code should return the amount on stack.
+
+The reason why compiling with a.out style executables leads to problems
+with dynamic extensions is:
+ a) OS/2 does not export symbols from executables;
+ b) Thus if extension needs to import symbols from an application
+ the symbols for the application should reside in a .dll.
+ c) You cannot export data from a .dll compiled with a.out style.
+On the other hand, aout-style compiled extension enjoys all the
+(dis)advantages of fork().
diff --git a/os2/diff.configure b/os2/diff.configure
index 09e2447aba..53aa16b4a2 100644
--- a/os2/diff.configure
+++ b/os2/diff.configure
@@ -1,25 +1,24 @@
-*** Configure.orig Thu Oct 19 07:48:18 1995
---- Configure Wed Nov 01 20:14:32 1995
+*** Configure.orig Thu Dec 07 14:38:08 1995
+--- Configure Mon Dec 18 19:16:22 1995
***************
-*** 561,566 ****
---- 561,575 ----
- defvoidused=''
- voidflags=''
- CONFIG=''
-+ archobjs=''
-+ firstmakefile='makefile'
-+ obj_ext='.o'
-+ obj_ext_regexp='\.o'
-+ lib_ext='.a'
-+ exe_ext=
-+ ar='ar'
-+ plibext=
-+ path_sep=$p_
-
- define='define'
- undef='undef'
+*** 1377,1383 ****
+ *)
+ echo "I don't know where '$file' is, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+! exit 1
+ ;;
+ esac
+ done
+--- 1377,1383 ----
+ *)
+ echo "I don't know where '$file' is, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+! #exit 1
+ ;;
+ esac
+ done
***************
-*** 1363,1369 ****
+*** 1386,1392 ****
say=offhand
for file in $trylist; do
xxx=`./loc $file $file $pth`
@@ -27,7 +26,7 @@
eval _$file=$xxx
case "$xxx" in
/*)
---- 1370,1378 ----
+--- 1386,1394 ----
say=offhand
for file in $trylist; do
xxx=`./loc $file $file $pth`
@@ -38,7 +37,7 @@
case "$xxx" in
/*)
***************
-*** 2156,2162 ****
+*** 3173,3179 ****
exit(0);
}
EOM
@@ -46,7 +45,7 @@
gccversion=`./gccvers`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
---- 2165,2171 ----
+--- 3175,3181 ----
exit(0);
}
EOM
@@ -55,8 +54,8 @@
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
***************
-*** 3851,3856 ****
---- 3860,3871 ----
+*** 3765,3770 ****
+--- 3767,3778 ----
*"-l$thislib "*);;
*) dflt="$dflt -l$thislib";;
esac
@@ -70,7 +69,24 @@
echo "No -l$thislib."
fi
***************
-*** 3964,3975 ****
+*** 3864,3870 ****
+ esac
+ ;;
+ esac
+! libnames='';
+ case "$libs" in
+ '') ;;
+ *) for thislib in $libs; do
+--- 3872,3878 ----
+ esac
+ ;;
+ esac
+! #libnames='';
+ case "$libs" in
+ '') ;;
+ *) for thislib in $libs; do
+***************
+*** 3878,3889 ****
:
elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
:
@@ -83,7 +99,7 @@
elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
:
else
---- 3979,3992 ----
+--- 3886,3899 ----
:
elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
:
@@ -99,7 +115,7 @@
:
else
***************
-*** 4018,4028 ****
+*** 3932,3942 ****
fi
elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
echo "Your C library seems to be in $libc, as you said before."
@@ -111,7 +127,7 @@
echo "Your C library seems to be in $libc. You're normal."
else
if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
---- 4035,4045 ----
+--- 3942,3952 ----
fi
elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
echo "Your C library seems to be in $libc, as you said before."
@@ -124,8 +140,8 @@
else
if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
***************
-*** 4135,4140 ****
---- 4152,4161 ----
+*** 4049,4054 ****
+--- 4059,4068 ----
eval $xscan;\
$contains '^fprintf$' libc.list >/dev/null 2>&1; then
eval $xrun
@@ -137,7 +153,7 @@
nm -p $* 2>/dev/null >libc.tmp
$grep fprintf libc.tmp > libc.ptf
***************
-*** 4145,4167 ****
+*** 4059,4081 ****
eval $xrun
else
echo " "
@@ -161,7 +177,7 @@
done
echo "Ok." >&4
else
---- 4166,4189 ----
+--- 4073,4096 ----
eval $xrun
else
echo " "
@@ -187,7 +203,7 @@
echo "Ok." >&4
else
***************
-*** 4507,4513 ****
+*** 4421,4427 ****
exit(0);
}
EOCP
@@ -195,7 +211,7 @@
intsize=`./try`
echo "Your integers are $intsize bytes long."
else
---- 4529,4535 ----
+--- 4436,4442 ----
exit(0);
}
EOCP
@@ -204,7 +220,7 @@
echo "Your integers are $intsize bytes long."
else
***************
-*** 4587,4593 ****
+*** 4501,4507 ****
exit(result);
}
EOCP
@@ -212,7 +228,7 @@
./try
yyy=$?
else
---- 4609,4615 ----
+--- 4516,4522 ----
exit(result);
}
EOCP
@@ -221,7 +237,7 @@
yyy=$?
else
***************
-*** 4668,4674 ****
+*** 4582,4588 ****
}
EOCP
@@ -229,7 +245,7 @@
./try
castflags=$?
else
---- 4690,4696 ----
+--- 4597,4603 ----
}
EOCP
@@ -238,7 +254,7 @@
castflags=$?
else
***************
-*** 4707,4713 ****
+*** 4621,4627 ****
exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
EOF
@@ -246,7 +262,7 @@
echo "Your vsprintf() returns (int)." >&4
val2="$undef"
else
---- 4729,4735 ----
+--- 4636,4642 ----
exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
EOF
@@ -255,7 +271,7 @@
val2="$undef"
else
***************
-*** 4777,4783 ****
+*** 4691,4697 ****
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
@@ -263,7 +279,7 @@
else
cryptlib=-lcrypt
fi
---- 4799,4805 ----
+--- 4706,4712 ----
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
@@ -272,7 +288,7 @@
cryptlib=-lcrypt
fi
***************
-*** 5284,5290 ****
+*** 5198,5204 ****
}
EOM
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
@@ -280,7 +296,7 @@
$cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
xxx=`./fred`
case $xxx in
---- 5306,5312 ----
+--- 5213,5219 ----
}
EOM
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
@@ -289,7 +305,7 @@
xxx=`./fred`
case $xxx in
***************
-*** 5441,5447 ****
+*** 5355,5361 ****
EOCP
: check sys/file.h first to get FREAD on Sun
if $test `./findhdr sys/file.h` && \
@@ -297,7 +313,7 @@
h_sysfile=true;
echo "<sys/file.h> defines the O_* constants..." >&4
if ./open3; then
---- 5463,5469 ----
+--- 5370,5376 ----
EOCP
: check sys/file.h first to get FREAD on Sun
if $test `./findhdr sys/file.h` && \
@@ -306,7 +322,7 @@
echo "<sys/file.h> defines the O_* constants..." >&4
if ./open3; then
***************
-*** 5452,5458 ****
+*** 5366,5372 ****
val="$undef"
fi
elif $test `./findhdr fcntl.h` && \
@@ -314,7 +330,7 @@
h_fcntl=true;
echo "<fcntl.h> defines the O_* constants..." >&4
if ./open3; then
---- 5474,5480 ----
+--- 5381,5387 ----
val="$undef"
fi
elif $test `./findhdr fcntl.h` && \
@@ -323,7 +339,7 @@
echo "<fcntl.h> defines the O_* constants..." >&4
if ./open3; then
***************
-*** 5931,5937 ****
+*** 5848,5854 ****
y*|true)
usemymalloc='y'
mallocsrc='malloc.c'
@@ -331,7 +347,7 @@
d_mymalloc="$define"
case "$libs" in
*-lmalloc*)
---- 5953,5959 ----
+--- 5863,5869 ----
y*|true)
usemymalloc='y'
mallocsrc='malloc.c'
@@ -340,7 +356,7 @@
case "$libs" in
*-lmalloc*)
***************
-*** 6366,6375 ****
+*** 6283,6292 ****
: we will have to assume that it supports the 4.2 BSD interface
d_oldsock="$undef"
else
@@ -351,7 +367,7 @@
if $contains socket libc.list >/dev/null 2>&1; then
echo "...but the Wollongong group seems to have hacked it in." >&4
socketlib="-lnet"
---- 6388,6397 ----
+--- 6298,6307 ----
: we will have to assume that it supports the 4.2 BSD interface
d_oldsock="$undef"
else
@@ -363,7 +379,7 @@
echo "...but the Wollongong group seems to have hacked it in." >&4
socketlib="-lnet"
***************
-*** 6382,6388 ****
+*** 6299,6305 ****
d_oldsock="$define"
fi
else
@@ -371,7 +387,7 @@
d_socket="$undef"
d_oldsock="$undef"
fi
---- 6404,6410 ----
+--- 6314,6320 ----
d_oldsock="$define"
fi
else
@@ -380,7 +396,7 @@
d_oldsock="$undef"
fi
***************
-*** 6905,6911 ****
+*** 7055,7061 ****
printf("%d\n", (char *)&try.bar - (char *)&try.foo);
}
EOCP
@@ -388,7 +404,7 @@
dflt=`./try`
else
dflt='8'
---- 6927,6933 ----
+--- 7070,7076 ----
printf("%d\n", (char *)&try.bar - (char *)&try.foo);
}
EOCP
@@ -397,7 +413,24 @@
else
dflt='8'
***************
-*** 6953,6959 ****
+*** 7080,7086 ****
+ '') obj_ext='.o';;
+ esac
+ case "$path_sep" in
+! '') path_sep=':';;
+ esac
+ : Which makefile gets called first. This is used by make depend.
+ case "$firstmakefile" in
+--- 7095,7101 ----
+ '') obj_ext='.o';;
+ esac
+ case "$path_sep" in
+! '') path_sep="$p_";;
+ esac
+ : Which makefile gets called first. This is used by make depend.
+ case "$firstmakefile" in
+***************
+*** 7120,7126 ****
}
EOCP
xxx_prompt=y
@@ -405,7 +438,7 @@
dflt=`./try`
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
---- 6975,6981 ----
+--- 7135,7141 ----
}
EOCP
xxx_prompt=y
@@ -414,7 +447,7 @@
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
***************
-*** 7531,7537 ****
+*** 7470,7476 ****
printf("%d\n",i);
}
EOCP
@@ -422,7 +455,7 @@
dflt=`try`
else
dflt='?'
---- 7553,7559 ----
+--- 7485,7491 ----
printf("%d\n",i);
}
EOCP
@@ -431,7 +464,7 @@
else
dflt='?'
***************
-*** 7558,7575 ****
+*** 7497,7514 ****
$cc $ccflags -c bar1.c >/dev/null 2>&1
$cc $ccflags -c bar2.c >/dev/null 2>&1
$cc $ccflags -c foo.c >/dev/null 2>&1
@@ -450,7 +483,7 @@
else
case "$ranlib" in
:) ranlib='';;
---- 7580,7597 ----
+--- 7512,7529 ----
$cc $ccflags -c bar1.c >/dev/null 2>&1
$cc $ccflags -c bar2.c >/dev/null 2>&1
$cc $ccflags -c foo.c >/dev/null 2>&1
@@ -470,7 +503,7 @@
case "$ranlib" in
:) ranlib='';;
***************
-*** 7641,7647 ****
+*** 7580,7586 ****
'') $echo $n ".$c"
if $cc $ccflags \
$i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
@@ -478,7 +511,7 @@
set X $i_time $i_systime $i_systimek $sysselect $s_timeval
shift
flags="$*"
---- 7663,7669 ----
+--- 7595,7601 ----
'') $echo $n ".$c"
if $cc $ccflags \
$i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
@@ -487,7 +520,7 @@
shift
flags="$*"
***************
-*** 7710,7716 ****
+*** 7649,7655 ****
#endif
}
EOCP
@@ -495,7 +528,7 @@
d_fds_bits="$define"
d_fd_set="$define"
echo "Well, your system knows about the normal fd_set typedef..." >&4
---- 7732,7738 ----
+--- 7664,7670 ----
#endif
}
EOCP
@@ -504,7 +537,7 @@
d_fd_set="$define"
echo "Well, your system knows about the normal fd_set typedef..." >&4
***************
-*** 7727,7733 ****
+*** 7666,7672 ****
$cat <<'EOM'
Hmm, your compiler has some difficulty with fd_set. Checking further...
EOM
@@ -512,7 +545,7 @@
d_fds_bits="$undef"
d_fd_set="$define"
echo "Well, your system has some sort of fd_set available..." >&4
---- 7749,7755 ----
+--- 7681,7687 ----
$cat <<'EOM'
Hmm, your compiler has some difficulty with fd_set. Checking further...
EOM
@@ -521,7 +554,7 @@
d_fd_set="$define"
echo "Well, your system has some sort of fd_set available..." >&4
***************
-*** 8353,8359 ****
+*** 8380,8386 ****
else
echo "false"
fi
@@ -529,7 +562,7 @@
EOP
chmod +x varargs
---- 8375,8381 ----
+--- 8395,8401 ----
else
echo "false"
fi
@@ -538,7 +571,7 @@
chmod +x varargs
***************
-*** 8496,8506 ****
+*** 8744,8750 ****
echo " "
echo "Stripping down executable paths..." >&4
for file in $loclist $trylist; do
@@ -546,11 +579,7 @@
done
;;
esac
-
- : create config.sh file
- echo " "
- echo "Creating config.sh..." >&4
---- 8518,8531 ----
+--- 8759,8765 ----
echo " "
echo "Stripping down executable paths..." >&4
for file in $loclist $trylist; do
@@ -558,47 +587,3 @@
done
;;
esac
-
-+ # Setup libraries for linking miniperl (if not set already)
-+ : ${cldlibs="$libs $cryptlib"}
-+
- : create config.sh file
- echo " "
- echo "Creating config.sh..." >&4
-***************
-*** 8556,8561 ****
---- 8581,8587 ----
- chmod='$chmod'
- chown='$chown'
- clocktype='$clocktype'
-+ cldlibs='$cldlibs'
- comm='$comm'
- compress='$compress'
- contains='$contains'
-***************
-*** 8752,8757 ****
---- 8778,8784 ----
- expr='$expr'
- extensions='$extensions'
- find='$find'
-+ firstmakefile='$firstmakefile'
- flex='$flex'
- fpostype='$fpostype'
- freetype='$freetype'
-***************
-*** 8962,8967 ****
---- 8989,9002 ----
- voidflags='$voidflags'
- xlibpth='$xlibpth'
- zcat='$zcat'
-+ archobjs='$archobjs'
-+ obj_ext='$obj_ext'
-+ obj_ext_regexp='$obj_ext_regexp'
-+ lib_ext='$lib_ext'
-+ exe_ext='$exe_ext'
-+ ar='$ar'
-+ plibext='$plibext'
-+ path_sep='$path_sep'
- EOT
-
- : add special variables
diff --git a/os2/diff.installperl b/os2/diff.installperl
index c94db2e464..710ee918b3 100644
--- a/os2/diff.installperl
+++ b/os2/diff.installperl
@@ -1,37 +1,17 @@
-diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
-*** ../perl5os2.patch/perl5.001m.andy/installperl Wed Jun 21 12:09:26 1995
---- ./installperl Thu Sep 28 00:00:20 1995
+*** installperl.orig Mon Nov 20 09:55:08 1995
+--- installperl Wed Nov 22 02:29:34 1995
***************
-*** 24,35 ****
- # Read in the config file.
-
- open(CONFIG, "config.sh") || die "You haven't run Configure yet!\n";
-! while (<CONFIG>) {
-! if (s/^(\w+=)/\$$1/) {
- $accum =~ s/'undef'/undef/g;
- eval $accum;
- $accum = '';
- }
- $accum .= $_;
- }
- close CONFIG;
---- 24,37 ----
- # Read in the config file.
-
- open(CONFIG, "config.sh") || die "You haven't run Configure yet!\n";
-! while (1) {
-! $_ = <CONFIG>;
-! if (s/^(\w+=)/\$$1/ or not defined $_) {
- $accum =~ s/'undef'/undef/g;
- eval $accum;
- $accum = '';
- }
-+ last unless defined $_; # To get the last two lines too
- $accum .= $_;
- }
- close CONFIG;
+*** 4,9 ****
+--- 4,10 ----
+ use Config;
+
+ $mainperldir = "/usr/bin";
++ $exe_ext = $Config{exe_ext};
+
+ while (@ARGV) {
+ $nonono = 1 if $ARGV[0] eq '-n';
***************
-*** 50,57 ****
+*** 61,68 ****
-w $installbin || die "$installbin is not writable by you\n"
unless $installbin =~ m#^/afs/# || $nonono;
@@ -40,7 +20,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
-x 't/TEST' || warn "WARNING: You've never run 'make test'!!!",
" (Installing anyway.)\n";
---- 52,59 ----
+--- 62,69 ----
-w $installbin || die "$installbin is not writable by you\n"
unless $installbin =~ m#^/afs/# || $nonono;
@@ -50,7 +30,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
-x 't/TEST' || warn "WARNING: You've never run 'make test'!!!",
" (Installing anyway.)\n";
***************
-*** 69,81 ****
+*** 80,92 ****
# First we install the version-numbered executables.
@@ -64,7 +44,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
exit 0 if $versiononly;
---- 71,83 ----
+--- 81,93 ----
# First we install the version-numbered executables.
@@ -79,7 +59,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
exit 0 if $versiononly;
***************
-*** 83,97 ****
+*** 94,108 ****
# Make links to ordinary names if installbin directory isn't current directory.
if (! &samepath($installbin, '.')) {
@@ -95,7 +75,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
# Install scripts.
---- 85,100 ----
+--- 95,110 ----
# Make links to ordinary names if installbin directory isn't current directory.
if (! &samepath($installbin, '.')) {
@@ -113,7 +93,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
# Install scripts.
***************
-*** 174,187 ****
+*** 188,201 ****
if (-w $mainperldir && ! &samepath($mainperldir, $installbin) && !$nonono) {
# First make sure $mainperldir/perl is not already the same as
# the perl we just installed
@@ -128,7 +108,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
if ((! $mainperl_is_instperl) &&
(&yn("Many scripts expect perl to be installed as " .
---- 177,190 ----
+--- 190,203 ----
if (-w $mainperldir && ! &samepath($mainperldir, $installbin) && !$nonono) {
# First make sure $mainperldir/perl is not already the same as
# the perl we just installed
@@ -144,7 +124,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
if ((! $mainperl_is_instperl) &&
(&yn("Many scripts expect perl to be installed as " .
***************
-*** 189,198 ****
+*** 203,212 ****
"Do you wish to have $mainperldir/perl be the same as\n" .
"$binexp/perl? [y] ")))
{
@@ -155,7 +135,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
$mainperl_is_instperl = 1;
}
}
---- 192,201 ----
+--- 205,214 ----
"Do you wish to have $mainperldir/perl be the same as\n" .
"$binexp/perl? [y] ")))
{
@@ -167,7 +147,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
}
***************
-*** 203,209 ****
+*** 217,223 ****
# Also skip $mainperl if the user opted to have it be a link to the
# installed perl.
@@ -175,7 +155,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
@otherperls = ();
for (@path) {
next unless m,^/,;
---- 206,214 ----
+--- 219,227 ----
# Also skip $mainperl if the user opted to have it be a link to the
# installed perl.
@@ -186,7 +166,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
for (@path) {
next unless m,^/,;
***************
-*** 211,217 ****
+*** 225,231 ****
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
next if ($mainperl_is_instperl && &samepath($_, $mainperldir));
@@ -194,7 +174,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
if (@otherperls) {
print STDERR "\nWarning: perl appears in your path in the following " .
---- 216,223 ----
+--- 229,236 ----
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
next if ($mainperl_is_instperl && &samepath($_, $mainperldir));
@@ -204,8 +184,8 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
if (@otherperls) {
print STDERR "\nWarning: perl appears in your path in the following " .
***************
-*** 244,249 ****
---- 250,256 ----
+*** 258,263 ****
+--- 263,269 ----
foreach $name (@names) {
next unless -e $name;
print STDERR " unlink $name\n";
@@ -214,8 +194,8 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
}
***************
-*** 255,260 ****
---- 262,268 ----
+*** 269,274 ****
+--- 275,281 ----
next unless -e $name;
print STDERR " unlink $name\n";
next if $nonono;
@@ -224,7 +204,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
warn "Couldn't unlink $name: $!\n";
if ($! =~ /busy/i) {
***************
-*** 290,296 ****
+*** 304,310 ****
local($from,$to) = @_;
print STDERR " ln $from $to\n";
@@ -232,7 +212,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/installperl ./installperl
}
sub chmod {
---- 298,310 ----
+--- 311,323 ----
local($from,$to) = @_;
print STDERR " ln $from $to\n";
diff --git a/os2/diff.mkdep b/os2/diff.mkdep
index 595d260238..86d3e0c0a2 100644
--- a/os2/diff.mkdep
+++ b/os2/diff.mkdep
@@ -1,18 +1,5 @@
-diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
-*** ../perl5os2.patch/perl5.001m.andy/makedepend.SH Mon Oct 09 21:41:04 1995
---- ./makedepend.SH Thu Sep 28 00:00:28 1995
-***************
-*** 43,48 ****
---- 43,51 ----
- ;;
- esac
-
-+ # In case Configure is not patched:
-+ : ${firstmakefile=makefile}
-+
- # We need .. when we are in the x2p directory if we are using the
- # cppstdin wrapper script.
- # Put .. and . first so that we pick up the present cppstdin, not
+*** makedepend.SH.orig Wed Aug 30 19:55:44 1995
+--- makedepend.SH Sun Nov 26 14:59:34 1995
***************
*** 53,69 ****
$cat /dev/null >.deptmp
@@ -32,7 +19,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
-e N \
-e 's/\$\*\.c//' \
-e 's/^.*\n[ ]*//p' \
---- 56,72 ----
+--- 53,69 ----
$cat /dev/null >.deptmp
$rm -f *.c.c c/*.c.c
if test -f Makefile; then
@@ -41,12 +28,12 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
! mf=$firstmakefile
if test -f $mf; then
defrule=`<$mf sed -n \
-! -e '/^\.c\$(O_REGEXP):.*;/{' \
+! -e '/^\.c\(\$(OBJ_EXT)\|\.o\):.*;/{' \
-e 's/\$\*\.c//' \
-e 's/^[^;]*;[ ]*//p' \
-e q \
-e '}' \
-! -e '/^\.c\$(O_REGEXP): *$/{' \
+! -e '/^\.c\(\$(OBJ_EXT)\|\.o\): *$/{' \
-e N \
-e 's/\$\*\.c//' \
-e 's/^.*\n[ ]*//p' \
@@ -59,7 +46,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
( $echo "#line 1 \"$file\""; \
$sed -n <$file \
-e "/^${filebase}_init(/q" \
---- 94,100 ----
+--- 91,97 ----
*/*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
*) finc= ;;
esac
@@ -77,16 +64,32 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
-e 's|: \./|: |' \
-e 's|\.c\.c|.c|' | \
$uniq | $sort | $uniq >> .deptmp
---- 110,117 ----
+--- 107,114 ----
-e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
-e 's/^[ ]*#[ ]*line/#/' \
-e '/^# *[0-9][0-9]* *[".\/]/!d' \
-! -e 's/^.*"\(.*\)".*$/'$filebase'\$(O): \1/' \
-! -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(O): \1/' \
+! -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
+! -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
-e 's|: \./|: |' \
-e 's|\.c\.c|.c|' | \
$uniq | $sort | $uniq >> .deptmp
***************
+*** 118,123 ****
+--- 118,130 ----
+
+ $MAKE shlist || ($echo "Searching for .SH files..."; \
+ $echo *.SH | $tr ' ' '\012' | $egrep -v '\*' >.shlist)
++
++ # Now extract the dependency on makedepend.SH
++ # (it should reside in the main Makefile):
++ mv .shlist .shlist.old
++ $egrep -v '^makedepend\.SH' <.shlist.old >.shlist
++ rm .shlist.old
++
+ if $test -s .deptmp; then
+ for file in `cat .shlist`; do
+ $echo `$expr X$file : 'X\(.*\).SH'`: $file $TOP/config.sh \; \
+***************
*** 126,132 ****
$echo "Updating $mf..."
$echo "# If this runs make out of memory, delete /usr/include lines." \
@@ -95,11 +98,11 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
>>$mf.new
else
$MAKE hlist || ($echo "Searching for .h files..."; \
---- 129,135 ----
+--- 133,139 ----
$echo "Updating $mf..."
$echo "# If this runs make out of memory, delete /usr/include lines." \
>> $mf.new
-! $sed 's|^\(.*\$(O_REGEXP):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
+! $sed 's|^\(.*\(\$(OBJ_EXT)\|\.o\):\) *\(.*/.*\.c\) *$|\1 \3; '"$defrule \2|" .deptmp \
>>$mf.new
else
$MAKE hlist || ($echo "Searching for .h files..."; \
@@ -115,14 +118,14 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
<.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed
<.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \
$sed 's|^[^;]*/||' | \
---- 139,148 ----
+--- 143,152 ----
$echo "Updating $mf..."
<.clist $sed -n \
-e '/\//{' \
-! -e 's|^\(.*\)/\(.*\)\.c|\2\$(O): \1/\2.c; '"$defrule \1/\2.c|p" \
+! -e 's|^\(.*\)/\(.*\)\.c|\2\$(OBJ_EXT): \1/\2.c; '"$defrule \1/\2.c|p" \
-e d \
-e '}' \
-! -e 's|^\(.*\)\.c|\1\$(O): \1.c|p' >> $mf.new
+! -e 's|^\(.*\)\.c|\1\$(OBJ_EXT): \1.c|p' >> $mf.new
<.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed
<.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \
$sed 's|^[^;]*/||' | \
diff --git a/os2/diff.x2pMakefile b/os2/diff.x2pMakefile
index af3058452f..46fdedb8d2 100644
--- a/os2/diff.x2pMakefile
+++ b/os2/diff.x2pMakefile
@@ -1,39 +1,29 @@
-diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
-*** ../perl5os2.patch/perl5.001m.andy/x2p/Makefile.SH Fri May 26 07:33:48 1995
---- ./x2p/Makefile.SH Thu Sep 28 00:00:42 1995
+*** x2p/Makefile.SH.orig Sun Nov 19 20:17:38 1995
+--- x2p/Makefile.SH Wed Nov 22 20:18:08 1995
***************
-*** 17,22 ****
---- 17,25 ----
- */*) cd `expr X$0 : 'X\(.*\)/'` ;;
- esac
-
-+ # In case Configure is not patched:
-+ : ${obj_ext=.o} ${obj_ext_regexp='\.o'} ${lib_ext=.a} ${ar=ar} ${firstmakefile=makefile}
-+
- echo "Extracting x2p/Makefile (with variable substitutions)"
- rm -f Makefile
- cat >Makefile <<!GROK!THIS!
-***************
-*** 33,39 ****
---- 36,51 ----
- mallocobj = $mallocobj
+*** 34,39 ****
+--- 34,52 ----
shellflags = $shellflags
-+ firstmakefile = $firstmakefile
-+
libs = $libs
-+ O = $obj_ext
-+ O_REGEXP = $obj_ext_regexp
-+ A = $lib_ext
++
++ # These variables will be used in a future version to make
++ # the make file more portable to non-unix systems.
+ AR = $ar
++ EXE_EXT = $exe_ext
++ LIB_EXT = $lib_ext
++ OBJ_EXT = $obj_ext
++ PATH_SEP = $path_sep
++
++ FIRSTMAKEFILE = $firstmakefile
+
-+ .SUFFIXES: .c \$(O)
++ .SUFFIXES: .c \$(OBJ_EXT)
+
!GROK!THIS!
cat >>Makefile <<'!NO!SUBS!'
***************
-*** 56,76 ****
+*** 60,80 ****
c = hash.c $(mallocsrc) str.c util.c walk.c
@@ -55,30 +45,30 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
# I now supply a2p.c with the kits, so the following section is
# used only if you force byacc to run by saying
---- 67,87 ----
+--- 73,93 ----
c = hash.c $(mallocsrc) str.c util.c walk.c
-! obj = hash$(O) $(mallocobj) str$(O) util$(O) walk$(O)
+! obj = hash$(OBJ_EXT) $(mallocobj) str$(OBJ_EXT) util$(OBJ_EXT) walk$(OBJ_EXT)
lintflags = -phbvxac
# grrr
SHELL = /bin/sh
-! .c$(O):
+! .c$(OBJ_EXT):
$(CCCMD) $*.c
all: $(public) $(private) $(util)
touch all
-! a2p: $(obj) a2p$(O)
-! $(CC) $(LDFLAGS) $(obj) a2p$(O) $(libs) -o a2p
+! a2p: $(obj) a2p$(OBJ_EXT)
+! $(CC) $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs) -o a2p
# I now supply a2p.c with the kits, so the following section is
# used only if you force byacc to run by saying
***************
-*** 86,100 ****
+*** 90,104 ****
a2p.c: a2p.y
-@touch a2p.c
@@ -94,24 +84,24 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
# The following lint has practically everything turned on. Unfortunately,
# you have to wade through a lot of mumbo jumbo that can't be suppressed.
---- 97,111 ----
+--- 103,117 ----
a2p.c: a2p.y
-@touch a2p.c
-! a2p$(O): a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
+! a2p$(OBJ_EXT): a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
$(CCCMD) $(LARGE) a2p.c
clean:
-! rm -f a2p *$(O)
+! rm -f a2p *$(OBJ_EXT)
realclean: clean
rm -f *.orig core $(addedbyconf) all malloc.c
-! rm -f $(firstmakefile) makefile.old
+! rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old
# The following lint has practically everything turned on. Unfortunately,
# you have to wade through a lot of mumbo jumbo that can't be suppressed.
***************
-*** 105,111 ****
+*** 109,115 ****
lint $(lintflags) $(defs) $(c) > a2p.fuzz
depend: $(mallocsrc) ../makedepend
@@ -119,7 +109,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
clist:
echo $(c) | tr ' ' '\012' >.clist
---- 116,122 ----
+--- 122,128 ----
lint $(lintflags) $(defs) $(c) > a2p.fuzz
depend: $(mallocsrc) ../makedepend
@@ -128,7 +118,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
clist:
echo $(c) | tr ' ' '\012' >.clist
***************
-*** 131,137 ****
+*** 140,146 ****
case `pwd` in
*SH)
$rm -f ../Makefile
@@ -136,7 +126,7 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
;;
esac
! rm -f makefile
---- 142,148 ----
+--- 153,159 ----
case `pwd` in
*SH)
$rm -f ../Makefile
@@ -144,79 +134,3 @@ diff -cr ..\perl5os2.patch\perl5.001m.andy/x2p/Makefile.SH ./x2p/Makefile.SH
;;
esac
! rm -f $firstmakefile
-*** installman.orig Thu Jun 22 10:42:40 1995
---- installman Thu Nov 02 04:07:38 1995
-***************
-*** 6,11 ****
---- 6,12 ----
- require Cwd;
-
- umask 022;
-+ $ENV{SHELL} = 'sh' if $Config{osname} eq 'os2';
-
- $ver = $];
- $release = substr($ver,0,3); # Not used presently.
-***************
-*** 38,48 ****
-
- #Sanity checks
-
-! -x "./perl" || warn "./perl not found! Have you run make?\n";
- -d $Config{'installprivlib'}
- || warn "Perl library directory $Config{'installprivlib'} not found.
- Have you run make install?. (Installing anyway.)\n";
-! -x 't/TEST' || warn "WARNING: You've never run 'make test'!!!",
- " (Installing anyway.)\n";
-
- # Install the main pod pages.
---- 39,50 ----
-
- #Sanity checks
-
-! -x "./perl$Config{exe_ext}"
-! or warn "./perl$Config{exe_ext} not found! Have you run make?\n";
- -d $Config{'installprivlib'}
- || warn "Perl library directory $Config{'installprivlib'} not found.
- Have you run make install?. (Installing anyway.)\n";
-! -x "t/perl$Config{exe_ext}" || warn "WARNING: You've never run 'make test'!!!",
- " (Installing anyway.)\n";
-
- # Install the main pod pages.
-***************
-*** 66,72 ****
- # are enhancements or changes from previous installed versions.
- # The error message doesn't include the '..' because the user
- # won't be aware that we've chdir to $poddir.
-! -x "../pod/pod2man" || die "Executable pod/pod2man not found.\n";
-
- # We want to be sure to use the current perl. We can't rely on
- # the installed perl because it might not be actually installed
---- 68,74 ----
- # are enhancements or changes from previous installed versions.
- # The error message doesn't include the '..' because the user
- # won't be aware that we've chdir to $poddir.
-! -r "../pod/pod2man" || die "Executable pod/pod2man not found.\n";
-
- # We want to be sure to use the current perl. We can't rely on
- # the installed perl because it might not be actually installed
-***************
-*** 86,92 ****
- # Convert name from File/Basename.pm to File::Basename.3 format,
- # if necessary.
- $manpage =~ s#\.p(m|od)$##;
-! $manpage =~ s#/#::#g;
- $manpage = "${mandir}/${manpage}.${manext}";
- # Print $release $patchlevel stuff? or should pod2man do that?
- &cmd("$pod2man $mod > $manpage");
---- 88,98 ----
- # Convert name from File/Basename.pm to File::Basename.3 format,
- # if necessary.
- $manpage =~ s#\.p(m|od)$##;
-! if ($Config{osname} eq "os2") {
-! $manpage =~ s#/#.#g;
-! } else {
-! $manpage =~ s#/#::#g;
-! }
- $manpage = "${mandir}/${manpage}.${manext}";
- # Print $release $patchlevel stuff? or should pod2man do that?
- &cmd("$pod2man $mod > $manpage");
diff --git a/os2/os2.c b/os2/os2.c
index f6c76082bd..fa41298532 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -173,7 +173,10 @@ fork(void)
/* not implemented in EMX 0.9a */
void * ctermid(x) { return 0; }
+
+#ifdef MYTTYNAME /* was not in emx0.9a */
void * ttyname(x) { return 0; }
+#endif
void * gethostent() { return 0; }
void * getnetent() { return 0; }
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 061726dc2d..2dca64a9c8 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -23,6 +23,11 @@
#endif
#define ABORT() kill(getpid(),SIGABRT);
+#define PERL_SYS_INIT(argcp, argvp) do { \
+ _response(argcp, argvp); \
+ _wildcard(argcp, argvp); } while (0)
+
+
/*
* fwrite1() should be a routine with the same calling sequence as fwrite(),
* but which outputs all of the bytes requested as a single stream (unlike