[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] Modernize AC_INCLUDES_DEFAULT and friends.
From: |
Zack Weinberg |
Subject: |
[PATCH 3/6] Modernize AC_INCLUDES_DEFAULT and friends. |
Date: |
Sat, 14 Sep 2013 12:22:49 -0400 |
* lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
Include stddef.h, stdlib.h, and string.h unconditionally.
Don't include memory.h at all.
Don't use AC_HEADER_STDC.
Don't check for stddef.h, stdlib.h, string.h, or memory.h.
For compatibility, unconditionally define STDC_HEADERS,
HAVE_STDLIB_H, and HAVE_STRING_H.
(AN_HEADER list): Remove C89 headers, and memory.h from list.
(AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger
_AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened,
and do nothing else.
(AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally
as long as sys/time.h is present.
(AC_USG, AC_MEMORY_H): Assume existence of string.h.
* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
Don't use AC_HEADER_STDC. Assume stdlib.h exists.
(AC_FUNC_MKTIME): Don't use AC_HEADER_TIME. Assume time.h exists.
(AC_FUNC_ALLOCA): Assume stdlib.h exists.
(_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist.
(_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists.
(AC_FUNC_MMAP): Assume stdlib.h exists.
* tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in
autoupdate test.
* NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.
Signed-off-by: Zack Weinberg <address@hidden>
---
NEWS | 24 +++
doc/autoconf.texi | 373 ++++++++++++++++++---------------------------
lib/autoconf/functions.m4 | 47 ++-----
lib/autoconf/headers.m4 | 189 +++++++++--------------
tests/tools.at | 6 +-
5 files changed, 257 insertions(+), 382 deletions(-)
0003-Modernize-AC_INCLUDES_DEFAULT-and-friends.patch
Description: Text Data
[PATCH 6/6] Expose the checks done by AC_INCLUDES_DEFAULT as a public macro., Zack Weinberg, 2013/09/15
[PATCH 5/6] Use AC_CHECK_{DECLS, FUNCS, HEADERS}_ONCE more in specific-check macros., Zack Weinberg, 2013/09/15
[PATCH 2/6] AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests., Zack Weinberg, 2013/09/15