* getopt_.h: Add __getopt_argv_const. Include <stdlib.h> and <stdio.h>
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Nov 2004 21:23:56 +0000 (21:23 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Nov 2004 21:23:56 +0000 (21:23 +0000)
along with <unistd.h>.

lib/ChangeLog

index 64c362f812ca299e15eec5677e32d62f713cbb92..4fe3ca97e602a721b98577e5ed4467d347d60d76 100644 (file)
@@ -1,7 +1,18 @@
 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * getopt_.h (__getopt_argv_const): New macro, to be used so that
+       we can stop lying to compilers about the constness of argv when we
+       are compiled outside glibc.
+       (getopt, getopt_long, getopt_long_only): Use it.
+       * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal,
+       getopt): Likewise.
+       * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
+       _getopt_long_only_r): Likewise.
+       * getopt_int.h (_getopt_internal, _getopt_internal_r, _getopt_long_r,
+       _getopt_long_only_r): Likewise.
+
        * getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
-       Include <unistd.h> if available.
+       Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
        Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
        the other external symbols.
        (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style