changeset 4701:1065f1b8e8ec

More changes, mostly C89 related.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 12 Sep 2003 22:38:25 +0000
parents 81030b5e2f20
children 9913494b338a
files ChangeLog lib/ChangeLog m4/ChangeLog
diffstat 3 files changed, 115 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-12  Paul Eggert  <eggert@twinsun.com>
+
+	* modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
+	modules/xgethostname, modules/xalloc: Depend on exit.
+
 2003-09-09  Paul Eggert  <eggert@twinsun.com>
 
 	* README: New section: portability guidelines.
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,66 @@
+2003-09-12  Paul Eggert  <eggert@twinsun.com>
+
+	* argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
+	* obstack.c [!defined _LIBC]: Likewise.
+	* argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
+	* exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
+	* exitfail.c: Don't include stdlib.h; no longer needed.
+
+	More changes to assume C89 or better.
+
+	* error.c (error_tail): Assume vprintf.
+
+	* argmatch.c (getenv): Remove decl.
+	* progreloc.c (get_full_program_name): Define via prototype.
+	* setenv.c (clearenv): Likewise.
+	* stpncpy.c: Do not include <string.h> or <sys/types.h>; not
+	needed.
+	* strdup.c: Include <stdlib.h>, <string.h> unconditionally.
+	(malloc, memcpy): Remove decls.
+	* strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
+	(HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
+	Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
+	(memcpy): Remove macro.
+	(MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
+	(__P): Remove.  All uses removed.
+	(PTR): Remove.  All uses changed to void *.
+	(CHAR_BIT, NULL): Remove.
+	(spaces, zeros, memset_space, memset_zero)
+	[!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
+	Remove.
+	(LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
+	(memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
+	Define with prototype.
+	Remove now-unnecessary prototype decl.
+	(extra_args_spec): Assume ANSI C.  All uses changed.
+	(extra_args_spec_iso): Remove.
+	(my_strftime, emacs_strftimeu): Define via prototype.
+	* strtod.c: Include <float.h>, <stdlib.h>, <string.h>
+	unconditionally.
+	(DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
+	* strtoimax.c: Include <stdlib.h> unconditionally.
+	(strtoul, strtol): Remove decls.
+	* strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
+	LONG_MAX): Remove.
+	Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
+	(LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
+	(LOCALE_PARAM_PROTO): New macro.
+	(INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
+	(INTERNAL (strtol), strtol): Define with a prototype.
+	(PARAMS): Remove.  All uses removed.
+	* tempname.c: Include <string.h> unconditionally.
+	* userspec.c: Include <stdlib.h>, <string.h> unconditionally.
+	* xgethostname.c (main): Define with a prototype.
+	* xmalloc.c: Include "xalloc.h" first, to check interface.
+	Include <stdlib.h> unconditionally.
+	(calloc, malloc, realloc, free): Remove decls.
+	* xstrtod.c: Include "xstrtod.h" first, to check interface.
+	Include <stdlib.h> unconditionally.  Sort include file names.
+	(strtod): Remove.
+	(xstrtod): Define with a prototype.
+	* xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
+	(strtol, strtoul): Remove decls.
+
 2003-09-11  Paul Eggert  <eggert@twinsun.com>
 
 	* strndup.c: Don't include <stdio.h>, <sys/types.h>.
@@ -5,7 +68,7 @@
 	Remove now-unnecessary cast to char *.
 	* strnlen.c: Include <string.h> unconditionally.
 	* yesno.c (yesno): Define with a prototype.
-	
+
 2003-09-10  Bruno Haible  <bruno@clisp.org>
 
 	* strcspn.c: Include <string.h> unconditionally.
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,9 +1,52 @@
+2003-09-12  Paul Eggert  <eggert@twinsun.com>
+
+	* error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
+
+	* extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
+	and AC_MINIX, too, so that their extensions are available.
+
+	* prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
+	This macro has been superseded by gl_BACKUPFILE.
+
+	More patches to assume C89 or better.
+
+	* error.m4 (gl_ERROR): Don't check for vprintf.
+
+	* check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
+	unconditionally.
+	* closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
+	* gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
+	Include <string.h>, <stdlib.h> unconditionally.
+	* lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
+	* readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
+	* readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C headers
+	or for string.h.
+	* strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlb.h
+	or strtoul.
+
+	* mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C headers.
+	* strdup.m4 (gl_PREREQ_STRDUP): Likewise.
+	* userspec.m4 (gl_USERSPEC): Likewise.
+	* xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
+	* xstrtod.m4 (gl_XSTRTOD): Likewise.
+	* xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
+	* strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
+	memcpy, memset.
+	(jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
+	* strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
+	* strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h, strtol.
+	* strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
+	* userspec.m4 (gl_USERSPEC): Do not check for string.h.
+	* xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
+	strtoul.
+
 2003-09-11  Paul Eggert  <eggert@twinsun.com>
 
+	More patches to assume C89 or better.
 	* strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
 	* strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
 	string.h, memchr, STDC_HEADERS.
-	
+
 2003-09-10  Bruno Haible  <bruno@clisp.org>
 
 	* strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
@@ -17,6 +60,7 @@
 
 2003-09-09  Paul Eggert  <eggert@twinsun.com>
 
+	More patches to assume C89 or better.
 	* getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
 	* getopt.m4 (gl_GETOPT): Don't check for string.h.
 	* getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
@@ -65,7 +109,7 @@
 	* savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
 	* strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
 	* xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
-	
+
 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
 
 	* getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the