OSDN Git Service

2009-10-08 Eric Blake <ebb9@byu.net>
authorjjohnstn <jjohnstn>
Thu, 8 Oct 2009 16:26:28 +0000 (16:26 +0000)
committerjjohnstn <jjohnstn>
Thu, 8 Oct 2009 16:26:28 +0000 (16:26 +0000)
        * libc/include/getopt.h (__getopt_r, __getopt_long_r)
        (__getopt_long_only_r): Protect declarations, to avoid compiler
        warning.

newlib/ChangeLog
newlib/libc/include/getopt.h

index 4356383..483f3dc 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-08  Eric Blake  <ebb9@byu.net>
+
+       * libc/include/getopt.h (__getopt_r, __getopt_long_r)
+       (__getopt_long_only_r): Protect declarations, to avoid compiler
+       warning.
+
 2009-10-07  Corinna Vinschen  <corinna@vinschen.de>
 
        * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
index 13cf99c..ba8da4a 100644 (file)
@@ -164,6 +164,7 @@ extern "C"
              (int __argc, char *const __argv[], const char *__shortopts,
               const struct option * __longopts, int *__longind));
 
+#ifdef __need_getopt_newlib
   int _EXFUN (__getopt_r,
              (int __argc, char *const __argv[], const char *__optstring,
               struct getopt_data * __data));
@@ -177,6 +178,7 @@ extern "C"
              (int __argc, char *const __argv[], const char *__shortopts,
               const struct option * __longopts, int *__longind,
               struct getopt_data * __data));
+#endif /* __need_getopt_newlib */
 
 #ifdef __cplusplus
 };