changeset 107442:7ada44edb67c

Consolidate redundant definitions in s/bsd-common.h. * s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO) (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS) (LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of doing it in all files that include this one. * s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO) (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS) (LDAV_SYMBOL, KERNEL_FILE): Remove. * s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO) (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS) (LDAV_SYMBOL, KERNEL_FILE): Remove. * s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO) (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS) (LDAV_SYMBOL, KERNEL_FILE): Remove.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 20 Mar 2010 00:57:11 -0700
parents 6c7f53fe0ce5
children 6856772abdfe
files src/ChangeLog src/s/bsd-common.h src/s/freebsd.h src/s/gnu.h src/s/netbsd.h
diffstat 5 files changed, 45 insertions(+), 69 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Mar 20 00:09:31 2010 -0700
+++ b/src/ChangeLog	Sat Mar 20 00:57:11 2010 -0700
@@ -1,5 +1,20 @@
 2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	Consolidate redundant definitions in s/bsd-common.h.
+	* s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of
+	doing it in all files that include this one.
+	* s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+	* s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+	* s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+
 	Consolidate redundant definitions.
 	* s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
 	it's undefined in all files that include this one.
--- a/src/s/bsd-common.h	Sat Mar 20 00:09:31 2010 -0700
+++ b/src/s/bsd-common.h	Sat Mar 20 00:57:11 2010 -0700
@@ -33,6 +33,36 @@
 #define BSD_SYSTEM 43
 #endif /* BSD_SYSTEM */
 
+/* For mem-limits.h.  */
+#define BSD4_2
+
+#define TABDLY OXTABS
+#define TAB3 OXTABS
+
+/* These aren't needed, since we have getloadavg.  */
+#undef KERNEL_FILE
+#undef LDAV_SYMBOL
+
+#define HAVE_TERMIOS
+#define NO_TERMIO
+
+#define LIBS_DEBUG
+
+#define SYSV_SYSTEM_DIR
+
+/* POSIX-style pgrp behavior.  */
+#undef BSD_PGRPS
+
+#define UNEXEC unexelf.o
+
+/* If the system's imake configuration file defines `NeedWidePrototypes'
+   as `NO', we must define NARROWPROTO manually.  Such a define is
+   generated in the Makefile generated by `xmkmf'.  If we don't
+   define NARROWPROTO, we will see the wrong function prototypes
+   for X functions taking float or double parameters.  */
+
+#define NARROWPROTO 1
+
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
 
--- a/src/s/freebsd.h	Sat Mar 20 00:09:31 2010 -0700
+++ b/src/s/freebsd.h	Sat Mar 20 00:57:11 2010 -0700
@@ -29,13 +29,8 @@
 /* For mem-limits.h. */
 #define BSD4_2
 
-/* These aren't needed, since we have getloadavg.  */
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
-
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#define LIBS_DEBUG
 #define LIBS_SYSTEM -lutil
 #if __FreeBSD_version < 400000
 #define LIBS_TERMCAP -ltermcap
@@ -44,31 +39,19 @@
 #define LIBS_TERMCAP -lncurses
 #endif
 
-#define SYSV_SYSTEM_DIR
-
-/* freebsd has POSIX-style pgrp behavior. */
-#undef BSD_PGRPS
-
 /* Let `ld' find image libs and similar things in /usr/local/lib.  The
    system compiler, GCC, has apparently been modified to not look
    there, contrary to what a stock GCC would do.  */
 
 #define LD_SWITCH_SYSTEM  -L/usr/local/lib
 #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
-#define UNEXEC unexelf.o
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
 #undef LIB_GCC
 #define LIB_GCC
 
 #define HAVE_GETLOADAVG 1
-#define HAVE_TERMIOS
-#define NO_TERMIO
 #define DECLARE_GETPWUID_WITH_UID_T
 
-/* freebsd uses OXTABS instead of the expected TAB3. */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
 /* this silences a few compilation warnings */
 #undef BSD_SYSTEM
 #if __FreeBSD__ == 1
@@ -84,14 +67,6 @@
    ioctl TIOCSCTTY.  */
 #define DONT_REOPEN_PTY
 
-/* If the system's imake configuration file defines `NeedWidePrototypes'
-   as `NO', we must define NARROWPROTO manually.  Such a define is
-   generated in the Makefile generated by `xmkmf'.  If we don't
-   define NARROWPROTO, we will see the wrong function prototypes
-   for X functions taking float or double parameters.  */
-
-#define NARROWPROTO 1
-
 /* The following is needed to make `configure' find Xpm, Xaw3d and
    image include and library files if using /usr/bin/gcc.  That
    compiler seems to be modified to not find headers in
--- a/src/s/gnu.h	Sat Mar 20 00:09:31 2010 -0700
+++ b/src/s/gnu.h	Sat Mar 20 00:57:11 2010 -0700
@@ -21,27 +21,13 @@
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
-/* For mem-limits.h.  */
-#define BSD4_2
-
 #undef SYSTEM_TYPE
 #define SYSTEM_TYPE "gnu"
 
 #undef NLIST_STRUCT
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
 
 #define SIGNALS_VIA_CHARACTERS
 
-#define HAVE_TERMIOS
-#define NO_TERMIO
-
-#define LIBS_DEBUG
-
-/* XXX emacs should not expect TAB3 to be defined.  */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
 /* Tell Emacs that we are a terminfo based system; disable the use
    of local termcap.  (GNU uses ncurses.) */
 #ifdef HAVE_LIBNCURSES
@@ -49,11 +35,6 @@
 #define LIBS_TERMCAP -lncurses
 #endif
 
-#define SYSV_SYSTEM_DIR
-
-/* GNU has POSIX-style pgrp behavior.  */
-#undef BSD_PGRPS
-
 /* Use mmap directly for allocating larger buffers.  */
 #ifdef DOUG_LEA_MALLOC
 #undef REL_ALLOC
@@ -63,17 +44,12 @@
 #define ORDINARY_LINK
 #define DATA_START ({ extern int data_start; (char *) &data_start; })
 
-/* GNU now always uses the ELF format.  */
-#define UNEXEC unexelf.o
-
 /* Some losing code fails to include this and then assumes
    that because it is braindead that O_RDONLY==0.  */
 #ifndef NOT_C_CODE
 #include <fcntl.h>
 #endif
 
-#define NARROWPROTO 1
-
 #ifdef emacs
 #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
--- a/src/s/netbsd.h	Sat Mar 20 00:09:31 2010 -0700
+++ b/src/s/netbsd.h	Sat Mar 20 00:57:11 2010 -0700
@@ -22,35 +22,17 @@
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
-/* For mem-limits.h.  */
-#define BSD4_2
-
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
 #define HAVE_GETLOADAVG 1
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-/* netbsd uses OXTABS instead of the expected TAB3.  */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
-#define HAVE_TERMIOS
-#define NO_TERMIO
-
-#define LIBS_DEBUG
 /* -lutil is not needed for NetBSD >0.9.  */
 /* #define LIBS_SYSTEM -lutil */
 #define LIBS_TERMCAP -ltermcap
 
 #define NEED_ERRNO
-#define SYSV_SYSTEM_DIR
-
-/* Netbsd has POSIX-style pgrp behavior.  */
-#undef BSD_PGRPS
 
 #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
-#define UNEXEC unexelf.o
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
 #undef LIB_GCC
 #define LIB_GCC
@@ -92,8 +74,6 @@
 
 #define LINKER $(CC) -nostartfiles
 
-#define NARROWPROTO 1
-
 #define DEFAULT_SOUND_DEVICE "/dev/audio"
 
 /* Greg A. Woods <woods@weird.com> says we must include signal.h