diff options
| author | Paul Eggert | 2014-08-31 19:37:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-08-31 19:37:22 -0700 |
| commit | 1564080f0b24551765d7068b9fc02f6e5a78fea3 (patch) | |
| tree | c710c96b8aef1bdb16ae9287b5fd775695a8547c /src/vm-limit.c | |
| parent | 56f9f0ab54fd752773d8bb371a4032e43c9c224c (diff) | |
| download | emacs-1564080f0b24551765d7068b9fc02f6e5a78fea3.tar.gz emacs-1564080f0b24551765d7068b9fc02f6e5a78fea3.zip | |
Clean up extern decls a bit.
* configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs.
While we're at it, don't disable -Wlogical-op either.
* src/bytecode.c: Include blockinput.h and keyboard.h rather
than rolling their APIs by hand.
* src/emacs.c: Include regex.h and rely on its and lisp.h's API
rather than rolling them by hand.
* src/lastfile.c: Include lisp.h, to check this file's API.
* src/lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
New decls.
* src/regex.h (re_max_failures): New decl.
* src/unexcw.c, src/unexmacosx.c, src/unexw32.c:
Rely on lisp.h's API rather than rolling it by hand.
* src/vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
Declare at top level, to pacify GCC -Wnested-externs.
Diffstat (limited to 'src/vm-limit.c')
| -rw-r--r-- | src/vm-limit.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/vm-limit.c b/src/vm-limit.c index 308613f7eb4..015f3ee2111 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c | |||
| @@ -51,6 +51,15 @@ char data_start[1] = { 1 }; | |||
| 51 | # endif | 51 | # endif |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | /* From gmalloc.c. */ | ||
| 55 | extern void (* __after_morecore_hook) (void); | ||
| 56 | extern void *(*__morecore) (ptrdiff_t); | ||
| 57 | |||
| 58 | /* From ralloc.c. */ | ||
| 59 | #ifdef REL_ALLOC | ||
| 60 | extern void *(*real_morecore) (ptrdiff_t); | ||
| 61 | #endif | ||
| 62 | |||
| 54 | /* | 63 | /* |
| 55 | Level number of warnings already issued. | 64 | Level number of warnings already issued. |
| 56 | 0 -- no warnings issued. | 65 | 0 -- no warnings issued. |
| @@ -130,12 +139,9 @@ ret_lim_data (void) | |||
| 130 | static void | 139 | static void |
| 131 | check_memory_limits (void) | 140 | check_memory_limits (void) |
| 132 | { | 141 | { |
| 133 | #ifdef REL_ALLOC | 142 | #ifndef REL_ALLOC |
| 134 | extern void *(*real_morecore) (ptrdiff_t); | ||
| 135 | #else | ||
| 136 | void *(*real_morecore) (ptrdiff_t) = 0; | 143 | void *(*real_morecore) (ptrdiff_t) = 0; |
| 137 | #endif | 144 | #endif |
| 138 | extern void *(*__morecore) (ptrdiff_t); | ||
| 139 | 145 | ||
| 140 | char *cp; | 146 | char *cp; |
| 141 | size_t five_percent; | 147 | size_t five_percent; |
| @@ -203,8 +209,6 @@ check_memory_limits (void) | |||
| 203 | void | 209 | void |
| 204 | memory_warnings (void *start, void (*warnfun) (const char *)) | 210 | memory_warnings (void *start, void (*warnfun) (const char *)) |
| 205 | { | 211 | { |
| 206 | extern void (* __after_morecore_hook) (void); /* From gmalloc.c */ | ||
| 207 | |||
| 208 | data_space_start = start ? start : data_start; | 212 | data_space_start = start ? start : data_start; |
| 209 | 213 | ||
| 210 | warn_function = warnfun; | 214 | warn_function = warnfun; |