diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-23 22:07:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-23 22:07:59 +0000 |
commit | 9ffcd8612a179e6a837df3e98019ae7fe24b4fa1 (patch) | |
tree | dcafddf02c4334012a4fcffeee5068685ff42b71 | |
parent | 360aca433d51a01ddd748b8606c6c288bdb2f7fc (diff) | |
parent | 3bdc27670282422f0788ccddd9711ae6cfe9bcd1 (diff) | |
download | perl-9ffcd8612a179e6a837df3e98019ae7fe24b4fa1.tar.gz |
integrate cfgperl changes into mainline
p4raw-id: //depot/perl@3131
-rwxr-xr-x | Configure | 19 | ||||
-rw-r--r-- | Makefile.SH | 3 | ||||
-rw-r--r-- | config_h.SH | 16 | ||||
-rwxr-xr-x | configure.gnu | 8 | ||||
-rw-r--r-- | ext/DynaLoader/dl_rhapsody.xs | 216 | ||||
-rw-r--r-- | handy.h | 4 | ||||
-rw-r--r-- | hints/rhapsody.sh | 54 | ||||
-rwxr-xr-x | installperl | 32 | ||||
-rw-r--r-- | malloc.c | 2 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | perl.h | 45 | ||||
-rw-r--r-- | pod/perl.pod | 55 | ||||
-rw-r--r-- | pod/perldelta.pod | 28 | ||||
-rw-r--r-- | pp_sys.c | 4 | ||||
-rwxr-xr-x | t/op/stat.t | 21 | ||||
-rw-r--r-- | x2p/util.c | 3 |
16 files changed, 439 insertions, 73 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Mar 4 00:05:11 EET 1999 [metaconfig 3.0 PL70] +# Generated on Mon Mar 15 18:36:13 EET 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <<EOF @@ -5313,7 +5313,8 @@ EOM useshrplib='true' # Why does next4 have to be so different? case "${osname}${osvers}" in - next4*) xxx='DYLD_LIBRARY_PATH' ;; + next4*|rhapsody*) + xxx='DYLD_LIBRARY_PATH' ;; os2*) xxx='' ;; # Nothing special needed. beos*) xxx='' ;; *) xxx='LD_LIBRARY_PATH' ;; @@ -8059,13 +8060,13 @@ eval $inlibc : see how we will look up host name echo " " -if false; then - : dummy stub to allow use of elif -elif set gethostname val -f d_gethname; eval $csym; $val; then +call='' +if set gethostname val -f d_gethname; eval $csym; $val; then echo 'gethostname() found.' >&4 d_gethname="$define" call=gethostname -elif set uname val -f d_uname; eval $csym; $val; then +fi +if set uname val -f d_uname; eval $csym; $val; then if ./xenix; then $cat <<'EOM' uname() was found, but you're running xenix, and older versions of xenix @@ -8085,7 +8086,9 @@ EOM else echo 'uname() found.' >&4 d_uname="$define" - call=uname + case "$call" in + '') call=uname ;; + esac fi fi case "$d_gethname" in @@ -10300,7 +10303,7 @@ case "$crosscompile" in esac case "$osname" in -next) multiarch="$define" ;; +next|rhapsody) multiarch="$define" ;; esac case "$multiarch" in ''|[nN]*) multiarch="$undef" ;; diff --git a/Makefile.SH b/Makefile.SH index 2530d4fdc5..22f70aee7d 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -43,6 +43,9 @@ true) # NeXT uses a different name. ldlibpth="DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH" ;; + rhapsody*) + ldlibpth="DYLD_LIBRARY_PATH=`pwd`/Perl:$DYLD_LIBRARY_PATH" + ;; os2*) # OS/2 doesn't need anything special for LD_LIBRARY_PATH. ldlibpth='' ;; diff --git a/config_h.SH b/config_h.SH index c0f032032b..ab0cb5318a 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1056,6 +1056,22 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$crosscompile CROSSCOMPILE /**/ +/* INTSIZE: + * This symbol contains the value of sizeof(int) so that the C + * preprocessor can make decisions based on it. + */ +/* LONGSIZE: + * This symbol contains the value of sizeof(long) so that the C + * preprocessor can make decisions based on it. + */ +/* SHORTSIZE: + * This symbol contains the value of sizeof(short) so that the C + * preprocessor can make decisions based on it. + */ +#define INTSIZE $intsize /**/ +#define LONGSIZE $longsize /**/ +#define SHORTSIZE $shortsize /**/ + /* MULTIARCH: * This symbol, if defined, signifies that the build * process will produce some binary files that are going to be diff --git a/configure.gnu b/configure.gnu index fa46532094..2ef8331833 100755 --- a/configure.gnu +++ b/configure.gnu @@ -111,6 +111,14 @@ case "$ccflags" in '') ;; *) opts="$opts -Dccflags='$ccflags'";; esac +case "$LDFLAGS" in +'') ;; +*) ldflags="$ldflags $LDFLAGS";; +esac +case "$ldflags" in +'') ;; +*) opts="$opts -Dldflags='$ldflags'";; +esac # Don't use -s if they want verbose mode case "$verbose" in diff --git a/ext/DynaLoader/dl_rhapsody.xs b/ext/DynaLoader/dl_rhapsody.xs new file mode 100644 index 0000000000..7513bf2620 --- /dev/null +++ b/ext/DynaLoader/dl_rhapsody.xs @@ -0,0 +1,216 @@ +/* dl_rhapsody.xs + * + * Platform: Apple Rhapsody 5.0 + * Based on: dl_next.xs by Paul Marquess + * Based on: dl_dlopen.xs by Anno Siegel + * Created: Aug 15th, 1994 + * + */ + +/* + And Gandalf said: 'Many folk like to know beforehand what is to + be set on the table; but those who have laboured to prepare the + feast like to keep their secret; for wonder makes the words of + praise louder.' +*/ + +/* Porting notes: + +dl_next.xs is itself a port from dl_dlopen.xs by Paul Marquess. It +should not be used as a base for further ports though it may be used +as an example for how dl_dlopen.xs can be ported to other platforms. + +The method used here is just to supply the sun style dlopen etc. +functions in terms of NeXTs rld_*. The xs code proper is unchanged +from Paul's original. + +The port could use some streamlining. For one, error handling could +be simplified. + +Anno Siegel + +*/ + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#define DL_LOADONCEONLY + +#include "dlutils.c" /* SaveError() etc */ + +#undef environ +#import <mach-o/dyld.h> + +static char * dl_last_error = (char *) 0; +static AV *dl_resolve_using = Nullav; + +static char *dlerror() +{ + return dl_last_error; +} + +int dlclose(handle) /* stub only */ +void *handle; +{ + return 0; +} + +enum dyldErrorSource +{ + OFImage, +}; + +static void TranslateError + (const char *path, enum dyldErrorSource type, int number) +{ + char *error; + unsigned int index; + static char *OFIErrorStrings[] = + { + "%s(%d): Object Image Load Failure\n", + "%s(%d): Object Image Load Success\n", + "%s(%d): Not an recognisable object file\n", + "%s(%d): No valid architecture\n", + "%s(%d): Object image has an invalid format\n", + "%s(%d): Invalid access (permissions?)\n", + "%s(%d): Unknown error code from NSCreateObjectFileImageFromFile\n", + }; +#define NUM_OFI_ERRORS (sizeof(OFIErrorStrings) / sizeof(OFIErrorStrings[0])) + + switch (type) + { + case OFImage: + index = number; + if (index > NUM_OFI_ERRORS - 1) + index = NUM_OFI_ERRORS - 1; + error = form(OFIErrorStrings[index], path, number); + break; + + default: + error = form("%s(%d): Totally unknown error type %d\n", + path, number, type); + break; + } + safefree(dl_last_error); + dl_last_error = savepv(error); +} + +static char *dlopen(char *path, int mode /* mode is ignored */) +{ + int dyld_result; + NSObjectFileImage ofile; + NSModule handle = NULL; + + dyld_result = NSCreateObjectFileImageFromFile(path, &ofile); + if (dyld_result != NSObjectFileImageSuccess) + TranslateError(path, OFImage, dyld_result); + else + { + // NSLinkModule will cause the run to abort on any link error's + // not very friendly but the error recovery functionality is limited. + handle = NSLinkModule(ofile, path, TRUE); + } + + return handle; +} + +void * +dlsym(handle, symbol) +void *handle; +char *symbol; +{ + void *addr; + + if (NSIsSymbolNameDefined(symbol)) + addr = NSAddressOfSymbol(NSLookupAndBindSymbol(symbol)); + else + addr = NULL; + + return addr; +} + + + +/* ----- code from dl_dlopen.xs below here ----- */ + + +static void +dl_private_init() +{ + (void)dl_generic_private_init(); + dl_resolve_using = perl_get_av("DynaLoader::dl_resolve_using", 0x4); +} + +MODULE = DynaLoader PACKAGE = DynaLoader + +BOOT: + (void)dl_private_init(); + + + +void * +dl_load_file(filename, flags=0) + char * filename + int flags + PREINIT: + int mode = 1; + CODE: + DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", filename,flags)); + if (flags & 0x01) + warn("Can't make loaded symbols global on this platform while loading %s",filename); + RETVAL = dlopen(filename, mode) ; + DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " libref=%x\n", RETVAL)); + ST(0) = sv_newmortal() ; + if (RETVAL == NULL) + SaveError("%s",dlerror()) ; + else + sv_setiv( ST(0), (IV)RETVAL); + + +void * +dl_find_symbol(libhandle, symbolname) + void * libhandle + char * symbolname + CODE: + symbolname = form("_%s", symbolname); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + "dl_find_symbol(handle=%lx, symbol=%s)\n", + (unsigned long) libhandle, symbolname)); + RETVAL = dlsym(libhandle, symbolname); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + " symbolref = %lx\n", (unsigned long) RETVAL)); + ST(0) = sv_newmortal() ; + if (RETVAL == NULL) + SaveError("%s",dlerror()) ; + else + sv_setiv( ST(0), (IV)RETVAL); + + +void +dl_undef_symbols() + PPCODE: + + + +# These functions should not need changing on any platform: + +void +dl_install_xsub(perl_name, symref, filename="$Package") + char * perl_name + void * symref + char * filename + CODE: + DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_install_xsub(name=%s, symref=%x)\n", + perl_name, symref)); + ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)())symref, filename))); + + +char * +dl_error() + CODE: + RETVAL = LastError ; + OUTPUT: + RETVAL + ++# end. @@ -54,7 +54,7 @@ /* The NeXT dynamic loader headers will not build with the bool macro So declare them now to clear confusion. */ -#ifdef NeXT +#if defined(NeXT) || defined(__NeXT__) # undef FALSE # undef TRUE typedef enum bool { FALSE = 0, TRUE = 1 } bool; @@ -62,7 +62,7 @@ # ifndef HAS_BOOL # define HAS_BOOL 1 # endif /* !HAS_BOOL */ -#endif /* NeXT */ +#endif /* NeXT || __NeXT__ */ #ifndef HAS_BOOL # if defined(UTS) || defined(VMS) diff --git a/hints/rhapsody.sh b/hints/rhapsody.sh new file mode 100644 index 0000000000..7f652234c7 --- /dev/null +++ b/hints/rhapsody.sh @@ -0,0 +1,54 @@ +## +# Rhapsody (Mac OS X Server) hints +# Wilfredo Sanchez <wsanchez@apple.com> +## + +# Since we can build fat, the archname doesn't need the processor type +archname='rhapsody'; + +# Perl5.003 precedes this platform +d_bincompat3='undef'; + +# Libc is in libsystem. +libc='/System/Library/Frameworks/System.framework/System'; + +# nm works. +usenm='true'; + +# Optimize. +optimize='-O3'; + +# We have a prototype for telldir. +# We are not NeXTStep. +ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -UNeXT -U__NeXT__"; + +# Don't use /usr/local/lib; we may have junk there. +libpth='/lib /usr/lib'; + +# Shared library extension in .dylib. +# Bundle extension in .bundle. +ld='cc'; +so='dylib'; +dlext='bundle'; +dlsrc='dl_rhapsody.xs'; +cccdlflags=''; +lddlflags="${ldflags} -bundle -undefined suppress"; +useshrplib='true'; +libperl='Perl'; +framework_path='/System/Library/Frameworks/Perl.framework'; +base_address='0x4be00000'; + +# 4BSD uses /usr/share/man, not /usr/man. +# Don't put man pages in /usr/lib; that's goofy. +man1dir='/usr/share/man/man1'; +man3dir='/usr/share/man/man3'; + +# Where to put modules. +privlib='/System/Library/Perl'; +sitelib='/Local/Library/Perl'; + +# vfork works +usevfork='true'; + +# malloc works +usemymalloc='n'; diff --git a/installperl b/installperl index ac2cf82241..93b9947d94 100755 --- a/installperl +++ b/installperl @@ -173,6 +173,7 @@ elsif ($^O eq 'mpeix') { elsif ($^O ne 'dos') { safe_unlink("$installbin/$perl$ver$exe_ext"); copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext"); + strip("$installbin/perl$ver$exe_ext") if $^O =~ /^(rhapsody)$; chmod(0755, "$installbin/$perl$ver$exe_ext"); } else { @@ -232,9 +233,14 @@ else { foreach my $file (@corefiles) { # HP-UX (at least) needs to maintain execute permissions # on dynamically-loadable libraries. So we do it for all. - copy_if_diff($file,"$installarchlib/CORE/$file") - and chmod($file =~ /\.(so|\Q$dlext\E)$/ ? 0555 : 0444, - "$installarchlib/CORE/$file"); + if (copy_if_diff($file,"$installarchlib/CORE/$file")) { + if ($file =~ /\.(so|\Q$dlext\E)$/) { + chmod(0555, "$installarchlib/CORE/$file"); + strip("-S", "$installarchlib/CORE/$file") if $^O =~ /^(rhapsody)$; + } else { + chmod(0444, "$installarchlib/CORE/$file"); + } + } } # Install main perl executables @@ -603,3 +609,23 @@ sub copy_if_diff { 1; } } + +sub strip +{ + my(@args) = @_; + + my @opts; + while (@args && $args[0] =~ /^(-\w+)$/) { + push @opts, shift @args; + } + + foreach my $file (@args) { + if (-f $file) { + print STDERR " strip $file\n"; + system("strip", @opts, $file); + } else { + print STDERR "# file '$file' skipped\n"; + } + } +} + @@ -1727,7 +1727,7 @@ dump_mstats(char *s) #ifdef USE_PERL_SBRK -# if defined(__MACHTEN_PPC__) || defined(__NeXT__) +# if defined(__MACHTEN_PPC__) || defined(NeXT) || defined(__NeXT__) # define PERL_SBRK_VIA_MALLOC /* * MachTen's malloc() returns a buffer aligned on a two-byte boundary. @@ -658,7 +658,7 @@ setuid perl scripts securely.\n"); return 255; #endif -#if defined(NeXT) && defined(__DYNAMIC__) +#if defined(__DYNAMIC__) && (defined(NeXT) || defined(__NeXT__)) _dyld_lookup_and_bind ("__environ", (unsigned long *) &environ_pointer, NULL); #endif /* environ */ @@ -650,7 +650,8 @@ Free_t Perl_mfree _((Malloc_t where)); /* Configure already sets Direntry_t */ #if defined(I_DIRENT) # include <dirent.h> -# if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */ + /* NeXT needs dirent + sys/dir.h */ +# if defined(I_SYS_DIR) && (defined(NeXT) || defined(__NeXT__)) # include <sys/dir.h> # endif #else @@ -1380,7 +1381,7 @@ typedef I32 (*filter_t) _((int, SV *, int)); # else # ifdef I_MACH_CTHREADS # include <mach/cthreads.h> -# if defined(__NeXT__) && defined(PERL_POLLUTE_MALLOC) +# if (defined(NeXT) || defined(__NeXT__)) && defined(PERL_POLLUTE_MALLOC) # define MUTEX_INIT_CALLS_MALLOC # endif typedef cthread_t perl_os_thread; @@ -1775,13 +1776,13 @@ END_EXTERN_C #endif #ifndef __cplusplus -# ifdef __NeXT__ /* or whatever catches all NeXTs */ +# if defined(NeXT) || defined(__NeXT__) /* or whatever catches all NeXTs */ char *crypt (); /* Maybe more hosts will need the unprototyped version */ # else # if !defined(WIN32) || !defined(HAVE_DES_FCRYPT) char *crypt _((const char*, const char*)); # endif /* !WIN32 && !HAVE_CRYPT_SOURCE */ -# endif /* !__NeXT__ */ +# endif /* !NeXT && !__NeXT__ */ # ifndef DONT_DECLARE_STD # ifndef getenv char *getenv _((const char*)); @@ -1870,26 +1871,32 @@ int runops_debug _((void)); #endif #endif - /* _ (for $_) must be first in the following list (DEFSV requires it) */ #define THREADSV_NAMES "_123456789&`'+/.,\\\";^-%=|~:\001\005!@" -/* VMS doesn't use environ array and NeXT has problems with crt0.o globals */ -#if !defined(VMS) && !(defined(NeXT) && defined(__DYNAMIC__)) -#if !defined(DONT_DECLARE_STD) \ - || (defined(__svr4__) && defined(__GNUC__) && defined(sun)) \ - || defined(__sgi) || defined(__DGUX) -extern char ** environ; /* environment variables supplied via exec */ -#endif -#else -# if defined(NeXT) && defined(__DYNAMIC__) - -# include <mach-o/dyld.h> +/* NeXT has problems with crt0.o globals */ +#if defined(__DYNAMIC__) && \ + (defined(NeXT) || defined(__NeXT__) || defined(__APPLE__)) +# if defined(NeXT) || defined(__NeXT) +# include <mach-o/dyld.h> +# define environ (*environ_pointer) EXT char *** environ_pointer; -# define environ (*environ_pointer) +# else +# if defined(__APPLE__) +# include <crt_externs.h> /* for the env array */ +# define environ (*_NSGetEnviron()) +# endif # endif -#endif /* environ processing */ - +#else + /* VMS and some other platforms don't use the environ array */ +# if !defined(VMS) || \ + !defined(DONT_DECLARE_STD) || \ + (defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \ + defined(__sgi) || \ + defined(__DGUX) +extern char ** environ; /* environment variables supplied via exec */ +# endif +#endif /* handy constants */ EXTCONST char PL_warn_uninit[] diff --git a/pod/perl.pod b/pod/perl.pod index 15d8f0e734..6605097689 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -255,45 +255,48 @@ The following platforms are able to build Perl from the standard source code distribution available at F<http://www.perl.com/CPAN/src/index.html> - AIX IRIX SCO ODT/OSR - A/UX Linux Solaris - BeOS MachTen SunOS - BSD/OS MPE/iX SVR4 - DG/UX NetBSD Ultrix - Digital UNIX NextSTEP UNICOS - DOS DJGPP 1) OpenBSD VMS - DYNIX/ptx OpenSTEP Windows 3.1 1) - FreeBSD OS/2 Windows 95 1) 3) - HP-UX OS390 2) Windows 98 1) 3) - Hurd PowerMAX Windows NT 1) 3) - QNX VOS + AIX Linux SCO ODT/OSR + A/UX MachTen Solaris + BeOS MPE/iX SunOS + BSD/OS NetBSD SVR4 + DG/UX NextSTEP Tru64 UNIX 3) + DomainOS OpenBSD Ultrix + DOS DJGPP 1) OpenSTEP UNICOS + DYNIX/ptx OS/2 VMS + FreeBSD OS390 2) VOS + HP-UX PowerMAX Windows 3.1 1) + Hurd QNX Windows 95 1) 4) + IRIX Windows 98 1) 4) + Windows NT 1) 4) 1) in DOS mode either the DOS or OS/2 ports can be used - 2) formerly known as MVS - 3) compilers: Borland, Cygwin32, Mingw32 EGCS/GCC, VC++ - + 2) formerly known as MVS + 3) formerly known as Digital UNIX and before that DEC OSF/1 + 4) compilers: Borland, Cygwin32, Mingw32 EGCS/GCC, VC++ + The following platforms have been known to build Perl from the source but for the Perl release 5.005_03 we haven't been able to verify them, either because the hardware/software platforms are rather rare or because we don't have an active champion on these platforms, or both. 3b1 FPS Plan 9 - AmigaOS GENIX RISC/os - ConvexOS Greenhills Stellar - CX/UX ISC SVR2 - DC/OSx MachTen 68k TI1500 - DDE SMES MiNT TitanOS - DomainOS MPC UNICOS/mk - DOS EMX NEWS-OS Unisys Dynix - Dynix Opus Unixware - EP/IX - ESIX + AmigaOS GENIX PowerUX + ConvexOS Greenhills RISC/os + CX/UX ISC Stellar + DC/OSx MachTen 68k SVR2 + DDE SMES MiNT TI1500 + DOS EMX MPC TitanOS + Dynix NEWS-OS UNICOS/mk + EP/IX Opus Unisys Dynix + ESIX Unixware The following platforms are planned to be supported in the standard source code distribution of the Perl release 5.006 but are not supported in the Perl release 5.005_03: BS2000 + Netware + Rhapsody VM/ESA The following platforms have their own source code distributions and @@ -303,6 +306,7 @@ binaries available via F<http://www.perl.com/CPAN/ports/index.html>. AS/400 5.003 MacOS 5.004 + Netware 5.003_07 Tandem Guardian 5.004 The following platforms have only binaries available via @@ -313,7 +317,6 @@ F<http://www.perl.com/CPAN/ports/index.html>. Acorn RISCOS 5.005_02 AOS 5.002 LynxOS 5.004_02 - Netware 5.003_07 =head1 ENVIRONMENT diff --git a/pod/perldelta.pod b/pod/perldelta.pod index da35322646..14ba3dcd7b 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -238,6 +238,10 @@ extension. GNU/Hurd is now supported. +=item * + +Rhapsody is now supported. + =back =head1 New tests @@ -286,8 +290,22 @@ Added Dumpvalue module provides screen dumps of Perl data. =item Benchmark -You can now run tests for I<x> seconds instead of guessing the right -number of tests to run. +You can now run tests for I<n> seconds instead of guessing the right +number of tests to run: e.g. timethese(-5, ...) will run each of the +codes for at least 5 CPU seconds. Zero as the "number of repetitions" +means "for at least 3 CPU seconds". The output format has also +changed. For example: + +use Benchmark;$x=3;timethese(-5,{a=>sub{$x*$x},b=>sub{$x**2}}) + +will now output something like this: + +Benchmark: running a, b, each for at least 5 CPU seconds... + a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516) + b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686) + +New features: "each for at least N CPU seconds...", "wallclock secs", +and the "@ operations/CPU second (n=operations)". =item Fcntl @@ -299,13 +317,13 @@ O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR. =item Math::Complex -The accessors methods Re, Im, arg, abs, rho, theta, methods can -($z->Re()) now also act as mutators ($z->Re(3)). +The accessor methods Re, Im, arg, abs, rho, and theta, can now also +act as mutators (accessor $z->Re(), mutator $z->Re(3)). =item Math::Trig A little bit of radial trigonometry (cylindrical and spherical) added, -for example the great circle distance. +radial coordinate conversions and the great circle distance. =item Time::Local @@ -869,8 +869,8 @@ PP(pp_sselect) /* If SELECT_MIN_BITS is greater than one we most probably will want * to align the sizes with SELECT_MIN_BITS/8 because for example * in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital - * UNIX, Solaris, NeXT) the smallest quantum select() operates on - * (sets bit) is 32 bits. */ + * UNIX, Solaris, NeXT, Rhapsody) the smallest quantum select() operates + * on (sets/tests/clears bits) is 32 bits. */ growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); # else growsize = sizeof(fd_set); diff --git a/t/op/stat.t b/t/op/stat.t index e989064f1a..6f2d00b7e6 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -184,14 +184,23 @@ unless($ENV{PERL_SKIP_TTY_TEST}) { print "ok 37\n"; } else { - unless (open(tty,"/dev/tty")) { - print STDERR "Can't open /dev/tty--run t/TEST outside of make.\n"; + my $TTY = "/dev/tty"; + + $TTY = "/dev/ttyp0" if $^O eq 'rhapsody'; + + if (defined $TTY) { + unless (open(TTY, $TTY)) { + print STDERR "Can't open $TTY--run t/TEST outside of make.\n"; + } + if (-t TTY) {print "ok 36\n";} else {print "not ok 36\n";} + if (-c TTY) {print "ok 37\n";} else {print "not ok 37\n";} + close(TTY); + } else { # if some platform completely undefines $TTY + print "ok 36 # skipped\n"; + print "ok 37 # skipped\n"; } - if (-t tty) {print "ok 36\n";} else {print "not ok 36\n";} - if (-c tty) {print "ok 37\n";} else {print "not ok 37\n";} - close(tty); } - if (! -t tty) {print "ok 38\n";} else {print "not ok 38\n";} + if (! -t TTY) {print "ok 38\n";} else {print "not ok 38\n";} if (-t) {print "ok 39\n";} else {print "not ok 39\n";} } else { diff --git a/x2p/util.c b/x2p/util.c index 364dfe94fa..d43a1eb723 100644 --- a/x2p/util.c +++ b/x2p/util.c @@ -203,6 +203,9 @@ fatal(char *pat,...) exit(1); } +#if defined(__APPLE_CC__) +__private_extern__ /* warn() conflicts with libc */ +#endif void warn(char *pat,...) { |