summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-07-10 00:15:05 -0700
committerGlenn Morris <rgm@gnu.org>2012-07-10 00:15:05 -0700
commit882cf227ab70fc5cd7252781bd55febfbcad27d5 (patch)
treeaba4dbf427dcc09623dd4d79a399bf48644a618f
parentc293e30cd9f841e59ce6ae3b2757f0e6daf2e71d (diff)
downloademacs-882cf227ab70fc5cd7252781bd55febfbcad27d5.tar.gz
Move DATA_START, DATA_SEG_BITS from src/s to configure
* configure.ac (DATA_START, DATA_SEG_BITS): Move here from src/s. * src/s/irix6-5.h (DATA_START, DATA_SEG_BITS): * src/s/hpux10-20.h (DATA_SEG_BITS, DATA_START): * src/s/gnu.h (DATA_START): Move definitions to configure.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac26
-rw-r--r--src/ChangeLog4
-rw-r--r--src/s/gnu.h3
-rw-r--r--src/s/hpux10-20.h5
-rw-r--r--src/s/irix6-5.h7
6 files changed, 34 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e949b4a9d0..4504739928b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-10 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (DATA_START, DATA_SEG_BITS): Move here from src/s.
+
2012-07-09 Andreas Schwab <schwab@linux-m68k.org>
* configure.ac (PNG_DEPSTRUCT): Define this instead of
diff --git a/configure.ac b/configure.ac
index 6f4b3d51c89..20b149f58e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3145,6 +3145,32 @@ case $opsys in
;;
esac
+dnl Used in vm-limit.c
+AH_TEMPLATE(DATA_START, [Address of the start of the data segment.])
+dnl Used in lisp.h, emacs.c, mem-limits.h
+dnl NEWS.18 describes this as "a number which contains
+dnl the high bits to be inclusive or'ed with pointers that are unpacked."
+AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers
+stored in a Lisp_Object.])
+dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT.
+
+case $opsys in
+ gnu)
+ dnl libc defines data_start.
+ AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })])
+ ;;
+
+ hpux*)
+ dnl The data segment on this machine always starts at address 0x40000000.
+ AC_DEFINE(DATA_START, [0x40000000])
+ AC_DEFINE(DATA_SEG_BITS, [0x40000000])
+ ;;
+ irix6-5)
+ AC_DEFINE(DATA_START, [0x10000000])
+ AC_DEFINE(DATA_SEG_BITS, [0x10000000])
+ ;;
+esac
+
case $opsys in
gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
diff --git a/src/ChangeLog b/src/ChangeLog
index e54ea7d8fe9..cbfc1245c13 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -11,6 +11,10 @@
2012-07-10 Glenn Morris <rgm@gnu.org>
+ * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
+ * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
+ * s/gnu.h (DATA_START): Move definitions to configure.
+
* s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
We include usg5-4-common.h, which defines them both.
diff --git a/src/s/gnu.h b/src/s/gnu.h
index 8410ad666f5..bac233266c8 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -21,9 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Get most of the stuff from bsd-common */
#include "bsd-common.h"
-/* libc defines data_start. */
-#define DATA_START ({ extern int data_start; (char *) &data_start; })
-
/* It would be harmless to drop the ifdef emacs test. */
#ifdef emacs
#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index 62bb0f4e344..0e47ccee86f 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -79,8 +79,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Conservative garbage collection has not been tested, so for now
play it safe and stick with the old-fashioned way of marking. */
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
-
-/* The data segment on this machine always starts at address 0x40000000. */
-#define DATA_SEG_BITS 0x40000000
-
-#define DATA_START 0x40000000
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index 212a6ffb839..1f50df600d9 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -82,10 +82,3 @@ char *_getpty();
/* Tested on Irix 6.5. SCM worked on earlier versions. */
#define GC_SETJMP_WORKS 1
-
-
-/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- the value field of a LISP_OBJECT). */
-#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000