diff options
| author | Dan Nicolaescu | 2010-07-07 20:03:52 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-07 20:03:52 -0700 |
| commit | 313d9eb21863418cb91328c3d5ef0c2d356fc483 (patch) | |
| tree | 87aa5f39b43cc9c308839047bc83345d518f5d0a /src/mem-limits.h | |
| parent | d734dbbd24fca96383d2583c36d2a805181cf306 (diff) | |
| download | emacs-313d9eb21863418cb91328c3d5ef0c2d356fc483.tar.gz emacs-313d9eb21863418cb91328c3d5ef0c2d356fc483.zip | |
Simplify start_of_data, start_of_text and related code.
* src/mem-limits.h: Remove !emacs and _LIBC conditional code.
(start_of_data): Merge into start_of_data function.
* src/sysdep.c (start_of_text): Remove. Move simplified versions of
it in the only users: src/unexaix.c and unexec.c.
(read_input_waiting): Remove local declaration of quit_char.
(start, etext): Remove declarations.
(start_of_data): Merge with the version in mem-limits.h and move
to vm-limits.c.
* src/vm-limit.c (start_of_data): Merged and simplified version of the
code formerly in mem-limits.h and sysdep.c.
* src/unexec.c (start): New declaration, moved from sysdep.c.
(start_of_text): Simplified version of the code formerly in sysdep.c.
* unexaix.c (start_of_text): Simplified version of the code
formerly in sysdep.c.
* src/m/alpha.h (HAVE_TEXT_START): Remove.
(TEXT_START): Move ...
* src/unexalpha.c (TEXT_START): ... here.
* src/s/hpux10-20.h (TEXT_START): Remove.
* src/s/darwin.h (TEXT_START):
* src/m/mips.h (TEXT_START):
* src/m/macppc.h (HAVE_TEXT_START):
* src/m/m68k.h (TEXT_START):
* src/m/iris4d.h (TEXT_START):
* src/m/intel386.h (TEXT_START):
* src/m/ibmrs6000.h (TEXT_START):
* src/m/ia64.h (HAVE_TEXT_START):
* src/s/msdos.h (TEXT_START): Likewise.
Diffstat (limited to 'src/mem-limits.h')
| -rw-r--r-- | src/mem-limits.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/mem-limits.h b/src/mem-limits.h index 490a61227ae..a550e1464b8 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h | |||
| @@ -25,17 +25,6 @@ extern int etext; | |||
| 25 | /* Some systems need this before <sys/resource.h>. */ | 25 | /* Some systems need this before <sys/resource.h>. */ |
| 26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
| 27 | 27 | ||
| 28 | #ifdef _LIBC | ||
| 29 | |||
| 30 | #include <sys/resource.h> | ||
| 31 | #define BSD4_2 /* Tell code below to use getrlimit. */ | ||
| 32 | |||
| 33 | /* Old Linux startup code won't define __data_start. */ | ||
| 34 | extern int etext, __data_start; weak_extern (__data_start) | ||
| 35 | #define start_of_data() (&__data_start ?: &etext) | ||
| 36 | |||
| 37 | #else /* not _LIBC */ | ||
| 38 | |||
| 39 | #ifdef HAVE_SYS_RESOURCE_H | 28 | #ifdef HAVE_SYS_RESOURCE_H |
| 40 | # include <sys/time.h> | 29 | # include <sys/time.h> |
| 41 | # include <sys/resource.h> | 30 | # include <sys/resource.h> |
| @@ -54,7 +43,6 @@ extern int etext, __data_start; weak_extern (__data_start) | |||
| 54 | #include <sys/resource.h> | 43 | #include <sys/resource.h> |
| 55 | #endif /* BSD4_2 */ | 44 | #endif /* BSD4_2 */ |
| 56 | 45 | ||
| 57 | #ifdef emacs | ||
| 58 | /* The important properties of this type are that 1) it's a pointer, and | 46 | /* The important properties of this type are that 1) it's a pointer, and |
| 59 | 2) arithmetic on it should work as if the size of the object pointed | 47 | 2) arithmetic on it should work as if the size of the object pointed |
| 60 | to has a size of 1. */ | 48 | to has a size of 1. */ |
| @@ -77,26 +65,5 @@ extern POINTER start_of_data (void); | |||
| 77 | #define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS) | 65 | #define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS) |
| 78 | #endif | 66 | #endif |
| 79 | 67 | ||
| 80 | #ifdef DATA_START | ||
| 81 | #define start_of_data() ((char *)DATA_START) | ||
| 82 | #endif | ||
| 83 | |||
| 84 | #ifdef BSD_SYSTEM | ||
| 85 | #ifndef DATA_SEG_BITS | ||
| 86 | #ifndef DATA_START | ||
| 87 | extern char etext; | ||
| 88 | #define start_of_data() &etext | ||
| 89 | #endif | ||
| 90 | #endif | ||
| 91 | #endif | ||
| 92 | |||
| 93 | #else /* not emacs */ | ||
| 94 | extern char etext; | ||
| 95 | #define start_of_data() &etext | ||
| 96 | #endif /* not emacs */ | ||
| 97 | |||
| 98 | #endif /* not _LIBC */ | ||
| 99 | |||
| 100 | |||
| 101 | /* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5 | 68 | /* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5 |
| 102 | (do not change this comment) */ | 69 | (do not change this comment) */ |