Current state of the patches here is with respect to perl5.002b1d ;-). ======================================================== The OS/2 patchkit was submitted by ilya@math.ohio-state.edu. I have applied some parts that I suspect won't cause any problems. Others do things that I haven't had time to fully consider. Still other patches included here should perhaps be integrated with the metaconfig package that generates Configure. Andy Dougherty ======================================================== Notes on the patch: ~~~~~~~~~~~~~~~~~~~ patches should be applied as patch -p0 <..... All the diff.* files and POSIX.mkfifo should be applied. Additional files are available on ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2 including patched pdksh and gnumake, needed for build. Target: ~~~~~~~ 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: (part of what is below is already included by Andy, ~~~~~~~~~~~~~~~~~~~~~~~ thus there are skips below) 1) C files 2) Configure 3) MakeMaker 4) Build tools 1) C files a) mkfifo macro added to Posix.c b) Copyright notice for OS/2 port changed c) MYMALLOC section in perl.h moved (why?) d) setgrent grent and getgrent wrapped in ifdef e) declarations for #if defined(MYMALLOC) && defined(HIDEMYMALLOC) added f) some diagnostics added to tests 2) Configure b) Support for extraction from NE style libraries. c) a lot of cc -o whatever lines did not have $ldopts. d) The above variables are used throughout the file for checks 3) Build tools and libraries a) ln changed to $ln in some places b) Makefiles and related scripts made to use $(O), $(A), $(AR) using the vars found by Configure or defaulted to some reasonable value. c) $firstmakefile is the file make looks onto before Makefile d) $plibext is the extension for the perl library e) $archobjs is the list of additional object files needed for local build. 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. !!!!!! Also: installperl installman makedepend !!!!!! added as dependencies to the corresponding !!!!!! targets. m) clean target extended to delete some intermediate files Notes on build on OS/2: ~~~~~~~~~~~~~~~~~~~~~~~ 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.*.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: Need to put perl.dll on LIBPATH after it is created. d) Compile summary: # Look for hints/os2.sh and correct what is different on your system # I have rather spartan configuration. # Prefix means where to install: 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, 9 on my system # # before this you should create subdirs bin and lib in the # 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. 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 my patches! Same with segfaults in Make 3.74. !!!!!!!!!!!!!!!!! Problems reported: a) one of the latest tr is broken, get an old one :-( 1.11 works. (On compuserver?) b) You need a perlglob.exe and link386. 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().