This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use builtin __CYGWIN__ rather than -DCYGWIN (from Eric Fifer
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 6 Feb 2000 19:28:31 +0000 (19:28 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 6 Feb 2000 19:28:31 +0000 (19:28 +0000)
<EFifer@sanwaint.com>)

p4raw-id: //depot/perl@5008

12 files changed:
EXTERN.h
XSUB.h
doio.c
ext/POSIX/POSIX.xs
ext/SDBM_File/sdbm/pair.c
ext/SDBM_File/sdbm/sdbm.c
hints/cygwin.sh
lib/ExtUtils/MM_Cygwin.pm
mg.c
perl.h
unixish.h
util.c

index c813f81..7601838 100644 (file)
--- 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 7e1c28c..cfcad5d 100644 (file)
--- 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 3e412b8..0463af8 100644 (file)
--- 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, 
index 4c96f12..af43c40 100644 (file)
    }
 #  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
index c2ed213..4f0fde2 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "config.h"
-#ifdef CYGWIN
+#ifdef __CYGWIN__
 # define EXTCONST extern const
 #else
 # include "EXTERN.h"
index 5952d71..f58f448 100644 (file)
@@ -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) {
index ebe8618..4843200 100644 (file)
@@ -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'
 
index 7a92290..a5ba410 100644 (file)
@@ -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 f0c3bf3..8d2e4e3 100644 (file)
--- 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 36a7cce..37ef3f1 100644 (file)
--- 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
index f4fe177..492b24a 100644 (file)
--- a/unixish.h
+++ b/unixish.h
 #  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 13b0010..d58b230 100644 (file)
--- 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.