aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/terminals.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-30 21:13:59 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-05-30 21:13:59 +0000
commit329be64b06b51c21981dc9aba66da805dc4398bf (patch)
tree939ed8411c661f6e8dcf7ab478a1cc1abfa98185 /gcc/ada/terminals.c
parentc67e8801d95237cf126a5b8ad6c2f59fc92c455a (diff)
downloadgcc-329be64b06b51c21981dc9aba66da805dc4398bf.zip
gcc-329be64b06b51c21981dc9aba66da805dc4398bf.tar.gz
gcc-329be64b06b51c21981dc9aba66da805dc4398bf.tar.bz2
adaint.c: Test for __linux__ instead of linux and __sun__ instead of sun.
* adaint.c: Test for __linux__ instead of linux and __sun__ instead of sun. Add missing leading underscore to AIX. Remove #elif 0. * adaint.h: Likewise. * cio.c: Likewise. * cstreams.c: Likewise. * env.c: Likewise. * gsocket.h: Likewise. * init.c: Likewise. Test for __i386__ instead of i386. * link.c: Likewise. * s-oscons-tmplt.c: Likewise. * sysdep.c: Likewise. * terminals.c: Likewise. Use BSD symbol instead of FREEBSD. * tracebak.c: Likewise. Test for __sparc__ instead of sparc. From-SVN: r223890
Diffstat (limited to 'gcc/ada/terminals.c')
-rw-r--r--gcc/ada/terminals.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index e44063b..69fe358 100644
--- a/gcc/ada/terminals.c
+++ b/gcc/ada/terminals.c
@@ -1059,7 +1059,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
|| defined (__OpenBSD__) \
|| defined (__NetBSD__) \
|| defined (__DragonFly__)
-# define FREEBSD
+# define BSD
#endif
/* Include every system header we need */
@@ -1070,8 +1070,8 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
/* On some system termio is either absent or including it will disable termios
(HP-UX) */
-#if ! defined (__hpux__) && ! defined (FREEBSD) && \
- ! defined (__APPLE__) && ! defined(__rtems__)
+#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \
+ && !defined (__rtems__)
# include <termio.h>
#endif
@@ -1083,10 +1083,10 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#if defined (sun)
+#if defined (__sun__)
# include <sys/stropts.h>
#endif
-#if defined (FREEBSD) || defined (sun)
+#if defined (BSD) || defined (__sun__)
# include <sys/signal.h>
#endif
#if defined (__hpux__)
@@ -1098,7 +1098,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
/* On HP-UX and Sun system, there is a bzero function but with a different
signature. Use memset instead */
-#if defined (__hpux__) || defined (sun) || defined (_AIX)
+#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
# define bzero(s,n) memset (s,0,n)
#endif
@@ -1116,11 +1116,11 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
*/
/* Configurable part */
-#if defined (__APPLE__) || defined (FREEBSD)
+#if defined (__APPLE__) || defined (BSD)
#define USE_OPENPTY
-#elif defined (linux)
+#elif defined (__linux__)
#define USE_GETPT
-#elif defined (sun)
+#elif defined (__sun__)
#define USE_CLONE_DEVICE "/dev/ptmx"
#elif defined (_AIX)
#define USE_CLONE_DEVICE "/dev/ptc"
@@ -1406,7 +1406,7 @@ __gnat_setup_child_communication
desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
#endif
-#if defined (sun) || defined (__hpux__)
+#if defined (__sun__) || defined (__hpux__)
/* On systems such as Solaris we are using stream. We need to push the right
"modules" in order to get the expected terminal behaviors. Otherwise
functionalities such as termios are not available. */