Bug#266640: FTBFS on !linux-gnu (2/3)
From
Robert Millan@1:229/2 to
All on Wed Aug 18 17:00:19 2004
[continued from previous message]
++#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(linux) || defined(__GNU__) || defined(__GLIBC__)
+ # if !defined(pyr) && !defined(stellar)
+ # include <time.h>
+ # ifdef _MINIX
+@@ -623,7 +623,7 @@
+ extern bool dolzero; /* if $?0 should return true... */
+
+ extern char *seterr; /* Error message from scanner/parser */
+-#if !defined(BSD4_4) && !defined(__linux__)
++#ifndef errno
+ extern int errno; /* Error from C library routines */
+ #endif
+ extern int exitset;
+@@ -1203,23 +1203,9 @@
+
+ #include "tc.h"
+
+-/*
+- * To print system call errors...
+- */
+-#ifdef BSD4_4
+-# include <errno.h>
+-#else
+-# ifndef linux
+-# ifdef NEEDstrerror
+-extern char *sys_errlist[];
+-# endif
+-extern int errno, sys_nerr;
+-# endif /* !linux */
+-#endif
+-
+ #ifndef WINNT_NATIVE
+ # ifdef NLS_CATALOGS
+-# ifdef linux
++# if defined(linux) || defined(__GNU__) || defined(__GLIBC__)
+ # include <locale.h>
+ # ifdef notdef
+ # include <localeinfo.h> /* Has this changed ? */
+diff -ur tcsh-6.13.01.old/sh.proc.c tcsh-6.13.01/sh.proc.c
+--- tcsh-6.13.01.old/sh.proc.c 2003-11-09 04:02:46.000000000 +0100
++++ tcsh-6.13.01/sh.proc.c 2004-08-18 16:06:50.000000000 +0200
+@@ -47,9 +47,9 @@
+ # define HZ 16
+ #endif /* aiws */
+
+-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(linux)
++#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(linux) || defined(__GNU__) || defined(__GLIBC__)
+ # define BSDWAIT
+-#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || linux */
++#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */
+ #ifndef WTERMSIG
+ # define WTERMSIG(w) (((union wait *) &(w))->w_termsig)
+ # ifndef BSDWAIT
+@@ -216,7 +216,7 @@
+ (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru);
+ # else
+ /* both a wait3 and rusage */
+-# if !defined(BSDWAIT) || defined(NeXT) || defined(MACH) || defined(linux) || (defined(IRIS4D) && (__STDC__ || defined(FUNCPROTO)) && SYSVREL <= 3) || defined(__lucid) || defined(__osf__)
++# if !defined(BSDWAIT) || defined(NeXT) || defined(MACH) || defined(linux) || defined(__GNU__) || defined(__GLIBC__) || (defined(IRIS4D) && (__STDC__ || defined(FUNCPROTO)) && SYSVREL <= 3) || defined(__lucid) || defined(__osf__)
+ pid = wait3(&w,
+ (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru);
+ # else /* BSDWAIT */
+diff -ur tcsh-6.13.01.old/sh.sem.c tcsh-6.13.01/sh.sem.c
+--- tcsh-6.13.01.old/sh.sem.c 2004-05-19 20:51:02.000000000 +0200
++++ tcsh-6.13.01/sh.sem.c 2004-08-18 16:07:22.000000000 +0200
+@@ -50,9 +50,9 @@
+ #endif /* CLOSE_ON_EXEC */
+
+ #if defined(__sparc__) || defined(sparc)
+-# if !defined(MACH) && SYSVREL == 0 && !defined(Lynx) && !defined(BSD4_4) && !defined(linux)
++# if !defined(MACH) && SYSVREL == 0 && !defined(Lynx) && !defined(BSD4_4) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__)
+ # include <vfork.h>
+-# endif /* !MACH && SYSVREL == 0 && !Lynx && !BSD4_4 && !linux */
++# endif /* !MACH && SYSVREL == 0 && !Lynx && !BSD4_4 && !glibc */
+ #endif /* __sparc__ || sparc */
+
+ #ifdef VFORK
+diff -ur tcsh-6.13.01.old/tc.const.c tcsh-6.13.01/tc.const.c
+--- tcsh-6.13.01.old/tc.const.c 2004-07-24 23:59:27.000000000 +0200 ++++ tcsh-6.13.01/tc.const.c 2004-08-18 16:07:46.000000000 +0200
+@@ -158,7 +158,7 @@
+ '\0' };
+ Char STRLANGEUCZH[] = { '\0' };
+ Char STRLANGEUCZHB[] = { '\0' };
+-# elif defined(linux)
++# elif defined(linux) || defined(__GNU__) || defined(__GLIBC__)
+ Char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '-',
+ 'J', 'P', '\0' };
+ Char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
+diff -ur tcsh-6.13.01.old/tc.os.h tcsh-6.13.01/tc.os.h
+--- tcsh-6.13.01.old/tc.os.h 2004-01-23 17:21:10.000000000 +0100
++++ tcsh-6.13.01/tc.os.h 2004-08-18 16:13:02.000000000 +0200
+@@ -86,9 +86,9 @@
+ # define NOFILE 256
+ #endif /* NOFILE */
+
+-#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || SYSVREL >= 4 || defined(_MINIX_VMD)
++#if defined(linux) || defined(__GNU__) || defined(__GLIBC__) || defined(__NetBSD__) || defined(__FreeBSD__) || SYSVREL >= 4 || defined(_MINIX_VMD)
+ # undef NEEDstrerror
+-#endif /* linux || __NetBSD__ || __FreeBSD__ || SYSVREL >= 4 || _MINIX_VMD */ ++#endif /* glibc || __NetBSD__ || __FreeBSD__ || SYSVREL >= 4 || _MINIX_VMD */ +
+ #if !defined(pyr) && !defined(sinix)
+ /* Pyramid's cpp complains about the next line */
+@@ -197,10 +197,10 @@
+ * #if (SYSVREL > 0) && defined(TIOCGWINSZ)
+ * If that breaks on your machine, let me know.
+ *
+- * It would break on linux, where all this is
++ * It would break on glibc, where all this is
+ * defined in <termios.h>. Wrapper added.
+ */
+-#if !defined(linux) && !defined(_VMS_POSIX)
++#if !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(_VMS_POSIX)
+ # if defined(INTEL) || defined(u3b2) || defined (u3b5) || defined(ub15) || defined(u3b20d) || defined(ISC) || defined(SCO) || defined(tower32)
+ # ifdef TIOCGWINSZ
+ /*
+@@ -213,7 +213,7 @@
+ # define NEEDgethostname
+ # endif /* ODT */
+ # endif /* INTEL || u3b2 || u3b5 || ub15 || u3b20d || ISC || SCO || tower32 */
+-#endif /* !linux && !_VMS_POSIX */
++#endif /* !glibc && !_VMS_POSIX */
+
+ #if defined(UNIXPC) || defined(COHERENT)
+ # define NEEDgethostname
+@@ -510,9 +510,9 @@
+
+
+ #if !defined(SOLARIS2) && !defined(sinix) && !defined(BSD4_4) && !defined(WINNT_NATIVE)
+-# if (SYSVREL > 0 && !defined(OREO) && !defined(sgi) && !defined(linux) && !defined(sinix) && !defined(_AIX) &&!defined(_UWIN)) || defined(NeXT)
++# if (SYSVREL > 0 && !defined(OREO) && !defined(sgi) && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(sinix) && !defined(_AIX) &&!defined(_UWIN)) || defined(NeXT)
+ # define NEEDgetcwd
+-# endif /* (SYSVREL > 0 && !OREO && !sgi && !linux && !sinix && !_AIX && !_UWIN) || NeXT */
++# endif /* (SYSVREL > 0 && !OREO && !sgi && !glibc && !sinix && !_AIX && !_UWIN) || NeXT */
+ #endif
+
+ #ifndef S_IFLNK
+@@ -534,12 +534,12 @@
+ # define free tcsh_free
+ #endif /* NeXT */
+
+-#if !defined(BSD4_4) && !defined(__linux__) && !defined(__hpux) && \
++#if !defined(BSD4_4) && !defined(__linux__) && !defined(__GNU__) && !defined(__GLIBC__) && !defined(__hpux) && \
+ !defined(sgi) && !defined(_AIX) && !defined(__CYGWIN__)
+ #ifndef NEEDgethostname
+ extern int gethostname __P((char *, int));
+ #endif /* NEEDgethostname */
+-#endif /* !BDS4_4 && !__linux__ && !__hpux && !sgi */
++#endif /* !BDS4_4 && !glibc && !__hpux && !sgi */
+
+ #if !defined(POSIX) || defined(SUNOS4) || defined(UTekV) || defined(sysV88)
+ extern time_t time();
+diff -ur tcsh-6.13.01.old/tc.wait.h tcsh-6.13.01/tc.wait.h
+--- tcsh-6.13.01.old/tc.wait.h 2002-05-30 17:22:09.000000000 +0200
++++ tcsh-6.13.01/tc.wait.h 2004-08-18 16:11:15.000000000 +0200
+@@ -39,7 +39,7 @@
+ * We try to use the system's wait.h when we can...
+ */
+
+-#if SYSVREL > 0 && !defined(linux)
++#if SYSVREL > 0 && !defined(linux) && !defined(__GNU__) && !defined(__GLIBC__)
+ # ifdef hpux
+ # ifndef __hpux
+ # define NEEDwait
+@@ -59,7 +59,7 @@
+ # define NEEDwait
+ # endif /* OREO || IRIS4D || POSIX */
+ # endif /* hpux */
+-#else /* SYSVREL == 0 || linux */
++#else /* SYSVREL == 0 || glibc */
+ # ifdef _MINIX
+ # undef NEEDwait
+ # include "mi.wait.h"
+@@ -68,7 +68,7 @@
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)