Mercurial > hg > octave-nkf > gnulib-hg
diff README @ 14186:cd4635d4dbe6
assume <ctype.h>, ..., <time.h> exist
For years gnulib has been assuming the existence of the headers
<ctime.h>, <errno.h>, <fcntl.h>, <locale.h>, <signal.h>,
<stdio.h>, <stdlib.h>, <string.h>, and <time.h>. Omit checks for
them, since they don't appear to be needed.
* README (Portability guidelines): Document this.
* lib/flock.c: Assume <fcntl.h> exists.
* lib/regex_internal.h: Assume <locale.h> exists.
* m4/ctype.m4 (gl_CTYPE_H): Assume <ctype.h> exists.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Assume <errno.h> exists.
* m4/fcntl_h.m4 (gl_FCNTL_H): Assume <fcntl.h> exists.
* m4/flock.m4 (gl_PREREQ_FLOCK): Likewise.
* m4/locale_h.m4 (gl_LOCALE_H): Assume <locale.h> exists.
* m4/regex.m4 (gl_REGEX): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Assume <signal.h> exists.
* m4/stdio_h.m4 (gl_STDIO_H): Assume <stdio.h> exists.
* m4/stdlib_h.m4 (gl_STDLIB_H): Assume <stdlib.h> exists.
* m4/string_h.m4 (gl_STRING_H): Assume <string.h> exists.
* tests/test-argp.c: Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Assume <time.h> exists.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 19 Jan 2011 22:15:41 -0800 |
parents | 97fc9a21a8fb |
children | e2175e5db896 |
line wrap: on
line diff
--- a/README +++ b/README @@ -221,13 +221,16 @@ Because we assume a freestanding C89 compiler, Gnulib code can include <float.h>, <limits.h>, <stdarg.h>, and <stddef.h> unconditionally. It -can also include hosted headers like <errno.h> that were present in -Unix Version 7 and are thus widely available. Similarly, many modules -include <sys/types.h> even though it's not even in C99; that's OK -since <sys/types.h> has been around nearly forever. <string.h> and +can also assume the existence of <ctime.h>, <errno.h>, <fcntl.h>, +<locale.h>, <signal.h>, <stdio.h>, <stdlib.h>, <string.h>, and +<time.h>. Some of these headers, such as <errno.h>, were present in +Unix Version 7 and are thus widely available. <string.h> and <stdlib.h> were not in Unix Version 7, so they weren't universally available on ancient hosts, but they are both in SunOS 4 (the oldest platform still in relatively-common use) so Gnulib assumes them now. +Similarly, many modules include <sys/types.h> even though it's not +even in C99; that's OK since <sys/types.h> has been around nearly +forever. Even if the include files exist, they may not conform to C89. However, GCC has a "fixincludes" script that attempts to fix most