From: Ilya Zakharevich Date: Mon, 11 Feb 2002 06:56:41 +0000 (-0500) Subject: OS/2 build X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a64c954a1bae6e00706f368c6d1ae9d131a4361d;p=p5sagit%2Fp5-mst-13.2.git OS/2 build Message-ID: <20020211065640.A14993@math.ohio-state.edu> (sans the Configure, perlio.sym, and t/op/stat.t parts) p4raw-id: //depot/perl@14641 --- diff --git a/Makefile.SH b/Makefile.SH index 77ed8fe..8ae5c5f 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -654,7 +654,7 @@ sperl$(OBJ_EXT): perl.c $(h) # test -d lib/auto || mkdir lib/auto # .PHONY: preplibrary -preplibrary: miniperl$(EXE_EXT) lib/Config.pm lib/lib.pm +preplibrary: miniperl$(EXE_EXT) lib/Config.pm lib/lib.pm $(PREPLIBRARY_LIBPERL) @sh ./makedir lib/auto @echo " AutoSplitting perl library" $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \ diff --git a/autodoc.pl b/autodoc.pl index 8b6f3b4..02d7c0a 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -3,6 +3,9 @@ require 5.003; # keep this compatible, an old perl is all we may have before # we build the new one +BEGIN { push @INC, 'lib' } # glob() below requires File::Glob + + # # See database of global and static function prototypes at the __END__. # This is used to generate prototype headers under various configurations, diff --git a/ext/Socket/socketpair.t b/ext/Socket/socketpair.t index e30dd3f..161a119 100644 --- a/ext/Socket/socketpair.t +++ b/ext/Socket/socketpair.t @@ -152,7 +152,7 @@ ok (close RIGHT, "close right"); # guarantee that the stack won't drop a UDP packet, even if it is for localhost. SKIP: { - skip "No usable SOCK_DGRAM", 24 if ($^O eq 'MSWin32'); + skip "No usable SOCK_DGRAM for socketpair", 24 if ($^O =~ /^(MSWin32|os2)\z/); ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC), diff --git a/hints/os2.sh b/hints/os2.sh index 126f611..8633f26 100644 --- a/hints/os2.sh +++ b/hints/os2.sh @@ -108,6 +108,9 @@ exe_ext='.exe' # We provide it i_dlfcn='define' +# The default one uses exponential notation between 0.0001 and 0.1 +d_Gconvert='gcvt_os2((x),(n),(b))' + # -Zomf build has a problem with _exit() *flushing*, so the test # gets confused: fflushNULL="define" @@ -282,6 +285,15 @@ else fi fi +for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do + if test -z "$pager"; then + pager="`./UU/loc $f '' $pth`" + fi +done +if test -z "$pager"; then + pager='cmd /c more' +fi + # Apply patches if needed case "$0$running_c_cmd" in *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd diff --git a/opcode.pl b/opcode.pl index 5feca27..61cd0e8 100755 --- a/opcode.pl +++ b/opcode.pl @@ -281,6 +281,10 @@ close ON or die "Error closing opnames.h: $!"; chmod 0600, 'opcode.h'; # required by dosish filesystems chmod 0600, 'opnames.h'; # required by dosish filesystems +# Some dosish systems can't rename over an existing file: +unlink "$_-old" for qw(opcode.h opnames.h); +rename $_, "$_-old" for qw(opcode.h opnames.h); + rename $opcode_new, 'opcode.h' or die "renaming opcode.h: $!\n"; rename $opname_new, 'opnames.h' or die "renaming opnames.h: $!\n"; @@ -329,6 +333,10 @@ close PPSYM or die "Error closing pp.sym: $!"; chmod 0600, 'pp_proto.h'; # required by dosish filesystems chmod 0600, 'pp.sym'; # required by dosish filesystems +# Some dosish systems can't rename over an existing file: +unlink "$_-old" for qw(pp_proto.h pp.sym); +rename $_, "$_-old" for qw(pp_proto.h pp.sym); + rename $pp_proto_new, 'pp_proto.h' or die "rename pp_proto.h: $!\n"; rename $pp_sym_new, 'pp.sym' or die "rename pp.sym: $!\n"; diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs index 9c44823..23f6ead 100644 --- a/os2/Makefile.SHs +++ b/os2/Makefile.SHs @@ -55,6 +55,7 @@ AOUT_EXTRA_LIBS = $aout_extra_libs !GROK!THIS! $spitshell >>Makefile <<'!NO!SUBS!' +PREPLIBRARY_LIBPERL = $(LIBPERL) $(LIBPERL): perl.imp $(PERL_DLL) perl5.def libperl_override.lib emximp -o $(LIBPERL) perl.imp cp $(LIBPERL) perl.lib @@ -126,7 +127,11 @@ perl.linkexp: perl.exports perl.map os2/os2.sym # We link miniperl statically, since .DLL depends on $(DYNALOADER) -miniperl.map miniperl: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) +miniperl.map: miniperl + +miniperl.exe: miniperl + +miniperl: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Zlinker /map/PM:VIO @./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest diff --git a/os2/os2.c b/os2/os2.c index 830d900..8a32ee4 100644 --- a/os2/os2.c +++ b/os2/os2.c @@ -2939,3 +2939,9 @@ my_getpwnam (__const__ char *n) { return passw_wrap(getpwnam(n)); } + +char * +gcvt_os2 (double value, int digits, char *buffer) +{ + return gcvt (value, digits, buffer); +} diff --git a/os2/os2ish.h b/os2/os2ish.h index 68b4dd9..034fe82 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -310,6 +310,7 @@ int my_rmdir (__const__ char *); struct passwd *my_getpwent (void); void my_setpwent (void); void my_endpwent (void); +char *gcvt_os2(double value, int digits, char *buffer); struct group *getgrent (void); void setgrent (void);