diff options
author | Paul Eggert <eggert@twinsun.com> | 1999-11-22 08:19:51 +0000 |
---|---|---|
committer | Paul Eggert <eggert@twinsun.com> | 1999-11-22 08:19:51 +0000 |
commit | ca9c056758a507f1508933de24d2410188b978fb (patch) | |
tree | 6da0a2b930d59b0c44dbd8f6d29faf8564589319 /src/gmalloc.c | |
parent | b718982a2a661a3bf4bb226ff164925c3d0f9ed3 (diff) | |
download | emacs-ca9c056758a507f1508933de24d2410188b978fb.tar.gz |
* callproc.c (strerror): Remove decl.
* fileio.c (strerror): Likewise.
* process.c (strerror): Likewise.
* emacs.c (strerror): Likewise.
(Vsystem_messages_locale): Renamed from Vmessages_locale.
All uses changed.
(Vprevious_system_messages_locale): Likewise, from
Vprevious_messages_locale.
(Vsystem_time_locale): Likewise, from Vtime_locale.
(Vprevious_system_time_locale): Likewise, from Vprevious_time_locale.
(ABORT_RETURN_TYPE): New macro.
(abort): Return type is now ABORT_RETURN_TYPE.
(main): Always invoke init_signals, even if POSIX_SIGNALS is not
defined.
(syms_of_emacs): messages-locale -> system-messages-locale,
previous-messages-locale -> previous-system-messages-locale,
time-locale -> system-time-locale,
previous-time-locale -> previous-system-time-locale.
* gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined.
(const): Do not define; that's config.h's job.
(<limits.h>): Include if HAVE_LIMITS_H is defined.
(CHAR_BIT): Move test for definedness outside of limits.h condition.
(<stddef.h>): Include if STDC_HEADERS is defined.
(FREE_RETURN_TYPE): New macro.
(free): Return type is now FREE_RETURN_TYPE.
* lisp.h (synchronize_system_time_locale): Renamed from
synchronize_time_locale. All uses changed.
(synchronize_system_messages_locale): Likewise, from
synchronize_messages_locale.
* process.c (sys_siglist): Remove.
* syntax.c (scan_sexps_forward): Use abort, not assert.
* sysdep.c (my_sys_siglist): New var.
(sys_siglist): New macro. Remove old initialized vars of same name.
(init_signals): Initialize sys_siglist.
* xfns.c (abort): Remove decl; stdlib.h now does this.
Diffstat (limited to 'src/gmalloc.c')
-rw-r--r-- | src/gmalloc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c index b291903fa50..9bf84235ee5 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -36,7 +36,7 @@ Cambridge, MA 02139, USA. #include <config.h> #endif -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) +#if defined __cplusplus || (defined (__STDC__) && __STDC__) || defined STDC_HEADERS #undef PP #define PP(args) args #undef __ptr_t @@ -44,10 +44,6 @@ Cambridge, MA 02139, USA. #else /* Not C++ or ANSI C. */ #undef PP #define PP(args) () -#ifndef HAVE_CONFIG_H -#undef const -#define const -#endif #undef __ptr_t #define __ptr_t char * #endif /* C++ or ANSI C. */ @@ -63,13 +59,12 @@ Cambridge, MA 02139, USA. #endif #endif -#if defined (__GNU_LIBRARY__) || (defined (__STDC__) && __STDC__) +#ifdef HAVE_LIMITS_H #include <limits.h> -#else +#endif #ifndef CHAR_BIT #define CHAR_BIT 8 #endif -#endif #ifdef HAVE_UNISTD_H #include <unistd.h> @@ -83,7 +78,7 @@ extern "C" { #endif -#if defined (__STDC__) && __STDC__ +#ifdef STDC_HEADERS #include <stddef.h> #define __malloc_size_t size_t #define __malloc_ptrdiff_t ptrdiff_t @@ -96,6 +91,10 @@ extern "C" #define NULL 0 #endif +#ifndef FREE_RETURN_TYPE +#define FREE_RETURN_TYPE void +#endif + /* Allocate SIZE bytes of memory. */ extern __ptr_t malloc PP ((__malloc_size_t __size)); @@ -105,7 +104,7 @@ extern __ptr_t realloc PP ((__ptr_t __ptr, __malloc_size_t __size)); /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size)); /* Free a block allocated by `malloc', `realloc' or `calloc'. */ -extern void free PP ((__ptr_t __ptr)); +extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr)); /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ @@ -1128,7 +1127,8 @@ _free_internal (ptr) } /* Return memory to the heap. */ -void + +FREE_RETURN_TYPE free (ptr) __ptr_t ptr; { |