emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109065: Move "system type" macros fr


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109065: Move "system type" macros from src/s to configure
Date: Thu, 12 Jul 2012 19:34:05 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109065
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2012-07-12 19:34:05 -0700
message:
  Move "system type" macros from src/s to configure
  
  * configure.ac (BSD4_2, BSD_SYSTEM, USG, USG5, _AIX, CYGWIN)
  (DARWIN_OS, GNU_LINUX, HPUX, IRIX6_5, SOLARIS2):
  Move "system type" macros here from src/s.
  (BSD_SYSTEM_AHB): New hack macro.
  (AH_BOTTOM): Set BSD_SYSTEM, using BSD_SYSTEM_AHB.
  
  * src/s/usg5-4-common.h (USG, USG5):
  * src/s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
  * src/s/sol2-6.h (SOLARIS2):
  * src/s/irix6-5.h (IRIX6_5):
  * src/s/hpux10-20.h (USG, USG5, HPUX):
  * src/s/gnu-linux.h (USG, GNU_LINUX):
  * src/s/freebsd.h (BSD_SYSTEM):
  * src/s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
  * src/s/cygwin.h (CYGWIN):
  * src/s/bsd-common.h (BSD_SYSTEM, BSD4_2):
  * src/s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
modified:
  ChangeLog
  configure.ac
  src/ChangeLog
  src/s/aix4-2.h
  src/s/bsd-common.h
  src/s/cygwin.h
  src/s/darwin.h
  src/s/freebsd.h
  src/s/gnu-linux.h
  src/s/hpux10-20.h
  src/s/irix6-5.h
  src/s/sol2-6.h
  src/s/template.h
  src/s/usg5-4-common.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-13 01:19:06 +0000
+++ b/ChangeLog 2012-07-13 02:34:05 +0000
@@ -1,5 +1,11 @@
 2012-07-13  Glenn Morris  <address@hidden>
 
+       * configure.ac (BSD4_2, BSD_SYSTEM, USG, USG5, _AIX, CYGWIN)
+       (DARWIN_OS, GNU_LINUX, HPUX, IRIX6_5, SOLARIS2):
+       Move "system type" macros here from src/s.
+       (BSD_SYSTEM_AHB): New hack macro.
+       (AH_BOTTOM): Set BSD_SYSTEM, using BSD_SYSTEM_AHB.
+
        * configure.ac (NSIG_MINIMUM, ULIMIT_BREAK_VALUE):
        Move here from src/s.
 

=== modified file 'configure.ac'
--- a/configure.ac      2012-07-13 01:19:06 +0000
+++ b/configure.ac      2012-07-13 02:34:05 +0000
@@ -3481,7 +3481,7 @@
 
   gnu | gnu-linux | gnu-kfreebsd )
     AC_MSG_CHECKING([for style of pending output formalism])
-    dnl In autoconf 2.67 (?) and later, we could use a single test
+    dnl In autoconf 2.67 and later, we could use a single test
     dnl since the preprocessed output is accessible in "conftest.i".
     AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
@@ -3595,6 +3595,87 @@
 esac
 
 
+dnl Define symbols to identify the version of Unix this is.
+dnl Define all the symbols that apply correctly.
+AH_TEMPLATE(BSD4_2, [Define if the system is compatible with BSD 4.2.])
+AH_TEMPLATE(BSD_SYSTEM, [Define if the system is compatible with BSD 4.2.])
+AH_TEMPLATE(USG, [Define if the system is compatible with System III.])
+AH_TEMPLATE(USG5, [Define if the system is compatible with System V.])
+
+case $opsys in
+  aix4-2)
+    AC_DEFINE(USG, [])
+    AC_DEFINE(USG5, [])
+    dnl This symbol should be defined on AIX Version 3  ???????
+    AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef _AIX
+# error "_AIX not defined"
+#endif
+    ]], [[]])], [], AC_DEFINE(_AIX, [], [Define if the system is AIX.]))
+    ;;
+
+  cygwin)
+    AC_DEFINE(CYGWIN, 1, [Define if the system is Cygwin.])
+    ;;
+
+  darwin)
+    dnl BSD4_3 and BSD4_4 are already defined in sys/param.h.
+    AC_DEFINE(BSD4_2, [])
+    AC_DEFINE(BSD_SYSTEM, [])
+    dnl More specific than the above two.  We cannot use __APPLE__ as this
+    dnl may not be defined on non-OSX Darwin, and we cannot define DARWIN
+    dnl here because Panther and lower CoreFoundation.h uses DARWIN to
+    dnl distinguish OS X from pure Darwin.
+    AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.])
+    ;;
+
+  freebsd)
+    AC_DEFINE(BSD4_2, [])
+    dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times.
+    dnl Would not be needed with autoconf >= 2.67, where the
+    dnl preprocessed output is accessible in "conftest.i".
+    AC_DEFINE(BSD_SYSTEM_AHB, 1, [Define if AH_BOTTOM should change 
BSD_SYSTEM.])
+    ;;
+
+  gnu | netbsd | openbsd )
+    AC_DEFINE(BSD4_2, [])
+    AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef BSD_SYSTEM
+# error "BSD_SYSTEM not defined"
+#endif
+    ]], [[]])], [], AC_DEFINE(BSD_SYSTEM, 43) )
+    ;;
+
+  gnu-linux | gnu-kfreebsd )
+    AC_DEFINE(USG, [])
+    AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with 
GNU/Linux.])
+    ;;
+
+  hpux*)
+    AC_DEFINE(USG, [])
+    AC_DEFINE(USG5, [])
+    AC_DEFINE(HPUX, [], [Define if the system is HPUX.])
+    ;;
+
+  irix6-5)
+    AC_DEFINE(USG, [])
+    AC_DEFINE(USG5, [])
+    AC_DEFINE(IRIX6_5, [], [Define if the system is IRIX.])
+    ;;
+
+  sol2*)
+    AC_DEFINE(USG, [])
+    AC_DEFINE(USG5, [])
+    AC_DEFINE(SOLARIS2, [], [Define if the system is Solaris.])
+    ;;
+
+  unixware)
+    AC_DEFINE(USG, [])
+    AC_DEFINE(USG5, [])
+    ;;
+esac
+
+
 case $opsys in
   dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls
   dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
@@ -4035,6 +4116,19 @@
 # error "alloca not available on this machine"
 #endif
 
+/* This silences a few compilation warnings on FreeBSD.  */
+#ifdef BSD_SYSTEM_AHB
+#undef BSD_SYSTEM_AHB
+#undef BSD_SYSTEM
+#if __FreeBSD__ == 1
+#define BSD_SYSTEM 199103
+#elif __FreeBSD__ == 2
+#define BSD_SYSTEM 199306
+#elif __FreeBSD__ >= 3
+#define BSD_SYSTEM 199506
+#endif
+#endif
+
 /* Define AMPERSAND_FULL_NAME if you use the convention
    that & in the full name stands for the login id.  */
 /* Turned on June 1996 supposing nobody will mind it.  */

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-13 02:23:57 +0000
+++ b/src/ChangeLog     2012-07-13 02:34:05 +0000
@@ -1,3 +1,17 @@
+2012-07-13  Glenn Morris  <address@hidden>
+
+       * s/usg5-4-common.h (USG, USG5):
+       * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
+       * s/sol2-6.h (SOLARIS2):
+       * s/irix6-5.h (IRIX6_5):
+       * s/hpux10-20.h (USG, USG5, HPUX):
+       * s/gnu-linux.h (USG, GNU_LINUX):
+       * s/freebsd.h (BSD_SYSTEM):
+       * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
+       * s/cygwin.h (CYGWIN):
+       * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
+       * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
+
 2012-07-13  BT Templeton  <address@hidden>  (tiny change)
 
        * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).

=== modified file 'src/s/aix4-2.h'
--- a/src/s/aix4-2.h    2012-07-12 21:14:13 +0000
+++ b/src/s/aix4-2.h    2012-07-13 02:34:05 +0000
@@ -16,19 +16,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-#define USG                            /* System III, System V, etc */
-#define USG5
-
-/* This symbol should be defined on AIX Version 3  ??????? */
-#ifndef _AIX
-#define _AIX
-#endif
-
-
-/* Special items needed to make Emacs run on this system.  */
-
 /* Perry Smith <address@hidden> says these are correct.  */
 #undef sigmask
 

=== modified file 'src/s/bsd-common.h'
--- a/src/s/bsd-common.h        2012-07-12 06:34:40 +0000
+++ b/src/s/bsd-common.h        2012-07-13 02:34:05 +0000
@@ -18,21 +18,3 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.   */
-
-/* We give these symbols the numeric values found in <sys/param.h> to
-   avoid warnings about redefined macros.  */
-
-/* Nothing in Emacs uses this any more.
-   ifndef BSD4_3
-   define BSD4_3 1
-   endif
-*/
-
-#ifndef BSD_SYSTEM
-#define BSD_SYSTEM 43
-#endif /* BSD_SYSTEM */
-
-/* For mem-limits.h.  */
-#define BSD4_2

=== modified file 'src/s/cygwin.h'
--- a/src/s/cygwin.h    2012-07-12 07:43:05 +0000
+++ b/src/s/cygwin.h    2012-07-13 02:34:05 +0000
@@ -17,5 +17,4 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Used in various places to enable cygwin-specific code changes.  */
-#define CYGWIN 1
+

=== modified file 'src/s/darwin.h'
--- a/src/s/darwin.h    2012-07-13 00:07:29 +0000
+++ b/src/s/darwin.h    2012-07-13 02:34:05 +0000
@@ -17,19 +17,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-#define BSD4_2
-/* BSD4_3 and BSD4_4 are already defined in sys/param.h */
-#define BSD_SYSTEM
-
-/* More specific than the above two.  We cannot use __APPLE__ as this
-   may not be defined on non-OSX Darwin, and we cannot define DARWIN
-   here because Panther and lower CoreFoundation.h uses DARWIN to
-   distinguish OS X from pure Darwin.  */
-#define DARWIN_OS
-
 /* Definitions for how to compile & link.  */
 #ifdef emacs
 #define malloc unexec_malloc

=== modified file 'src/s/freebsd.h'
--- a/src/s/freebsd.h   2012-07-12 02:14:29 +0000
+++ b/src/s/freebsd.h   2012-07-13 02:34:05 +0000
@@ -23,16 +23,6 @@
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
-/* This silences a few compilation warnings.  */
-#undef BSD_SYSTEM
-#if __FreeBSD__ == 1
-#define BSD_SYSTEM 199103
-#elif __FreeBSD__ == 2
-#define BSD_SYSTEM 199306
-#elif __FreeBSD__ >= 3
-#define BSD_SYSTEM 199506
-#endif
-
 /* Tell that garbage collector that setjmp is known to save all
    registers relevant for conservative garbage collection in the jmp_buf.  */
 #define GC_SETJMP_WORKS 1

=== modified file 'src/s/gnu-linux.h'
--- a/src/s/gnu-linux.h 2012-07-13 00:19:10 +0000
+++ b/src/s/gnu-linux.h 2012-07-13 02:34:05 +0000
@@ -20,18 +20,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-#define USG
-#define GNU_LINUX
-
-/* Here, on a separate page, add any special hacks needed
-   to make Emacs work on this system.  For example,
-   you might define certain system call names that don't
-   exist on your system, or that do different things on
-   your system and must be used only through an encapsulation
-   (Which you should place, by convention, in sysdep.c).  */
-
 #ifdef __ia64__
 #define GC_MARK_SECONDARY_STACK()                              \
   do {                                                         \

=== modified file 'src/s/hpux10-20.h'
--- a/src/s/hpux10-20.h 2012-07-12 21:14:13 +0000
+++ b/src/s/hpux10-20.h 2012-07-13 02:34:05 +0000
@@ -17,15 +17,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-#define USG                            /* System III, System V, etc */
-#define USG5
-#define HPUX
-
-/* Special hacks needed to make Emacs run on this system.  */
-
 /* We have to go this route, rather than hpux9's approach of renaming the
    functions via macros.  The system's stdlib.h has fully prototyped
    declarations, which yields a conflicting definition of srand48; it

=== modified file 'src/s/irix6-5.h'
--- a/src/s/irix6-5.h   2012-07-13 00:19:10 +0000
+++ b/src/s/irix6-5.h   2012-07-13 02:34:05 +0000
@@ -17,8 +17,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-#define IRIX6_5                        /* used in m/iris4d */
 #include "usg5-4-common.h"
 
 #undef _longjmp /* use system versions, not conservative aliases */

=== modified file 'src/s/sol2-6.h'
--- a/src/s/sol2-6.h    2012-07-12 07:43:05 +0000
+++ b/src/s/sol2-6.h    2012-07-13 02:34:05 +0000
@@ -19,6 +19,4 @@
 
 #include "usg5-4-common.h"
 
-#define SOLARIS2
-
 #define GC_SETJMP_WORKS 1

=== modified file 'src/s/template.h'
--- a/src/s/template.h  2012-07-12 06:34:40 +0000
+++ b/src/s/template.h  2012-07-13 02:34:05 +0000
@@ -19,16 +19,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-
-/* #define USG5 */
-/* #define USG */
-/* #define HPUX */
-/* #define BSD4_2 */
-/* #define BSD_SYSTEM */
-
 /* subprocesses should be undefined if you do NOT want to
    have code for asynchronous subprocesses
    (as used in M-x compile and M-x shell).

=== modified file 'src/s/usg5-4-common.h'
--- a/src/s/usg5-4-common.h     2012-07-13 01:19:06 +0000
+++ b/src/s/usg5-4-common.h     2012-07-13 02:34:05 +0000
@@ -20,13 +20,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Use the SysVr3 file for at least base configuration.  */
-#define USG                            /* System III, System V, etc */
-
-#define USG5
-/* Nothing in Emacs use this any more.  */
-/* #define USG5_4 */
-
 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
    but they will run slower.  */
 #define _setjmp setjmp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]