diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 19:28:31 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 19:28:31 +0000 |
commit | d308986b5b369caa1602a636a5e2ecfa149dfc89 (patch) | |
tree | 5e4539c17b4ffa8bb9cd7da74aa918d3204193f0 | |
parent | 66fbe9e21b14c795ac9035c7be86e21c370a7532 (diff) | |
download | perl-d308986b5b369caa1602a636a5e2ecfa149dfc89.tar.gz |
use builtin __CYGWIN__ rather than -DCYGWIN (from Eric Fifer
<EFifer@sanwaint.com>)
p4raw-id: //depot/perl@5008
-rw-r--r-- | EXTERN.h | 2 | ||||
-rw-r--r-- | XSUB.h | 2 | ||||
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 4 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm/pair.c | 2 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm/sdbm.c | 2 | ||||
-rw-r--r-- | hints/cygwin.sh | 1 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Cygwin.pm | 1 | ||||
-rw-r--r-- | mg.c | 4 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | unixish.h | 2 | ||||
-rw-r--r-- | util.c | 6 |
12 files changed, 14 insertions, 16 deletions
@@ -40,7 +40,7 @@ # define dEXTCONST const # endif # else -# if defined(CYGWIN) && defined(USEIMPORTLIB) +# if defined(__CYGWIN__) && defined(USEIMPORTLIB) # define EXT extern __declspec(dllimport) # define dEXT # define EXTCONST extern __declspec(dllimport) const @@ -47,7 +47,7 @@ handled automatically by C<xsubpp>. #define ST(off) PL_stack_base[ax + (off)] -#if defined(CYGWIN) && defined(USE_DYNAMIC_LOADING) +#if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) # define XS(name) __declspec(dllexport) void name(pTHXo_ CV* cv) #else # define XS(name) void name(pTHXo_ CV* cv) @@ -573,7 +573,7 @@ Perl_nextargv(pTHX_ register GV *gv) } #endif #ifdef HAS_RENAME -#if !defined(DOSISH) && !defined(CYGWIN) +#if !defined(DOSISH) && !defined(__CYGWIN__) if (PerlLIO_rename(PL_oldname,SvPVX(sv)) < 0) { if (ckWARN_d(WARN_INPLACE)) Perl_warner(aTHX_ WARN_INPLACE, diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 4c96f12e4f..af43c40714 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -106,7 +106,7 @@ } # define times(t) vms_times(t) #else -#if defined (CYGWIN) +#if defined (__CYGWIN__) # define tzname _tzname #endif #if defined (WIN32) @@ -289,7 +289,7 @@ unsigned long strtoul (const char *, char **, int); #endif #ifdef HAS_TZNAME -# if !defined(WIN32) && !defined(CYGWIN) +# if !defined(WIN32) && !defined(__CYGWIN__) extern char *tzname[]; # endif #else diff --git a/ext/SDBM_File/sdbm/pair.c b/ext/SDBM_File/sdbm/pair.c index c2ed213036..4f0fde2302 100644 --- a/ext/SDBM_File/sdbm/pair.c +++ b/ext/SDBM_File/sdbm/pair.c @@ -8,7 +8,7 @@ */ #include "config.h" -#ifdef CYGWIN +#ifdef __CYGWIN__ # define EXTCONST extern const #else # include "EXTERN.h" diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c index 5952d719e7..f58f4487c8 100644 --- a/ext/SDBM_File/sdbm/sdbm.c +++ b/ext/SDBM_File/sdbm/sdbm.c @@ -128,7 +128,7 @@ sdbm_prep(char *dirname, char *pagname, int flags, int mode) * open the files in sequence, and stat the dirfile. * If we fail anywhere, undo everything, return NULL. */ -#if defined(OS2) || defined(MSDOS) || defined(WIN32) || defined(CYGWIN) +#if defined(OS2) || defined(MSDOS) || defined(WIN32) || defined(__CYGWIN__) flags |= O_BINARY; # endif if ((db->pagf = open(pagname, flags, mode)) > -1) { diff --git a/hints/cygwin.sh b/hints/cygwin.sh index ebe861888b..4843200f85 100644 --- a/hints/cygwin.sh +++ b/hints/cygwin.sh @@ -21,7 +21,6 @@ so='dll' # - eliminate -lc, implied by gcc libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` libswanted="$libswanted cygipc cygwin kernel32" -ccflags="$ccflags -DCYGWIN" # - otherwise i686-cygwin archname='cygwin' diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 7a92290664..a5ba410fdc 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -24,7 +24,6 @@ sub cflags { / *= */ and $self->{$`} = $'; }; $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true'); - $self->{CCFLAGS} .= " -DCYGWIN" unless ($self->{CCFLAGS} =~ /\-DCYGWIN/); return $self->{CFLAGS} = qq{ CCFLAGS = $self->{CCFLAGS} @@ -916,7 +916,7 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg) } FreeEnvironmentStrings(envv); # else -# ifdef CYGWIN +# ifdef __CYGWIN__ I32 i; for (i = 0; environ[i]; i++) safesysfree(environ[i]); @@ -930,7 +930,7 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg) for (i = 0; environ[i]; i++) safesysfree(environ[i]); # endif /* PERL_USE_SAFE_PUTENV */ -# endif /* CYGWIN */ +# endif /* __CYGWIN__ */ environ[0] = Nullch; @@ -1712,7 +1712,7 @@ typedef pthread_key_t perl_key; # endif #endif -#if defined(CYGWIN) +#if defined(__CYGWIN__) /* USEMYBINMODE * This symbol, if defined, indicates that the program should * use the routine my_binmode(FILE *fp, char iotype) to insure @@ -122,7 +122,7 @@ # ifdef POSIX_BC # define PERL_SYS_INIT(c,v) sigignore(SIGFPE); MALLOC_INIT # else -# ifdef CYGWIN +# ifdef __CYGWIN__ # define PERL_SYS_INIT(c,v) Perl_my_setenv_init(&environ); MALLOC_INIT # else # define PERL_SYS_INIT(c,v) MALLOC_INIT @@ -1881,7 +1881,7 @@ Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args) } #ifndef VMS /* VMS' my_setenv() is in VMS.c */ -#if !defined(WIN32) && !defined(CYGWIN) +#if !defined(WIN32) && !defined(__CYGWIN__) void Perl_my_setenv(pTHX_ char *nam, char *val) { @@ -1931,8 +1931,8 @@ Perl_my_setenv(pTHX_ char *nam, char *val) #endif /* PERL_USE_SAFE_PUTENV */ } -#else /* WIN32 || CYGWIN */ -#if defined(CYGWIN) +#else /* WIN32 || __CYGWIN__ */ +#if defined(__CYGWIN__) /* * Save environ of perl.exe, currently Cygwin links in separate environ's * for each exe/dll. Probably should be a member of impure_ptr. |