From: Jarkko Hietaniemi Date: Mon, 11 Mar 2002 03:04:33 +0000 (+0000) Subject: DG/UX updates from Takis Psarogiannakopoulos. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95036ac7ba8f6d5403ad0ee3cd45c1e0d1312ad7;p=p5sagit%2Fp5-mst-13.2.git DG/UX updates from Takis Psarogiannakopoulos. p4raw-id: //depot/perl@15151 --- diff --git a/README.dgux b/README.dgux index 640abab..accb738 100644 --- a/README.dgux +++ b/README.dgux @@ -52,7 +52,7 @@ If you are using as compiler GCC-2.95.x rev(DG/UX) an easy solution for configuring perl in your DG/UX machine is to run the command: -./Configure -Dusethreads -Duse5005threads -des +./Configure -Dusethreads -Duseithreads -Dusedevel -des This will automatically accept all the defaults and in particular /usr/local/ as installation directory. @@ -65,7 +65,7 @@ have a standard DG/UX with C compiler GCC-2.7.2.x then you have no choice than to do an interactive build by issuing the command: -./Configure -Dusethreads -Duse5005threads +./Configure -Dusethreads -Duseithreads In particular with GCC-2.7.2.x accept all the defaults and *watch* out for the message: @@ -107,7 +107,7 @@ Centre for Mathematical Sciences Department of Pure Mathematics Wilberforce road Cambridge CB3 0WB , UK -email +email =head1 SEE ALSO diff --git a/hints/dgux.sh b/hints/dgux.sh index 64cff33..350a9da 100644 --- a/hints/dgux.sh +++ b/hints/dgux.sh @@ -29,61 +29,61 @@ # Department of Pure Mathematics # Wilberforce road # Cambridge CB3 0WB , UK -# e-mail +# e-mail # Use GCC-2.95.2/3 rev (DG/UX) for threads # This compiler supports the -pthread switch # to link correctly DG/UX 's -lthread. +# March 2002 ########################################### cc=gcc ccflags="-DDGUX -D_DGUX_SOURCE" -# Debug build with GNU as,ld and -gstabs+ -# ccflags="-DDGUX -D_DGUX_SOURCE -gstabs+" +# Debug build. If using GNU as,ld use the flag -gstabs+ +# ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING" # Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX) +# even if you debugging the program! optimize="-mno-legend -O2" archname="ix86-dgux" libpth="/usr/lib" ##################################### -# +# # Change this if you want. # prefix =/usr/local ##################################### prefix=/usr/local -perlpath="$prefix/bin/perl57" -startperl="#! $prefix/bin/perl57" -privlib="$prefix/lib/perl57" +perlpath="$prefix/bin/perl58" +startperl="#! $prefix/bin/perl58" +privlib="$prefix/lib/perl58" man1dir="$prefix/man/man1" man3dir="$prefix/man/man3" -sitearch="$prefix/lib/perl57/$archname" -sitelib="$prefix/lib/perl57" +sitearch="$prefix/lib/perl58/$archname" +sitelib="$prefix/lib/perl58" #Do not overwrite by default /usr/bin/perl of DG/UX installusrbinperl="$undef" # Configure may fail to find lstat() # function in . -d_lstat=define +d_lstat='define' -# Internal malloc is needed for correct operation -# of perl-5.7.x -# DG/UX native malloc is causing problems. -# Some perl tests they failing badly. +# Internal (perl) malloc is causing serious problems and +# test failures in DG/UX. Most notable Embed.t +# So for perl-5.7.3 and on do NOT use. # I have no time to investigate more. -# +# case "$usemymalloc" in -'') usemymalloc='y' ;; +'') usemymalloc='n' ;; esac case "$uselongdouble" in '') uselongdouble='y' ;; esac -#### No for threads ???? ##### #usevfork=true usevfork=false @@ -137,10 +137,10 @@ plibpth="$plibpth $sde_path/$sde/usr/lib" unset sde_path default_sde sde ##################################### -# +# ##################################### -libperl="libperl57.so" +libperl="libperl58.so" # Many functions (eg, gethostent(), killpg(), getpriority(), setruid() # dbm_*(), and plenty more) are defined in -ldgc. Usually you don't @@ -149,16 +149,17 @@ libperl="libperl57.so" # those functions as missing. ##################################### -# +# ##################################### # libswanted="dgc gdbm $libswanted" #libswanted="dbm posix $libswanted" -# Remove malloc since we use the internal perl one. +# Do *NOT* add there the malloc native +# DG/UX library! libswanted="dbm posix resolv socket nsl dl m" ##################################### -# +# ##################################### mydomain='.localhost' @@ -178,7 +179,7 @@ usedl=false # -G for loading. I haven't tested this. ##################################### -# +# # Use -fPIC instead -fpic ##################################### @@ -189,7 +190,7 @@ lddlflags="-shared" ############################################################################ # DGUX Posix 4A Draft 10 Thread support -# +# # use Configure -Dusethreads to enable ############################################################################ @@ -197,13 +198,17 @@ cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) ccflags="$ccflags" + # DG/UX has this for sure! Main Configure fails to + # detect it but it is needed! + d_pthread_atfork='define' shift # DG/UX's sched_yield is in -lrte - # Remove malloc since we use the internal perl one. + # Do *NOT* add there the malloc native + # DG/UX library! libswanted="dbm posix resolv socket nsl dl m rte" archname="ix86-dgux-thread" - sitearch="$prefix/lib/perl57/$archname" - sitelib="$prefix/lib/perl57" + sitearch="$prefix/lib/perl58/$archname" + sitelib="$prefix/lib/perl58" case "$cc" in *gcc*) #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread @@ -212,7 +217,7 @@ $define|true|[yY]*) ld="gcc" ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE" # Debug build : use -DS flag on command line perl - # ccflags="$ccflags -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread" + # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread" cccdlflags='-fPIC' lddlflags="-shared" #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread diff --git a/perl.h b/perl.h index 61d17fd..fdb26ec 100644 --- a/perl.h +++ b/perl.h @@ -21,6 +21,10 @@ #define USE_STDIO #endif /* PERL_FOR_X2P */ +#if defined(DGUX) +#include +#endif + #define VOIDUSED 1 #ifdef PERL_MICRO # include "uconfig.h" diff --git a/t/op/stat.t b/t/op/stat.t index 791f7e5..03c165b 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -22,6 +22,7 @@ $Is_NetWare = $^O eq 'NetWare'; $Is_OS2 = $^O eq 'os2'; $Is_Solaris = $^O eq 'solaris'; $Is_VMS = $^O eq 'VMS'; +$Is_DGUX = $^O eq 'dgux'; $Is_Dosish = $Is_Dos || $Is_OS2 || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin; @@ -243,15 +244,21 @@ SKIP: { is($c1, $c2, "ls and $_[1] agreeing on /dev ($c1 $c2)"); }; +SKIP: { + skip("DG/UX ls -L broken", 3) if $Is_DGUX; + $try->('b', '-b'); $try->('c', '-c'); $try->('s', '-S'); + } ok(! -b $Curdir, '!-b cwd'); ok(! -c $Curdir, '!-c cwd'); ok(! -S $Curdir, '!-S cwd'); +} + SKIP: { my($cnt, $uid); $cnt = $uid = 0; @@ -322,7 +329,11 @@ SKIP: { ok(-T 'op/stat.t', '-T'); ok(! -B 'op/stat.t', '!-B'); +SKIP: { + skip("DG/UX", 1) if $Is_DGUX; ok(-B $Perl, '-B'); +} + ok(! -T $Perl, '!-T'); open(FOO,'op/stat.t'); diff --git a/thread.h b/thread.h index d380791..e9933e2 100644 --- a/thread.h +++ b/thread.h @@ -87,7 +87,7 @@ #endif #ifdef DGUX -# define THREAD_CREATE_NEEDS_STACK (16*1024) +# define THREAD_CREATE_NEEDS_STACK (32*1024) #endif #ifdef I_MACH_CTHREADS