summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-06 19:28:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-06 19:28:31 +0000
commitd308986b5b369caa1602a636a5e2ecfa149dfc89 (patch)
tree5e4539c17b4ffa8bb9cd7da74aa918d3204193f0
parent66fbe9e21b14c795ac9035c7be86e21c370a7532 (diff)
downloadperl-d308986b5b369caa1602a636a5e2ecfa149dfc89.tar.gz
use builtin __CYGWIN__ rather than -DCYGWIN (from Eric Fifer
<EFifer@sanwaint.com>) p4raw-id: //depot/perl@5008
-rw-r--r--EXTERN.h2
-rw-r--r--XSUB.h2
-rw-r--r--doio.c2
-rw-r--r--ext/POSIX/POSIX.xs4
-rw-r--r--ext/SDBM_File/sdbm/pair.c2
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c2
-rw-r--r--hints/cygwin.sh1
-rw-r--r--lib/ExtUtils/MM_Cygwin.pm1
-rw-r--r--mg.c4
-rw-r--r--perl.h2
-rw-r--r--unixish.h2
-rw-r--r--util.c6
12 files changed, 14 insertions, 16 deletions
diff --git a/EXTERN.h b/EXTERN.h
index c813f8112b..7601838d8b 100644
--- a/EXTERN.h
+++ b/EXTERN.h
@@ -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
diff --git a/XSUB.h b/XSUB.h
index 7e1c28c60c..cfcad5d595 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -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)
diff --git a/doio.c b/doio.c
index 3e412b8c2f..0463af8b3b 100644
--- a/doio.c
+++ b/doio.c
@@ -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}
diff --git a/mg.c b/mg.c
index f0c3bf3d8c..8d2e4e3d26 100644
--- a/mg.c
+++ b/mg.c
@@ -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;
diff --git a/perl.h b/perl.h
index 36a7cce62e..37ef3f1983 100644
--- a/perl.h
+++ b/perl.h
@@ -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
diff --git a/unixish.h b/unixish.h
index f4fe1779c0..492b24a401 100644
--- a/unixish.h
+++ b/unixish.h
@@ -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
diff --git a/util.c b/util.c
index 13b00102e3..d58b230fb7 100644
--- a/util.c
+++ b/util.c
@@ -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.