diff src/s/linux.h @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents 3bb7ccffb0c0
children 5a88923fcbfe
line wrap: on
line diff
--- a/src/s/linux.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/linux.h	Mon Aug 13 09:43:35 2007 +0200
@@ -23,12 +23,6 @@
 
 /* This file was put together by Michael K. Johnson and Rik Faith.  */
 
-
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
 /* #define UNIPLUS */
 /* #define USG5 */
 #define USG
@@ -40,15 +34,7 @@
 
 #define SYSTEM_TYPE "linux"		/* All the best software is free. */
 
-/* Letter to use in finding device name of first pty,
-  if system supports pty's.  'p' means it is /dev/ptyp0  */
-
 #define FIRST_PTY_LETTER 'p'
-
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
 #define HAVE_PTYS
 
 /* define MAIL_USE_FLOCK if the mailer uses flock
@@ -88,7 +74,7 @@
 
 /* This is needed for dispnew.c:update_frame */
 
-#ifdef emacs
+#ifndef NOT_C_CODE
 #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
 /* new C libio names */
@@ -99,35 +85,18 @@
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->_pptr - (FILE)->_pbase)
 #endif /* !_IO_STDIO_H */
-#endif /* emacs */
+#endif /* C_CODE */
 
 /* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
+#define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`"
 
 #ifndef __ELF__
 /* Linux has crt0.o in a non-standard place */
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 #else
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o"
 #endif
 
-/* Check the version number of Linux--if it is at least 1.1.56,
-   it is safe to use SIGIO.  If we can't find version.h (could happen
-   if the user did a `make distclean' or something similar on the
-   kernel distribution) just assume that SIGIO works, because nearly
-   everybody should be running Linux 1.2 or later by now. */
-#ifndef NOT_C_CODE
-#ifdef emacs
-#ifdef HAVE_LINUX_VERSION_H
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE < 0x10138
-#define BROKEN_SIGIO
-#endif /* LINUX_VERSION_CODE < 0x10138 */
-#endif /* HAVE_LINUX_VERSION_H */
-#endif /* emacs */
-#endif /* NOT_C_CODE */
-
 /* This is needed for sysdep.c */
 
 #define NO_SIOCTL_H           /* don't have sioctl.h */
@@ -139,13 +108,13 @@
 
 /* Best not to include -lg, unless it is last on the command line */
 #define LIBS_DEBUG
-#define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/
+#define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/
 #ifndef __ELF__
-#define LIB_STANDARD -lc /* avoid -lPW */
+#define LIB_STANDARD "-lc" /* avoid -lPW */
 #else
 #undef LIB_GCC
 #define LIB_GCC
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib/crtn.o"
 #endif
 
 /* Don't use -g in test compiles in configure.
@@ -160,21 +129,14 @@
 /* #define SIGNALS_VIA_CHARACTERS */
 
 #ifdef TERM
-#define LIBS_SYSTEM -lclient
-#define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
+#define LIBS_SYSTEM "-lclient"
+     /* #define C_SWITCH_SYSTEM "-D_BSD_SOURCE -I/usr/src/term" - mrb */
+#define C_SWITCH_SYSTEM "-I/usr/src/term"
 #else
 /* alane@wozzle.linet.org says that -lipc is not a separate library,
    since libc-4.4.1.  So -lipc was deleted.  */
 #define LIBS_SYSTEM
-
-#if 0 /* these options should either be cross-platform or removed - mrb */
-/* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
-   XEmacs with these switches too so that X functions get called correctly.
-   At least XawScrollbarSetThumb needs this. */ 
-#define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
-#endif
-     /* #define C_SWITCH_SYSTEM -DNARROWPROTO -D_BSD_SOURCE */
-#define _BSD_SOURCE 1
+     /* #define _BSD_SOURCE 1 - mrb */
 #endif
 
 
@@ -185,7 +147,12 @@
 #ifdef __ELF__
 #define UNEXEC "unexelf.o"
 #define UNEXEC_USE_MAP_PRIVATE
-#endif
+/* mrb - Ordinary link is simple and effective */
+#define ORDINARY_LINK
+#undef LIB_STANDARD
+#undef START_FILES
+#undef LIB_GCC
+#endif /* __ELF__ */
 
 #ifdef LINUX_QMAGIC
 
@@ -202,24 +169,6 @@
 
 #endif /* not LINUX_QMAGIC */
 
-#if 0
-/* In 19.23 and 19.24, configure sometimes fails to define these.
-   It has to do with the fact that configure uses CFLAGS when linking
-   while Makefile.in.in (erroneously) fails to do so when linking temacs.  */
-#ifndef HAVE_GETTIMEOFDAY
-#define HAVE_GETTIMEOFDAY
-#endif
-#ifndef HAVE_MKDIR
-#define HAVE_MKDIR
-#endif
-#ifndef HAVE_RMDIR
-#define HAVE_RMDIR
-#endif
-#ifndef HAVE_XSCREENNUMBEROFSCREEN
-#define HAVE_XSCREENNUMBEROFSCREEN
-#endif
-#endif /* 0 */
-
 /* This is to work around mysterious gcc failures in some system versions.
    It is unlikely that Emacs changes will work around this problem;
    therefore, this should remain permanently.  */
@@ -227,22 +176,6 @@
 #define HAVE_XRMSETDATABASE
 #endif
 
-/* XEmacs addition: */
-/* Linux defines these in <values.h>, but they can't be used in #if's
-   Include values.h now so that we don't get complaints if it's included
-   later.  This loses with glibc-2 (libc-6) */
-
-/* # include <features.h> */
-#if 0
-#if !(defined (__GLIBC__) && (__GLIBC__ >= 2))
-
-#include <values.h>
-#undef  SHORTBITS
-#undef  INTBITS
-#undef  LONGBITS
-
-#endif
-#endif
 /* The regex.o routines are a part of the GNU C-library used with Linux.  */
 /* However, sometimes they disagree with the src/regex.h that comes with Emacs,
    and that can make trouble in etags.c because it gets the regex.h from Emacs
@@ -267,19 +200,15 @@
 #define regerror sys_regerror
 #define regfree sys_regfree
 
+#if 0 /* mrb - if autoconf 2 is wrong, we should fix the test */
 /* XEmacs: Damon Lipparelli says that he incorrectly gets this
    defined on his system */
 #undef GETTIMEOFDAY_ONE_ARGUMENT
+#endif /* 0 */
 
 /* Use BSD process groups, but use setpgid() instead of setpgrp() to
    actually set a process group. */
 
-/* Formerly "BSD_PGRPS" */
-
-#if 0 /* XEmacs (ben): I'm not convinced this is necessary and it has
-	 lots of possibility of fuckup. */
-#define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP
-#endif
 /* XEmacs: removed setpgrp() definition because we use setpgid() when
    it's available, and autodetect it. */
 
@@ -287,11 +216,3 @@
 #if defined __GLIBC__ && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2)
 # define GETPGRP_NEEDS_ARG
 #endif
-
-#ifdef __ELF__
-/* mrb - Ordinary link is simple and effective */
-#define ORDINARY_LINK
-#undef LIB_STANDARD
-#undef START_FILES
-#undef LIB_GCC
-#endif /* __ELF__ */