Work around porting bugs reported by Dieter in
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Jan 2006 07:40:58 +0000 (07:40 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Jan 2006 07:40:58 +0000 (07:40 +0000)
commit673458cfd60022db792628b671933064ae862424
treebf853c66f77e65c8860e9417a59b0fe1f3e51b03
parent48f0b48d48240f7aa94e3f30cf3f007357468e30
Work around porting bugs reported by Dieter in
<http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
* lib/getopt.c (_NOPROTO): Remove; no longer needed.
Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
Include "getopt.h" first, to check interface.
(getenv): Declare only if defined HAVE_DECL_GETENV &&
!HAVE_DECL_GETENV.
* lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
(__strndup): Revert to K&R-style function dfns, the glibc style.
* lib/strnlen.c: Don't claim it's taken from glibc; it's not.
(strnlen, __strnlen): Remove #defines and #undefs; not needed.
Include strnlen.h first, to get prototype properly.
(strnlen): Renamed from __strnlen.
Remove weak alias.
* m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
lib/ChangeLog
lib/getopt.c
lib/strndup.c
lib/strnlen.c
m4/ChangeLog
m4/getopt.m4