diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 07:22:51 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 07:22:51 +0000 |
commit | d0340efeaf607d2e70273b4fa22e5ee3b358abe8 (patch) | |
tree | 8187e35c8e61d21279785c869e1a5d92009e8e57 /ext/POSIX | |
parent | ab39fa9dbf3b1a1fb7beb555653d0558a089397f (diff) | |
parent | a1737d5b9df80320e5be59ab8fa7c96455d6b5bf (diff) | |
download | perl-d0340efeaf607d2e70273b4fa22e5ee3b358abe8.tar.gz |
[asperl] integrate mainline changes
p4raw-id: //depot/asperl@1055
Diffstat (limited to 'ext/POSIX')
-rw-r--r-- | ext/POSIX/POSIX.xs | 18 | ||||
-rw-r--r-- | ext/POSIX/hints/sunos_4.pl | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index c3bacb4e29..fd27b11623 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -30,9 +30,8 @@ #endif #include <setjmp.h> #include <signal.h> -#ifdef I_STDARG #include <stdarg.h> -#endif + #ifdef I_STDDEF #include <stddef.h> #endif @@ -51,7 +50,7 @@ #include <sys/types.h> #include <time.h> #ifdef I_UNISTD -#include <unistd.h> /* see hints/sunos_4_1.sh */ +#include <unistd.h> #endif #include <fcntl.h> @@ -115,6 +114,15 @@ # ifdef _MSC_VER # define mode_t short # endif +# ifdef __MINGW32__ +# define mode_t short +# ifndef tzset +# define tzset() not_here("tzset") +# endif +# ifndef _POSIX_OPEN_MAX +# define _POSIX_OPEN_MAX FOPEN_MAX /* XXX bogus ? */ +# endif +# endif # define sigaction(a,b,c) not_here("sigaction") # define sigpending(a) not_here("sigpending") # define sigprocmask(a,b,c) not_here("sigprocmask") @@ -262,13 +270,13 @@ unsigned long strtoul _((const char *, char **, int)); #define localeconv() not_here("localeconv") #endif -#ifndef WIN32 #ifdef HAS_TZNAME +# ifndef WIN32 extern char *tzname[]; +# endif #else char *tzname[] = { "" , "" }; #endif -#endif /* XXX struct tm on some systems (SunOS4/BSD) contains extra (non POSIX) * fields for which we don't have Configure support yet: diff --git a/ext/POSIX/hints/sunos_4.pl b/ext/POSIX/hints/sunos_4.pl index 59b45bc4f2..32b3558a5e 100644 --- a/ext/POSIX/hints/sunos_4.pl +++ b/ext/POSIX/hints/sunos_4.pl @@ -3,4 +3,8 @@ # This state of affairs also persists in glibc2, found # on linux systems running libc6. # XXX A Configure test is needed. -$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE' ; + +# Although <unistd.h> is inappropriate in general for SunOS, we need it +# in POSIX.xs to get the correct prototype for ttyname(). + +$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE -DI_UNISTD' ; |