Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
0e926e56
Commit
0e926e56
authored
Jul 06, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assume freestanding C89 headers, string.h, stdlib.h.
parent
59361254
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
64 additions
and
175 deletions
+64
-175
ChangeLog
ChangeLog
+9
-0
configure.in
configure.in
+2
-11
lib-src/ChangeLog
lib-src/ChangeLog
+8
-0
lib-src/ebrowse.c
lib-src/ebrowse.c
+0
-4
lib-src/etags.c
lib-src/etags.c
+2
-23
lib-src/makefile.w32-in
lib-src/makefile.w32-in
+1
-1
lib-src/movemail.c
lib-src/movemail.c
+0
-2
lib-src/pop.c
lib-src/pop.c
+0
-2
lib-src/update-game-score.c
lib-src/update-game-score.c
+0
-7
nt/ChangeLog
nt/ChangeLog
+7
-0
nt/config.nt
nt/config.nt
+0
-8
src/ChangeLog
src/ChangeLog
+14
-0
src/data.c
src/data.c
+0
-3
src/doprnt.c
src/doprnt.c
+0
-5
src/floatfns.c
src/floatfns.c
+0
-3
src/gmalloc.c
src/gmalloc.c
+4
-52
src/print.c
src/print.c
+0
-3
src/regex.c
src/regex.c
+17
-39
src/s/aix4-2.h
src/s/aix4-2.h
+0
-5
src/s/ms-w32.h
src/s/ms-w32.h
+0
-5
src/sysdep.c
src/sysdep.c
+0
-2
No files found.
ChangeLog
View file @
0e926e56
2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
Assume freestanding C89 headers, string.h, stdlib.h.
Again, this simplifies the code, and all current platforms have these.
* configure.in (AC_CHECK_HEADERS): Don't check for limits.h.
(AC_HEADER_STDC): Remove.
(AC_CHECK_FUNCS): No need to check for strchr, strrchr.
(strchr, strrchr): Remove fallback macros.
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
Assume support for memcmp, memcpy, memmove, memset.
Assume support for memcmp, memcpy, memmove, memset.
...
...
configure.in
View file @
0e926e56
...
@@ -1211,7 +1211,7 @@ fi
...
@@ -1211,7 +1211,7 @@ fi
dnl checks for header files
dnl checks for header files
AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \
AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h
limits.h
\
linux/version.h sys/systeminfo.h \
stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
sys/utsname.h pwd.h utmp.h dirent.h util.h)
sys/utsname.h pwd.h utmp.h dirent.h util.h)
...
@@ -1230,7 +1230,6 @@ fi
...
@@ -1230,7 +1230,6 @@ fi
dnl On Solaris 8 there's a compilation warning for term.h because
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define `bool'.
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
AC_CHECK_HEADERS(term.h, , , -)
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_TIME
AC_CHECK_DECLS([sys_siglist])
AC_CHECK_DECLS([sys_siglist])
if test $ac_cv_have_decl_sys_siglist != yes; then
if test $ac_cv_have_decl_sys_siglist != yes; then
...
@@ -2702,7 +2701,7 @@ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
...
@@ -2702,7 +2701,7 @@ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
random lrand48 logb frexp fmod rint cbrt ftime setsid \
random lrand48 logb frexp fmod rint cbrt ftime setsid \
strerror fpathconf select euidaccess getpagesize tzset setlocale \
strerror fpathconf select euidaccess getpagesize tzset setlocale \
utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
__fpending mblen mbrlen mbsinit strsignal setitimer ualarm
strchr strrchr
\
__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
sendto recvfrom getsockopt setsockopt getsockname getpeername \
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap fsync sync \
gai_strerror mkstemp getline getdelim mremap fsync sync \
difftime mempcpy mblen mbrlen posix_memalign \
difftime mempcpy mblen mbrlen posix_memalign \
...
@@ -3582,14 +3581,6 @@ AH_BOTTOM([
...
@@ -3582,14 +3581,6 @@ AH_BOTTOM([
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
#ifndef HAVE_STRCHR
#define strchr(a, b) index (a, b)
#endif
#ifndef HAVE_STRRCHR
#define strrchr(a, b) rindex (a, b)
#endif
#if defined __GNUC__ && (__GNUC__ > 2 \
#if defined __GNUC__ && (__GNUC__ > 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|| (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define NO_RETURN __attribute__ ((__noreturn__))
#define NO_RETURN __attribute__ ((__noreturn__))
...
...
lib-src/ChangeLog
View file @
0e926e56
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
Assume freestanding C89 headers, string.h, stdlib.h.
* ebrowse.c: Include stdlib.h unconditionally.
* etags.c, update-game-score.c:
Include string.h and stdlib.h unconditionally.
* makefile.w32-in (LOCAL_CFLAGS): Don't define STDC_HEADERS.
* movemail.c, pop.c: Include string.h unconditionally.
* update-game-score.c: No need to include stdarg.h; not used.
Assume support for memcmp, memcpy, memmove, memset.
Assume support for memcmp, memcpy, memmove, memset.
* etags.c (absolute_filename): Assume memmove exists.
* etags.c (absolute_filename): Assume memmove exists.
...
...
lib-src/ebrowse.c
View file @
0e926e56
...
@@ -20,11 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -20,11 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <config.h>
#include <stdio.h>
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <stdlib.h>
#endif
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <assert.h>
#include <assert.h>
...
...
lib-src/etags.c
View file @
0e926e56
...
@@ -138,9 +138,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
...
@@ -138,9 +138,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#endif /* MSDOS */
#endif /* MSDOS */
#ifdef WINDOWSNT
#ifdef WINDOWSNT
# include <stdlib.h>
# include <fcntl.h>
# include <fcntl.h>
# include <string.h>
# include <direct.h>
# include <direct.h>
# include <io.h>
# include <io.h>
# define MAXPATHLEN _MAX_PATH
# define MAXPATHLEN _MAX_PATH
...
@@ -151,27 +149,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
...
@@ -151,27 +149,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
# define HAVE_GETCWD
# define HAVE_GETCWD
# endif /* undef HAVE_GETCWD */
# endif /* undef HAVE_GETCWD */
#else /* not WINDOWSNT */
#else /* not WINDOWSNT */
# ifdef STDC_HEADERS
# include <stdlib.h>
# include <string.h>
# else /* no standard C headers */
extern char *getenv (const char *);
extern char *strcpy (char *, const char *);
extern char *strncpy (char *, const char *, unsigned long);
extern char *strcat (char *, const char *);
extern char *strncat (char *, const char *, unsigned long);
extern int strcmp (const char *, const char *);
extern int strncmp (const char *, const char *, unsigned long);
extern int system (const char *);
extern unsigned long strlen (const char *);
extern void *malloc (unsigned long);
extern void *realloc (void *, unsigned long);
extern void exit (int);
extern void free (void *);
extern void *memmove (void *, const void *, unsigned long);
# define EXIT_SUCCESS 0
# define EXIT_FAILURE 1
# endif
#endif /* !WINDOWSNT */
#endif /* !WINDOWSNT */
#include <unistd.h>
#include <unistd.h>
...
@@ -181,6 +158,8 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
...
@@ -181,6 +158,8 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
# endif
# endif
#endif /* HAVE_UNISTD_H */
#endif /* HAVE_UNISTD_H */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <errno.h>
#include <errno.h>
...
...
lib-src/makefile.w32-in
View file @
0e926e56
...
@@ -21,7 +21,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient
...
@@ -21,7 +21,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient
.PHONY
:
$(ALL)
.PHONY
:
$(ALL)
LOCAL_FLAGS
=
-DWINDOWSNT
-DDOS_NT
-D
STDC_HEADERS
=
1
-D
NO_LDAV
=
1
\
LOCAL_FLAGS
=
-DWINDOWSNT
-DDOS_NT
-DNO_LDAV
=
1
\
-DNO_ARCHIVES
=
1
-DHAVE_CONFIG_H
=
1
-I
../lib
\
-DNO_ARCHIVES
=
1
-DHAVE_CONFIG_H
=
1
-I
../lib
\
-I
../nt/inc
-I
../src
-I
../nt/inc
-I
../src
...
...
lib-src/movemail.c
View file @
0e926e56
...
@@ -68,9 +68,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -68,9 +68,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_FCNTL_H
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <fcntl.h>
#endif
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#include <string.h>
#endif
#include "syswait.h"
#include "syswait.h"
#ifdef MAIL_USE_POP
#ifdef MAIL_USE_POP
#include "pop.h"
#include "pop.h"
...
...
lib-src/pop.c
View file @
0e926e56
...
@@ -65,9 +65,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
...
@@ -65,9 +65,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
#include <netdb.h>
#include <netdb.h>
#include <errno.h>
#include <errno.h>
#include <stdio.h>
#include <stdio.h>
#ifdef STDC_HEADERS
#include <string.h>
#include <string.h>
#endif
#include <unistd.h>
#include <unistd.h>
#ifdef KERBEROS
#ifdef KERBEROS
...
...
lib-src/update-game-score.c
View file @
0e926e56
...
@@ -35,12 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -35,12 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <unistd.h>
#include <errno.h>
#include <errno.h>
#ifdef HAVE_STRING_H
#include <string.h>
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <stdlib.h>
#endif
#include <stdio.h>
#include <stdio.h>
#include <time.h>
#include <time.h>
#include <pwd.h>
#include <pwd.h>
...
@@ -48,9 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -48,9 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_FCNTL_H
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <fcntl.h>
#endif
#endif
#ifdef STDC_HEADERS
#include <stdarg.h>
#endif
#include <sys/stat.h>
#include <sys/stat.h>
/* Needed for SunOS4, for instance. */
/* Needed for SunOS4, for instance. */
...
...
nt/ChangeLog
View file @
0e926e56
2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
Assume freestanding C89 headers, string.h, stdlib.h.
* config.nt (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
(STDC_HEADERS): Remove.
Iinclude string.h, stdlib.h unconditionally.
2011-06-07 Eli Zaretskii <eliz@gnu.org>
2011-06-07 Eli Zaretskii <eliz@gnu.org>
* inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
* inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
...
...
nt/config.nt
View file @
0e926e56
...
@@ -131,12 +131,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -131,12 +131,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef HAVE_LINUX_VERSION_H
#undef HAVE_LINUX_VERSION_H
#undef HAVE_SYS_SYSTEMINFO_H
#undef HAVE_SYS_SYSTEMINFO_H
#undef HAVE_TERMIOS_H
#undef HAVE_TERMIOS_H
#undef HAVE_LIMITS_H
#undef HAVE_STRING_H
#undef HAVE_STRINGS_H
#undef HAVE_STRINGS_H
#undef HAVE_STDLIB_H
#undef HAVE_PWD_H
#undef HAVE_PWD_H
#undef STDC_HEADERS
#undef HAVE_LIBDNET
#undef HAVE_LIBDNET
#undef HAVE_LIBPTHREADS
#undef HAVE_LIBPTHREADS
...
@@ -506,15 +502,11 @@ extern char *getenv ();
...
@@ -506,15 +502,11 @@ extern char *getenv ();
#define PROTOTYPES 1
#define PROTOTYPES 1
#endif
#endif
#ifdef HAVE_STRING_H
#include "string.h"
#include "string.h"
#endif
#ifdef HAVE_STRINGS_H
#ifdef HAVE_STRINGS_H
#include "strings.h"
#include "strings.h"
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <stdlib.h>
#endif
#ifndef NO_RETURN
#ifndef NO_RETURN
#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 5))
#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 5))
...
...
src/ChangeLog
View file @
0e926e56
2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
Assume freestanding C89 headers, string.h, stdlib.h.
* data.c, doprnt.c, floatfns.c, print.c:
Include float.h unconditionally.
* gmalloc.c: Assume C89-at-least behavior for preprocessor,
limits.h, stddef.h, string.h. Use memset instead of 'flood'.
* regex.c: Likewise for stddef.h, string.h.
(ISASCII): Remove; can assume it returns 1 now. All uses removed.
* s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
* s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
(STDC_HEADERS): Remove obsolete defines.
* sysdep.c: Include limits.h unconditionally.
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
Assume support for memcmp, memcpy, memmove, memset.
Assume support for memcmp, memcpy, memmove, memset.
...
...
src/data.c
View file @
0e926e56
...
@@ -35,10 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -35,10 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "termhooks.h"
/* For FRAME_KBOARD reference in y-or-n-p. */
#include "termhooks.h"
/* For FRAME_KBOARD reference in y-or-n-p. */
#include "font.h"
#include "font.h"
#ifdef STDC_HEADERS
#include <float.h>
#include <float.h>
#endif
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
#ifndef IEEE_FLOATING_POINT
#ifndef IEEE_FLOATING_POINT
#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
...
...
src/doprnt.c
View file @
0e926e56
...
@@ -102,13 +102,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -102,13 +102,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <setjmp.h>
#include <setjmp.h>
#ifdef STDC_HEADERS
#include <float.h>
#include <float.h>
#endif
#include <unistd.h>
#include <unistd.h>
#include <limits.h>
#include <limits.h>
#include "lisp.h"
#include "lisp.h"
...
...
src/floatfns.c
View file @
0e926e56
...
@@ -53,10 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
...
@@ -53,10 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "lisp.h"
#include "lisp.h"
#include "syssignal.h"
#include "syssignal.h"
#if STDC_HEADERS
#include <float.h>
#include <float.h>
#endif
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
#ifndef IEEE_FLOATING_POINT
#ifndef IEEE_FLOATING_POINT
#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
...
...
src/gmalloc.c
View file @
0e926e56
...
@@ -41,28 +41,13 @@ Fifth Floor, Boston, MA 02110-1301, USA.
...
@@ -41,28 +41,13 @@ Fifth Floor, Boston, MA 02110-1301, USA.
#define USE_PTHREAD
#define USE_PTHREAD
#endif
#endif
#if ((defined __cplusplus || (defined (__STDC__) && __STDC__) \
|| defined STDC_HEADERS || defined PROTOTYPES))
#undef PP
#undef PP
#define PP(args) args
#define PP(args) args
#undef __ptr_t
#undef __ptr_t
#define __ptr_t void *
#define __ptr_t void *
#else
/* Not C++ or ANSI C. */
#undef PP
#define PP(args) ()
#undef __ptr_t
#define __ptr_t char *
#endif
/* C++ or ANSI C. */
#include <string.h>
#include <string.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
#include <limits.h>
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif
#include <unistd.h>
#include <unistd.h>
#ifdef USE_PTHREAD
#ifdef USE_PTHREAD
...
@@ -77,26 +62,9 @@ extern "C"
...
@@ -77,26 +62,9 @@ extern "C"
{
{
#endif
#endif
#ifdef STDC_HEADERS
#include <stddef.h>
#include <stddef.h>
#define __malloc_size_t size_t
#define __malloc_size_t size_t
#define __malloc_ptrdiff_t ptrdiff_t
#define __malloc_ptrdiff_t ptrdiff_t
#else
#ifdef __GNUC__
#include <stddef.h>
#ifdef __SIZE_TYPE__
#define __malloc_size_t __SIZE_TYPE__
#endif
#endif
#ifndef __malloc_size_t
#define __malloc_size_t unsigned int
#endif
#define __malloc_ptrdiff_t int
#endif
#ifndef NULL
#define NULL 0
#endif
/* Allocate SIZE bytes of memory. */
/* Allocate SIZE bytes of memory. */
...
@@ -1881,22 +1849,6 @@ struct hdr
...
@@ -1881,22 +1849,6 @@ struct hdr
unsigned
long
int
magic
;
/* Magic number to check header integrity. */
unsigned
long
int
magic
;
/* Magic number to check header integrity. */
};
};
#if defined(_LIBC) || defined(STDC_HEADERS) || defined(USG)
#define flood memset
#else
static
void
flood
(
__ptr_t
,
int
,
__malloc_size_t
);
static
void
flood
(
ptr
,
val
,
size
)
__ptr_t
ptr
;
int
val
;
__malloc_size_t
size
;
{
char
*
cp
=
ptr
;
while
(
size
--
)
*
cp
++
=
val
;
}
#endif
static
enum
mcheck_status
checkhdr
(
const
struct
hdr
*
);
static
enum
mcheck_status
checkhdr
(
const
struct
hdr
*
);
static
enum
mcheck_status
static
enum
mcheck_status
checkhdr
(
hdr
)
checkhdr
(
hdr
)
...
@@ -1935,7 +1887,7 @@ freehook (ptr)
...
@@ -1935,7 +1887,7 @@ freehook (ptr)
hdr
=
((
struct
hdr
*
)
ptr
)
-
1
;
hdr
=
((
struct
hdr
*
)
ptr
)
-
1
;
checkhdr
(
hdr
);
checkhdr
(
hdr
);
hdr
->
magic
=
MAGICFREE
;
hdr
->
magic
=
MAGICFREE
;
flood
(
ptr
,
FREEFLOOD
,
hdr
->
size
);
memset
(
ptr
,
FREEFLOOD
,
hdr
->
size
);
}
}
else
else
hdr
=
NULL
;
hdr
=
NULL
;
...
@@ -1961,7 +1913,7 @@ mallochook (size)
...
@@ -1961,7 +1913,7 @@ mallochook (size)
hdr
->
size
=
size
;
hdr
->
size
=
size
;
hdr
->
magic
=
MAGICWORD
;
hdr
->
magic
=
MAGICWORD
;
((
char
*
)
&
hdr
[
1
])[
size
]
=
MAGICBYTE
;
((
char
*
)
&
hdr
[
1
])[
size
]
=
MAGICBYTE
;
flood
((
__ptr_t
)
(
hdr
+
1
),
MALLOCFLOOD
,
size
);
memset
((
__ptr_t
)
(
hdr
+
1
),
MALLOCFLOOD
,
size
);
return
(
__ptr_t
)
(
hdr
+
1
);
return
(
__ptr_t
)
(
hdr
+
1
);
}
}
...
@@ -1981,7 +1933,7 @@ reallochook (ptr, size)
...
@@ -1981,7 +1933,7 @@ reallochook (ptr, size)
checkhdr
(
hdr
);
checkhdr
(
hdr
);
if
(
size
<
osize
)
if
(
size
<
osize
)
flood
((
char
*
)
ptr
+
size
,
FREEFLOOD
,
osize
-
size
);
memset
((
char
*
)
ptr
+
size
,
FREEFLOOD
,
osize
-
size
);
}
}
__free_hook
=
old_free_hook
;
__free_hook
=
old_free_hook
;
...
@@ -1998,7 +1950,7 @@ reallochook (ptr, size)
...
@@ -1998,7 +1950,7 @@ reallochook (ptr, size)
hdr
->
magic
=
MAGICWORD
;
hdr
->
magic
=
MAGICWORD
;
((
char
*
)
&
hdr
[
1
])[
size
]
=
MAGICBYTE
;
((
char
*
)
&
hdr
[
1
])[
size
]
=
MAGICBYTE
;
if
(
size
>
osize
)
if
(
size
>
osize
)
flood
((
char
*
)
(
hdr
+
1
)
+
osize
,
MALLOCFLOOD
,
size
-
osize
);
memset
((
char
*
)
(
hdr
+
1
)
+
osize
,
MALLOCFLOOD
,
size
-
osize
);
return
(
__ptr_t
)
(
hdr
+
1
);
return
(
__ptr_t
)
(
hdr
+
1
);
}
}
...
...
src/print.c
View file @
0e926e56
...
@@ -46,10 +46,7 @@ static Lisp_Object Qtemp_buffer_setup_hook;
...
@@ -46,10 +46,7 @@ static Lisp_Object Qtemp_buffer_setup_hook;
static
Lisp_Object
Qfloat_output_format
;
static
Lisp_Object
Qfloat_output_format
;
#include <math.h>
#include <math.h>
#if STDC_HEADERS
#include <float.h>
#include <float.h>
#endif
#include <ftoastr.h>
#include <ftoastr.h>
/* Default to values appropriate for IEEE floating point. */
/* Default to values appropriate for IEEE floating point. */
...
...
src/regex.c
View file @
0e926e56
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
# include <config.h>
# include <config.h>
#endif
#endif
#i
f defined STDC_HEADERS && !defined emacs
#i
nclude <stddef.h>
# include <stddef.h>
#
else
#
ifdef emacs
/* We need this for `regex.h', and perhaps for the Emacs include files. */
/* We need this for `regex.h', and perhaps for the Emacs include files. */
# include <sys/types.h>
# include <sys/types.h>
#endif
#endif
...
@@ -346,25 +346,6 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
...
@@ -346,25 +346,6 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
#else
/* not emacs */
#else
/* not emacs */
/* Jim Meyering writes:
"... Some ctype macros are valid only for character codes that
isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
using /bin/cc or gcc but without giving an ansi option). So, all
ctype uses should be through macros like ISPRINT... If
STDC_HEADERS is defined, then autoconf has verified that the ctype
macros don't need to be guarded with references to isascii. ...
Defining isascii to 1 should let any compiler worth its salt
eliminate the && through constant folding."
Solaris defines some of these symbols so we must undefine them first. */
# undef ISASCII
# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
# define ISASCII(c) 1
# else
# define ISASCII(c) isascii(c)
# endif
/* 1 if C is an ASCII character. */
/* 1 if C is an ASCII character. */
# define IS_REAL_ASCII(c) ((c) < 0200)
# define IS_REAL_ASCII(c) ((c) < 0200)
...
@@ -372,27 +353,28 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
...
@@ -372,27 +353,28 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
# define ISUNIBYTE(c) 1
# define ISUNIBYTE(c) 1
# ifdef isblank
# ifdef isblank
# define ISBLANK(c)
(ISASCII (c) && isblank (c)
)
# define ISBLANK(c)
isblank (c
)
# else
# else
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
# endif
# endif
# ifdef isgraph
# ifdef isgraph
# define ISGRAPH(c)
(ISASCII (c) && isgraph (c)
)
# define ISGRAPH(c)
isgraph (c
)
# else
# else
# define ISGRAPH(c) (
ISASCII (c) &&
isprint (c) && !isspace (c))
# define ISGRAPH(c) (isprint (c) && !isspace (c))
# endif
# endif
/* Solaris defines ISPRINT so we must undefine it first. */
# undef ISPRINT
# undef ISPRINT
# define ISPRINT(c)
(ISASCII (c) && isprint (c)
)
# define ISPRINT(c)
isprint (c
)
# define ISDIGIT(c)
(ISASCII (c) && isdigit (c)
)
# define ISDIGIT(c)
isdigit (c
)
# define ISALNUM(c)
(ISASCII (c) && isalnum (c)
)
# define ISALNUM(c)
isalnum (c
)
# define ISALPHA(c)
(ISASCII (c) && isalpha (c)
)
# define ISALPHA(c)
isalpha (c
)
# define ISCNTRL(c)
(ISASCII (c) && iscntrl (c)
)
# define ISCNTRL(c)
iscntrl (c
)
# define ISLOWER(c)
(ISASCII (c) && islower (c)
)
# define ISLOWER(c)
islower (c
)
# define ISPUNCT(c)
(ISASCII (c) && ispunct (c)
)
# define ISPUNCT(c)
ispunct (c
)
# define ISSPACE(c)
(ISASCII (c) && isspace (c)
)
# define ISSPACE(c)
isspace (c
)
# define ISUPPER(c)
(ISASCII (c) && isupper (c)
)
# define ISUPPER(c)
isupper (c
)
# define ISXDIGIT(c)
(ISASCII (c) && isxdigit (c)
)
# define ISXDIGIT(c)
isxdigit (c
)
# define ISWORD(c) ISALPHA(c)
# define ISWORD(c) ISALPHA(c)
...
@@ -439,10 +421,6 @@ init_syntax_once (void)
...
@@ -439,10 +421,6 @@ init_syntax_once (void)
#endif
/* not emacs */
#endif
/* not emacs */
#ifndef NULL
# define NULL (void *)0
#endif
/* We remove any previous definition of `SIGN_EXTEND_CHAR',
/* We remove any previous definition of `SIGN_EXTEND_CHAR',
since ours (we hope) works properly with all combinations of
since ours (we hope) works properly with all combinations of
machines, compilers, `char' and `unsigned char' argument types.
machines, compilers, `char' and `unsigned char' argument types.
...
...
src/s/aix4-2.h
View file @
0e926e56