expect.c, [...] (unix sections): Guard with "__unix__" instead of "unix".
authorOlivier Hainque <hainque@act-europe.fr>
Wed, 27 Oct 2004 12:28:44 +0000 (14:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Oct 2004 12:28:44 +0000 (14:28 +0200)
2004-10-26  Olivier Hainque  <hainque@act-europe.fr>
    Nicolas Setton  <setton@act-europe.fr>

* expect.c, adaint.c, link.c, sysdep.c (unix sections): Guard with
"__unix__" instead of "unix".
The latter is implicitly defined by gcc3.2 but not by gcc >= 3.4, so the
sections were just mistakenly ignored. The former is
implicitely defined by gcc2.8, gcc3.2 and gcc3.4.
Update #ifdef preprocessor macro to detect the symbol __hpux__ instead
of hpux. This prevents an unwanted definition of the symbol
convert_addresses in adaint.o.

From-SVN: r89642

gcc/ada/adaint.c
gcc/ada/expect.c
gcc/ada/link.c
gcc/ada/sysdep.c

index 69b25e25bc9e62b162d50fbe958f0ab0ca20cfad..c1b85a07616e77d48283a9ed7be322aa90b6b569 100644 (file)
@@ -1512,7 +1512,7 @@ __gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED)
 #if defined (__vxworks)
   return 0;
 
-#elif defined (_AIX) || defined (unix)
+#elif defined (_AIX) || defined (__unix__)
   int ret;
   struct stat statbuf;
 
@@ -2441,7 +2441,7 @@ _flush_cache()
   || (! (defined (sparc) && defined (sun) && defined (__SVR4)) \
       && ! (defined (linux) && defined (i386)) \
       && ! defined (__FreeBSD__) \
-      && ! defined (hpux) \
+      && ! defined (__hpux__) \
       && ! defined (_AIX) \
       && ! (defined (__alpha__)  && defined (__osf__)) \
       && ! defined (__MINGW32__) \
index 54952268517a9d27ae8d815310065cc90ed7c49a..9c76ba5c363c6f847568bc5fc437a9248bee6a93 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *           Copyright (C) 2001-2003 Ada Core Technologies, Inc.            *
+ *           Copyright (C) 2001-2004 Ada Core Technologies, Inc.            *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -49,8 +49,8 @@
    Dummy stubs are also provided for other systems. */
 
 #ifdef _AIX
-/* Work around the fact that gcc/cpp does not define "unix" under AiX.  */
-#define unix
+/* Work around the fact that gcc/cpp does not define "__unix__" under AiX.  */
+#define __unix__
 #endif
 
 #ifdef _WIN32
@@ -265,9 +265,9 @@ __gnat_expect_poll (int *fd, int num_fd, int timeout, int *is_set)
   return ready;
 }
 
-#elif defined (unix)
+#elif defined (__unix__)
 
-#ifdef hpux
+#ifdef __hpux__
 #include <sys/ptyio.h>
 #endif
 
@@ -359,7 +359,7 @@ __gnat_expect_poll (int *fd, int num_fd, int timeout, int *is_set)
              is_set[i] = 0;
          }
 
-#ifdef hpux
+#ifdef __hpux__
         for (i = 0; i < num_fd; i++)
          {
            if (FD_ISSET (fd[i], &eset))
index 70b349f5482881a670fa2f54dda57e33db6bba7d..cc415ad0f0df6408ffda4c5f74dabcdf769478e1 100644 (file)
@@ -117,7 +117,7 @@ char __gnat_shared_libgnat_default = STATIC;
 unsigned char __gnat_using_gnu_linker = 1;
 const char *__gnat_object_library_extension = ".a";
 
-#elif defined (hpux)
+#elif defined (__hpux__)
 const char *__gnat_object_file_option = "-Wl,-c,";
 const char *__gnat_run_path_option = "-Wl,+b,";
 int __gnat_link_max = 5000;
index fcca318c7f5c51d164205d1fe97ba22af53648cf..e18fb2276e127e96f89b8c97a602745d105cafda 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2003 Free Software Foundation, Inc.          *
+ *          Copyright (C) 1992-2004 Free Software Foundation, Inc.          *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -289,7 +289,7 @@ __gnat_ttyname (int filedes)
 \f
 #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
   || (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \
-  || defined (__MACHTEN__) || defined (hpux) || defined (_AIX) \
+  || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
   || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
   || defined (__CYGWIN__) || defined (__FreeBSD__)
 
@@ -346,7 +346,7 @@ getc_immediate_common (FILE *stream,
 {
 #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
     || (defined (__osf__) && ! defined (__alpha_vxworks)) \
-    || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (hpux) \
+    || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
     || defined (_AIX) || (defined (__svr4__) && defined (i386)) \
     || defined (__Lynx__) || defined (__FreeBSD__)
   char c;
@@ -365,7 +365,7 @@ getc_immediate_common (FILE *stream,
       termios_rec.c_lflag = termios_rec.c_lflag & ~ICANON & ~ECHO;
 
 #if defined(linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
-    || defined (__osf__) || defined (__MACHTEN__) || defined (hpux) \
+    || defined (__osf__) || defined (__MACHTEN__) || defined (__hpux__) \
     || defined (_AIX) || (defined (__svr4__) && defined (i386)) \
     || defined (__Lynx__) || defined (__FreeBSD__)
       eof_ch = termios_rec.c_cc[VEOF];