From a9be7d2b190bb334b9b43a86ce7cbf8478f68e9b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 11 Jun 2012 19:17:11 -0400 Subject: [PATCH] Move SYSTEM_TYPE from src/s to configure * configure.in (SYSTEM_TYPE): New AC_DEFINE. * msdos/sed2v2.inp (SYSTEM_TYPE): Set it. * nt/config.nt (SYSTEM_TYPE): Define it. * src/s/aix4-2.h, src/s/bsd-common.h, src/s/cygwin.h, src/s/darwin.h: * src/s/gnu-kfreebsd.h, src/s/gnu-linux.h, src/s/gnu.h, src/s/hpux10-20.h: * src/s/irix6-5.h, src/s/ms-w32.h, src/s/msdos.h, src/s/template.h: * src/s/usg5-4-common.h: Remove SYSTEM_TYPE. --- ChangeLog | 4 ++++ configure.in | 14 ++++++++++++++ msdos/ChangeLog | 4 ++++ msdos/sed2v2.inp | 1 + nt/ChangeLog | 4 ++++ nt/config.nt | 3 +++ src/ChangeLog | 7 +++++++ src/s/aix4-2.h | 4 ---- src/s/bsd-common.h | 4 ---- src/s/cygwin.h | 4 ---- src/s/darwin.h | 4 ---- src/s/gnu-kfreebsd.h | 6 ------ src/s/gnu-linux.h | 4 ---- src/s/gnu.h | 3 --- src/s/hpux10-20.h | 4 ---- src/s/irix6-5.h | 5 ----- src/s/ms-w32.h | 4 ---- src/s/msdos.h | 4 ---- src/s/template.h | 5 ----- src/s/usg5-4-common.h | 4 ---- 20 files changed, 37 insertions(+), 55 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb5ce51499..2b9378b3cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-11 Glenn Morris + + * configure.in (SYSTEM_TYPE): New AC_DEFINE. + 2012-06-09 Michael Albinus * configure.in (dbus_type_is_valid): Check for library function. diff --git a/configure.in b/configure.in index 4fc151d796..4864465858 100644 --- a/configure.in +++ b/configure.in @@ -934,6 +934,11 @@ AC_DEFUN([AC_TYPE_UID_T]) LIB_MATH=-lm LIB_STANDARD= START_FILES= +dnl Current possibilities handled by sed (aix4-2 -> aix, +dnl gnu-linux -> gnu/linux, etc.): +dnl gnu, gnu/linux, gnu/kfreebsd, aix, cygwin, darwin, hpux, irix. +dnl And special cases: berkeley-unix, usg-unix-v, ms-dos, windows-nt. +SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'` dnl NB do not use CRT_DIR unquoted here, since it might not be set yet. case $opsys in @@ -949,6 +954,7 @@ case $opsys in freebsd ) LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' + SYSTEM_TYPE=berkeley-unix ;; gnu-linux | gnu-kfreebsd ) LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' @@ -962,11 +968,19 @@ case $opsys in netbsd | openbsd ) LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' + SYSTEM_TYPE=berkeley-unix ;; + + sol2* | unixware ) + SYSTEM_TYPE=usg-unix-v + ;; + esac AC_SUBST(LIB_MATH) AC_SUBST(START_FILES) +AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE", + [The type of system you are compiling for; sets `system-type'.]) dnl Not all platforms use crtn.o files. Check if the current one does. crt_files= diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 934a32ba24..2b981168fe 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,7 @@ +2012-06-11 Glenn Morris + + * sed2v2.inp (SYSTEM_TYPE): Set it. + 2012-05-27 Eli Zaretskii * sedlibmk.inp (GNULIB_GL_UNISTD_H_GETOPT, GNULIB_POSIX_OPENPT) diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 06a59513af..85ab02c877 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -59,6 +59,7 @@ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ /^#undef VERSION/s/^.*$/#define VERSION "24.1.50"/ +/^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ /^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/ diff --git a/nt/ChangeLog b/nt/ChangeLog index 0687e8be60..a103c8b1c2 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2012-06-11 Glenn Morris + + * config.nt (SYSTEM_TYPE): Define it. + 2012-05-31 Eli Zaretskii * configure.bat (genmakefiles): Move the redirection away from the diff --git a/nt/config.nt b/nt/config.nt index 2e56633d4f..f32c38f843 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -326,6 +326,9 @@ along with GNU Emacs. If not, see . */ /* Version number of package */ #define VERSION "24.1.50" +/* The type of system you are compiling for; sets `system-type'. */ +#define SYSTEM_TYPE "windows-nt" + /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifdef __GNUC__ diff --git a/src/ChangeLog b/src/ChangeLog index dc2e6845c5..9acdb5fbf2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-06-11 Glenn Morris + + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h: + * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h: + * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h: + * s/usg5-4-common.h: Move SYSTEM_TYPE to configure. + 2012-06-11 Stefan Monnier * alloc.c (make_byte_code): New function. diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index cacfdc7ed6..51ac9748f2 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -26,10 +26,6 @@ along with GNU Emacs. If not, see . */ #define _AIX #endif -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "aix" - /* In AIX, you allocate a pty by opening /dev/ptc to get the master side. To get the name of the slave side, you just ttyname() the master side. */ #define PTY_ITERATION int c; for (c = 0; !c ; c++) diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index c2dbdb9a10..ce3d63bb49 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -46,10 +46,6 @@ along with GNU Emacs. If not, see . */ 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. */ -#define SYSTEM_TYPE "berkeley-unix" - /* Do not use interrupt_input = 1 by default, because in 4.3 we can make noninterrupt input work properly. */ #undef INTERRUPT_INPUT diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 9310890351..9b43734132 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -17,10 +17,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "cygwin" - /* Emacs can read input using SIGIO and buffering characters itself, or using CBREAK mode and making C-g cause SIGINT. The choice is controlled by the variable interrupt_input. diff --git a/src/s/darwin.h b/src/s/darwin.h index 7c8e26f46c..5033f91813 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -31,10 +31,6 @@ along with GNU Emacs. If not, see . */ #define DARWIN_OS -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "darwin" - /* Emacs can read input using SIGIO and buffering characters itself, or using CBREAK mode and making C-g cause SIGINT. The choice is controlled by the variable interrupt_input. diff --git a/src/s/gnu-kfreebsd.h b/src/s/gnu-kfreebsd.h index a85571915d..f32e6faccd 100644 --- a/src/s/gnu-kfreebsd.h +++ b/src/s/gnu-kfreebsd.h @@ -1,9 +1,3 @@ #include "gnu-linux.h" -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#undef SYSTEM_TYPE -#define SYSTEM_TYPE "gnu/kfreebsd" /* All the best software is free */ - #define NO_TERMIO /* use only */ - diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 409d020552..20ce65207a 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -25,10 +25,6 @@ along with GNU Emacs. If not, see . */ #define USG #define GNU_LINUX -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "gnu/linux" /* All the best software is free. */ - #ifdef emacs #ifdef HAVE_LINUX_VERSION_H #include diff --git a/src/s/gnu.h b/src/s/gnu.h index cd72164a52..089890a12b 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h @@ -21,9 +21,6 @@ along with GNU Emacs. If not, see . */ /* Get most of the stuff from bsd-common */ #include "bsd-common.h" -#undef SYSTEM_TYPE -#define SYSTEM_TYPE "gnu" - #define SIGNALS_VIA_CHARACTERS /* libc defines data_start. */ diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index f1ae50c533..36227b6ba7 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -26,10 +26,6 @@ along with GNU Emacs. If not, see . */ #define USG5 #define HPUX -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "hpux" - /* Letter to use in finding device name of first pty, if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */ #define FIRST_PTY_LETTER 'p' diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index e5479c3b8d..7e5a5505ee 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -26,11 +26,6 @@ along with GNU Emacs. If not, see . */ #define SETPGRP_RELEASES_CTTY -#ifdef SYSTEM_TYPE -#undef SYSTEM_TYPE -#endif -#define SYSTEM_TYPE "irix" - #ifdef SETUP_SLAVE_PTY #undef SETUP_SLAVE_PTY #endif diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index f88128b27a..5bf71d5f32 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -36,10 +36,6 @@ along with GNU Emacs. If not, see . */ convention must be whatever standard the libraries expect. */ #define _CALLBACK_ __cdecl -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "windows-nt" - #define NO_MATHERR 1 /* Letter to use in finding device name of first pty, diff --git a/src/s/msdos.h b/src/s/msdos.h index add2902d5f..fc1a8c7506 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -33,10 +33,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #define DOS_NT /* MSDOS or WINDOWSNT */ #undef BSD_SYSTEM -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "ms-dos" - /* subprocesses should be defined if you want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). This is the only system that needs this. */ diff --git a/src/s/template.h b/src/s/template.h index 527694bd4b..d8f811dc8a 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -30,11 +30,6 @@ along with GNU Emacs. If not, see . */ /* #define BSD4_3 */ /* #define BSD_SYSTEM */ -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ - -#define SYSTEM_TYPE "berkeley-unix" - /* Emacs can read input using SIGIO and buffering characters itself, or using CBREAK mode and making C-g cause SIGINT. The choice is controlled by the variable interrupt_input. diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index fabdd66f3b..d2f3b5d77f 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h @@ -26,10 +26,6 @@ along with GNU Emacs. If not, see . */ #define USG5 #define USG5_4 -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ -#define SYSTEM_TYPE "usg-unix-v" - /* setjmp and longjmp can safely replace _setjmp and _longjmp, but they will run slower. */ #define _setjmp setjmp -- 2.39.2