From: Jarkko Hietaniemi Date: Sat, 29 Dec 2001 17:24:24 +0000 (+0000) Subject: VOS tweaks from Paul Green. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=868439a2074634b8a6b275c09fc33f20e42dd622;p=p5sagit%2Fp5-mst-13.2.git VOS tweaks from Paul Green. The Configure tweaks: the _exe needs to be set after the init; VOS has fd 3 hardwired to /dev/tty; the grep/ln/make substitutions really need to stick. p4raw-id: //depot/perl@13932 --- diff --git a/Configure b/Configure index 856aa39..dc47dc9 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Fri Dec 28 04:17:47 EET 2001 [metaconfig 3.0 PL70] +# Generated on Sat Dec 29 20:23:06 EET 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <mtry - echo "$run ./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry + echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry chmod +x mtry ./mtry >/dev/null 2>&1 case $? in diff --git a/hints/vos.sh b/hints/vos.sh index 037a6f3..7c3053f 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -10,17 +10,15 @@ # C compiler and default options. cc=gcc -ccflags="-D_BSD_SOURCE -D_POSIX_C_SOURCE=199509L" +ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L -I." # Make command. make="/system/gnu_library/bin/gmake" +_make="/system/gnu_library/bin/gmake" # Architecture name archname="hppa1.1" -# POSIX commands are here. -# paths="/system/gnu_library/bin" - # Executable suffix. # No, this is not a typo. The ".pm" really is the native # executable suffix in VOS. Talk about cosmic resonance. @@ -43,6 +41,7 @@ locincpth="$locincpth /system/stcp/include_library/arpa" locincpth="$locincpth /system/stcp/include_library/net" locincpth="$locincpth /system/stcp/include_library/netinet" locincpth="$locincpth /system/stcp/include_library/protocols" +locincpth="$locincpth /system/include_library/sysv" usrinc="/system/include_library" # Where to install perl5. @@ -68,3 +67,7 @@ yacc="/system/gnu_library/bin/bison" # VOS doesn't have (or need) a pager, but perl needs one. pager="/system/gnu_library/bin/cat.pm" + +# VOS has a bug that causes _exit() to flush all files. +# This confuses the tests. Make 'em happy here. +fflushNULL=define diff --git a/perl.h b/perl.h index dc7524e..87f5278 100644 --- a/perl.h +++ b/perl.h @@ -1789,7 +1789,7 @@ typedef struct clone_params CLONE_PARAMS; #endif #if defined(__VOS__) -# include "vosish.h" +# include "vos/vosish.h" # define ISHISH "vos" #endif diff --git a/util.c b/util.c index 3012de7..58cc1ff 100644 --- a/util.c +++ b/util.c @@ -30,6 +30,12 @@ # include #endif +#ifdef HAS_SELECT +# ifdef I_SYS_SELECT +# include +# endif +#endif + #define FLUSH #ifdef LEAKTEST diff --git a/vos/build.cm b/vos/build.cm index 0cf3cb9..4bdd976 100644 --- a/vos/build.cm +++ b/vos/build.cm @@ -32,6 +32,12 @@ &return 1 &end & +&if &compiler& = gcc & &version& = alpha +&then &do + &display_line build: "-compiler gcc" is incompatible with "-version alpha" + &return 1 + &end +& & Set up the appropriate directory suffix for each architecture. & &if &cpu& = mc68020 @@ -47,6 +53,10 @@ &then &set_string obj2 .68k &else &set_string obj2 &obj& & +&if &cpu& = mc68020 +&then &set_string bindsize -size large +&else &set_string bindsize '' +& &if &compiler& = cc &then &do &set_string cpu -processor &cpu& @@ -57,27 +67,14 @@ &set_string s .o &end & -& If requested, compile the source code. -& -&if &recompile& = 0 -&then &goto CHECK_REBIND -& -&if &version& = alpha -&then !set_library_paths include << < &POSIX&>incl &+ - (master_disk)>system>include_library -&else !set_library_paths include << < &+ - (master_disk)>system>stcp>include_library &+ - (master_disk)>system>include_library -& -&if (exists *.obj -link) -&then !unlink *.obj -no_ask -brief -& & Suppress several harmless compiler warning and advice messages. & Use -list -show_include all -show_macros both_ways when debugging. & +&set_string cflags -D_SVID_SOURCE -D_POSIX_C_SOURCE=199506L -DPERL_CORE -O4 +& &if &compiler& = cc -&then &set_string cflags '-O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE -u' -&else &set_string cflags '-O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE -c' +&then &set_string cflags &cflags& '-u' +&else &set_string cflags &cflags& '-c' & & The following is a work-around for stcp-1437,8,9 & @@ -89,9 +86,35 @@ &else &set_string diag '' & & The following is a work-around for stcp-1570 and GCC. +& (and for some perl errors that only cc finds) & &if &compiler& = gcc &then &set_string diag &diag& -w +&else &set_string diag &diag& -w1 +& +&if &version& = alpha +&then !set_library_paths include << < &POSIX&>incl &+ + (master_disk)>system>include_library +&else !set_library_paths include << < &+ + (master_disk)>system>stcp>include_library &+ + (master_disk)>system>include_library>sysv &+ + (master_disk)>system>include_library +& +&if &compiler& = gcc +&then !set_library_paths command '(current_dir)' &+ + (master_disk)>system>gnu_library>bin &+ + (master_disk)>system>command_library +&else !set_library_paths command '(current_dir)' &+ + (master_disk)>system>command_library +& +& If requested, compile the source code. +& +&if &recompile& = 0 +&then &goto CHECK_REBIND +& +& Some of the compiler invocations need more VM than +& the defaults allow. Raise the limits. +!update_process_cmd_limits -initial_total_limit 100000000 -no_ask & !&compiler& <net &+ &stcp_objlib&>sbsd &+ &stcp_objlib&>socket &+ + &posix_objlib&>sysv &+ &posix_objlib&>bsd &+ &posix_objlib& &+ &c_objlib& &objlib& @@ -249,9 +276,8 @@ &if &version& = alpha &then !bind -control tcp_runtime &tcp_objlib&>tcp_gethost &+ - &cpu& -target_module &tgt_mod& -map + &cpu& -target_module &tgt_mod& &bindsize& -map &else !bind -control */ -/*#define HAS_FD_SET /**/ +#define HAS_FD_SET /**/ /* HAS_FINITE: * This symbol, if defined, indicates that the finite routine is @@ -3400,6 +3394,12 @@ #define PERL_XS_APIVERSION "5.00563" #define PERL_PM_APIVERSION "5.005" +/* HAS_CRYPT: + * This symbol, if defined, indicates that the crypt routine is available + * to encrypt passwords and the like. + */ +/*#define HAS_CRYPT /**/ + /* SETUID_SCRIPTS_ARE_SECURE_NOW: * This symbol, if defined, indicates that the bug that prevents * setuid scripts from being secure is not present in this kernel. @@ -3503,6 +3503,11 @@ * This symbol is defined if PROCSELFEXE_PATH is a symlink * to the absolute pathname of the executing program. */ +/* PROCSELFEXE_PATH: + * If HAS_PROCSELFEXE is defined this symbol is the filename + * of the symbolic link pointing to the absolute pathname of + * the executing program. + */ /*#define HAS_PROCSELFEXE /**/ #if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH) #define PROCSELFEXE_PATH /**/ diff --git a/vos/config.ga.def b/vos/config.ga.def index 07262b3..ec18320 100644 --- a/vos/config.ga.def +++ b/vos/config.ga.def @@ -69,7 +69,7 @@ $d_fchmod='define' $d_fchown='undef' $d_fcntl='define' $d_fcntl_can_lock='define' -$d_fd_set='undef' +$d_fd_set='define' $d_fgetpos='define' $d_finite='undef' $d_finitel='undef' diff --git a/vos/config.ga.h b/vos/config.ga.h index 014c94d..974b6e1 100644 --- a/vos/config.ga.h +++ b/vos/config.ga.h @@ -88,12 +88,6 @@ #define const #endif -/* HAS_CRYPT: - * This symbol, if defined, indicates that the crypt routine is available - * to encrypt passwords and the like. - */ -/*#define HAS_CRYPT /**/ - /* HAS_CUSERID: * This symbol, if defined, indicates that the cuserid routine is * available to get character login names. @@ -1307,7 +1301,7 @@ * This symbol, when defined, indicates presence of the fd_set typedef * in */ -/*#define HAS_FD_SET /**/ +#define HAS_FD_SET /**/ /* HAS_FINITE: * This symbol, if defined, indicates that the finite routine is @@ -3400,6 +3394,12 @@ #define PERL_XS_APIVERSION "5.00563" #define PERL_PM_APIVERSION "5.005" +/* HAS_CRYPT: + * This symbol, if defined, indicates that the crypt routine is available + * to encrypt passwords and the like. + */ +/*#define HAS_CRYPT /**/ + /* SETUID_SCRIPTS_ARE_SECURE_NOW: * This symbol, if defined, indicates that the bug that prevents * setuid scripts from being secure is not present in this kernel. @@ -3503,6 +3503,11 @@ * This symbol is defined if PROCSELFEXE_PATH is a symlink * to the absolute pathname of the executing program. */ +/* PROCSELFEXE_PATH: + * If HAS_PROCSELFEXE is defined this symbol is the filename + * of the symbolic link pointing to the absolute pathname of + * the executing program. + */ /*#define HAS_PROCSELFEXE /**/ #if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH) #define PROCSELFEXE_PATH /**/ diff --git a/vos/vosish.h b/vos/vosish.h index d600065..8698213 100644 --- a/vos/vosish.h +++ b/vos/vosish.h @@ -1 +1,4 @@ #include "unixish.h" + +/* The following declaration is an avoidance for posix-950. */ +extern int ioctl (int fd, int request, ...);