aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-03-20 00:57:11 -0700
committerDan Nicolaescu2010-03-20 00:57:11 -0700
commit05a670e6d3593a9e68804447dee5596fb7ca5ed4 (patch)
tree59e4b3d3822a20827b163fed8e9e9403d36bf6bc
parent2968f56146eac37708de08f30a58d662ce5f037f (diff)
downloademacs-05a670e6d3593a9e68804447dee5596fb7ca5ed4.tar.gz
emacs-05a670e6d3593a9e68804447dee5596fb7ca5ed4.zip
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.
-rw-r--r--src/ChangeLog15
-rw-r--r--src/s/bsd-common.h30
-rw-r--r--src/s/freebsd.h25
-rw-r--r--src/s/gnu.h24
-rw-r--r--src/s/netbsd.h20
5 files changed, 45 insertions, 69 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5da33df70b9..8b652226c84 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,20 @@
12010-03-20 Dan Nicolaescu <dann@ics.uci.edu> 12010-03-20 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Consolidate redundant definitions in s/bsd-common.h.
4 * s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
5 (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
6 (LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of
7 doing it in all files that include this one.
8 * s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
9 (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
10 (LDAV_SYMBOL, KERNEL_FILE): Remove.
11 * s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
12 (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
13 (LDAV_SYMBOL, KERNEL_FILE): Remove.
14 * s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
15 (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
16 (LDAV_SYMBOL, KERNEL_FILE): Remove.
17
3 Consolidate redundant definitions. 18 Consolidate redundant definitions.
4 * s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define, 19 * s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
5 it's undefined in all files that include this one. 20 it's undefined in all files that include this one.
diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h
index 8094f50d317..2ef0883b2a7 100644
--- a/src/s/bsd-common.h
+++ b/src/s/bsd-common.h
@@ -33,6 +33,36 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#define BSD_SYSTEM 43 33#define BSD_SYSTEM 43
34#endif /* BSD_SYSTEM */ 34#endif /* BSD_SYSTEM */
35 35
36/* For mem-limits.h. */
37#define BSD4_2
38
39#define TABDLY OXTABS
40#define TAB3 OXTABS
41
42/* These aren't needed, since we have getloadavg. */
43#undef KERNEL_FILE
44#undef LDAV_SYMBOL
45
46#define HAVE_TERMIOS
47#define NO_TERMIO
48
49#define LIBS_DEBUG
50
51#define SYSV_SYSTEM_DIR
52
53/* POSIX-style pgrp behavior. */
54#undef BSD_PGRPS
55
56#define UNEXEC unexelf.o
57
58/* If the system's imake configuration file defines `NeedWidePrototypes'
59 as `NO', we must define NARROWPROTO manually. Such a define is
60 generated in the Makefile generated by `xmkmf'. If we don't
61 define NARROWPROTO, we will see the wrong function prototypes
62 for X functions taking float or double parameters. */
63
64#define NARROWPROTO 1
65
36/* SYSTEM_TYPE should indicate the kind of system you are using. 66/* SYSTEM_TYPE should indicate the kind of system you are using.
37 It sets the Lisp variable system-type. */ 67 It sets the Lisp variable system-type. */
38 68
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index ad7f77acc8f..a84627d3268 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -29,13 +29,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29/* For mem-limits.h. */ 29/* For mem-limits.h. */
30#define BSD4_2 30#define BSD4_2
31 31
32/* These aren't needed, since we have getloadavg. */
33#undef KERNEL_FILE
34#undef LDAV_SYMBOL
35
36#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) 32#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
37 33
38#define LIBS_DEBUG
39#define LIBS_SYSTEM -lutil 34#define LIBS_SYSTEM -lutil
40#if __FreeBSD_version < 400000 35#if __FreeBSD_version < 400000
41#define LIBS_TERMCAP -ltermcap 36#define LIBS_TERMCAP -ltermcap
@@ -44,31 +39,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44#define LIBS_TERMCAP -lncurses 39#define LIBS_TERMCAP -lncurses
45#endif 40#endif
46 41
47#define SYSV_SYSTEM_DIR
48
49/* freebsd has POSIX-style pgrp behavior. */
50#undef BSD_PGRPS
51
52/* Let `ld' find image libs and similar things in /usr/local/lib. The 42/* Let `ld' find image libs and similar things in /usr/local/lib. The
53 system compiler, GCC, has apparently been modified to not look 43 system compiler, GCC, has apparently been modified to not look
54 there, contrary to what a stock GCC would do. */ 44 there, contrary to what a stock GCC would do. */
55 45
56#define LD_SWITCH_SYSTEM -L/usr/local/lib 46#define LD_SWITCH_SYSTEM -L/usr/local/lib
57#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o 47#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
58#define UNEXEC unexelf.o
59#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o 48#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
60#undef LIB_GCC 49#undef LIB_GCC
61#define LIB_GCC 50#define LIB_GCC
62 51
63#define HAVE_GETLOADAVG 1 52#define HAVE_GETLOADAVG 1
64#define HAVE_TERMIOS
65#define NO_TERMIO
66#define DECLARE_GETPWUID_WITH_UID_T 53#define DECLARE_GETPWUID_WITH_UID_T
67 54
68/* freebsd uses OXTABS instead of the expected TAB3. */
69#define TABDLY OXTABS
70#define TAB3 OXTABS
71
72/* this silences a few compilation warnings */ 55/* this silences a few compilation warnings */
73#undef BSD_SYSTEM 56#undef BSD_SYSTEM
74#if __FreeBSD__ == 1 57#if __FreeBSD__ == 1
@@ -84,14 +67,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
84 ioctl TIOCSCTTY. */ 67 ioctl TIOCSCTTY. */
85#define DONT_REOPEN_PTY 68#define DONT_REOPEN_PTY
86 69
87/* If the system's imake configuration file defines `NeedWidePrototypes'
88 as `NO', we must define NARROWPROTO manually. Such a define is
89 generated in the Makefile generated by `xmkmf'. If we don't
90 define NARROWPROTO, we will see the wrong function prototypes
91 for X functions taking float or double parameters. */
92
93#define NARROWPROTO 1
94
95/* The following is needed to make `configure' find Xpm, Xaw3d and 70/* The following is needed to make `configure' find Xpm, Xaw3d and
96 image include and library files if using /usr/bin/gcc. That 71 image include and library files if using /usr/bin/gcc. That
97 compiler seems to be modified to not find headers in 72 compiler seems to be modified to not find headers in
diff --git a/src/s/gnu.h b/src/s/gnu.h
index b43cd65c40a..bf68cabe051 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -21,27 +21,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21/* Get most of the stuff from bsd-common */ 21/* Get most of the stuff from bsd-common */
22#include "bsd-common.h" 22#include "bsd-common.h"
23 23
24/* For mem-limits.h. */
25#define BSD4_2
26
27#undef SYSTEM_TYPE 24#undef SYSTEM_TYPE
28#define SYSTEM_TYPE "gnu" 25#define SYSTEM_TYPE "gnu"
29 26
30#undef NLIST_STRUCT 27#undef NLIST_STRUCT
31#undef KERNEL_FILE
32#undef LDAV_SYMBOL
33 28
34#define SIGNALS_VIA_CHARACTERS 29#define SIGNALS_VIA_CHARACTERS
35 30
36#define HAVE_TERMIOS
37#define NO_TERMIO
38
39#define LIBS_DEBUG
40
41/* XXX emacs should not expect TAB3 to be defined. */
42#define TABDLY OXTABS
43#define TAB3 OXTABS
44
45/* Tell Emacs that we are a terminfo based system; disable the use 31/* Tell Emacs that we are a terminfo based system; disable the use
46 of local termcap. (GNU uses ncurses.) */ 32 of local termcap. (GNU uses ncurses.) */
47#ifdef HAVE_LIBNCURSES 33#ifdef HAVE_LIBNCURSES
@@ -49,11 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
49#define LIBS_TERMCAP -lncurses 35#define LIBS_TERMCAP -lncurses
50#endif 36#endif
51 37
52#define SYSV_SYSTEM_DIR
53
54/* GNU has POSIX-style pgrp behavior. */
55#undef BSD_PGRPS
56
57/* Use mmap directly for allocating larger buffers. */ 38/* Use mmap directly for allocating larger buffers. */
58#ifdef DOUG_LEA_MALLOC 39#ifdef DOUG_LEA_MALLOC
59#undef REL_ALLOC 40#undef REL_ALLOC
@@ -63,17 +44,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
63#define ORDINARY_LINK 44#define ORDINARY_LINK
64#define DATA_START ({ extern int data_start; (char *) &data_start; }) 45#define DATA_START ({ extern int data_start; (char *) &data_start; })
65 46
66/* GNU now always uses the ELF format. */
67#define UNEXEC unexelf.o
68
69/* Some losing code fails to include this and then assumes 47/* Some losing code fails to include this and then assumes
70 that because it is braindead that O_RDONLY==0. */ 48 that because it is braindead that O_RDONLY==0. */
71#ifndef NOT_C_CODE 49#ifndef NOT_C_CODE
72#include <fcntl.h> 50#include <fcntl.h>
73#endif 51#endif
74 52
75#define NARROWPROTO 1
76
77#ifdef emacs 53#ifdef emacs
78#include <stdio.h> /* Get the definition of _IO_STDIO_H. */ 54#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
79#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) 55#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index b2fcd3989ad..1af4c94d105 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -22,35 +22,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22/* Get most of the stuff from bsd-common */ 22/* Get most of the stuff from bsd-common */
23#include "bsd-common.h" 23#include "bsd-common.h"
24 24
25/* For mem-limits.h. */
26#define BSD4_2
27
28#undef KERNEL_FILE
29#undef LDAV_SYMBOL
30#define HAVE_GETLOADAVG 1 25#define HAVE_GETLOADAVG 1
31 26
32#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) 27#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
33 28
34/* netbsd uses OXTABS instead of the expected TAB3. */
35#define TABDLY OXTABS
36#define TAB3 OXTABS
37
38#define HAVE_TERMIOS
39#define NO_TERMIO
40
41#define LIBS_DEBUG
42/* -lutil is not needed for NetBSD >0.9. */ 29/* -lutil is not needed for NetBSD >0.9. */
43/* #define LIBS_SYSTEM -lutil */ 30/* #define LIBS_SYSTEM -lutil */
44#define LIBS_TERMCAP -ltermcap 31#define LIBS_TERMCAP -ltermcap
45 32
46#define NEED_ERRNO 33#define NEED_ERRNO
47#define SYSV_SYSTEM_DIR
48
49/* Netbsd has POSIX-style pgrp behavior. */
50#undef BSD_PGRPS
51 34
52#define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o 35#define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
53#define UNEXEC unexelf.o
54#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1 36#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
55#undef LIB_GCC 37#undef LIB_GCC
56#define LIB_GCC 38#define LIB_GCC
@@ -92,8 +74,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
92 74
93#define LINKER $(CC) -nostartfiles 75#define LINKER $(CC) -nostartfiles
94 76
95#define NARROWPROTO 1
96
97#define DEFAULT_SOUND_DEVICE "/dev/audio" 77#define DEFAULT_SOUND_DEVICE "/dev/audio"
98 78
99/* Greg A. Woods <woods@weird.com> says we must include signal.h 79/* Greg A. Woods <woods@weird.com> says we must include signal.h