From 85191fc5aa295e10e4bfecc8637d9d0ce74fc065 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 8 Oct 2009 16:26:28 +0000 Subject: [PATCH] 2009-10-08 Eric Blake * libc/include/getopt.h (__getopt_r, __getopt_long_r) (__getopt_long_only_r): Protect declarations, to avoid compiler warning. --- newlib/ChangeLog | 6 ++++++ newlib/libc/include/getopt.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 43563837d..483f3dcef 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2009-10-08 Eric Blake + + * libc/include/getopt.h (__getopt_r, __getopt_long_r) + (__getopt_long_only_r): Protect declarations, to avoid compiler + warning. + 2009-10-07 Corinna Vinschen * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale diff --git a/newlib/libc/include/getopt.h b/newlib/libc/include/getopt.h index 13cf99c5f..ba8da4a7f 100644 --- a/newlib/libc/include/getopt.h +++ b/newlib/libc/include/getopt.h @@ -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 };