svn commit: trunk/uClibc/libc/unistd

psm at uclibc.org psm at uclibc.org
Fri Feb 3 16:19:06 UTC 2006


Author: psm
Date: 2006-02-03 08:19:05 -0800 (Fri, 03 Feb 2006)
New Revision: 13811

Log:
attribute_hidden is enough in the prototype, sync getopt-susv3 w/ gnu

Modified:
   trunk/uClibc/libc/unistd/getopt-susv3.c
   trunk/uClibc/libc/unistd/getopt.c


Changeset:
Modified: trunk/uClibc/libc/unistd/getopt-susv3.c
===================================================================
--- trunk/uClibc/libc/unistd/getopt-susv3.c	2006-02-03 16:12:58 UTC (rev 13810)
+++ trunk/uClibc/libc/unistd/getopt-susv3.c	2006-02-03 16:19:05 UTC (rev 13811)
@@ -33,6 +33,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdio.h>
+#include <getopt.h>
 
 libc_hidden_proto(fprintf)
 libc_hidden_proto(strchr)
@@ -53,10 +54,18 @@
 static const char illegal[] = "%s: illegal option -- %c\n";
 #endif
 
+libc_hidden_proto(opterr)
 int opterr = 1;
+libc_hidden_data_def(opterr)
+libc_hidden_proto(optind)
 int optind = 1;
+libc_hidden_data_def(optind)
+libc_hidden_proto(optopt)
 int optopt = 0;
+libc_hidden_data_def(optopt)
+libc_hidden_proto(optarg)
 char *optarg = NULL;
+libc_hidden_data_def(optarg)
 
 int getopt(int argc, char * const argv[], const char *optstring)
 {

Modified: trunk/uClibc/libc/unistd/getopt.c
===================================================================
--- trunk/uClibc/libc/unistd/getopt.c	2006-02-03 16:12:58 UTC (rev 13810)
+++ trunk/uClibc/libc/unistd/getopt.c	2006-02-03 16:19:05 UTC (rev 13811)
@@ -67,10 +67,6 @@
 libc_hidden_proto(strncmp)
 libc_hidden_proto(getenv)
 libc_hidden_proto(fprintf)
-libc_hidden_proto(optarg)
-libc_hidden_proto(opterr)
-libc_hidden_proto(optind)
-libc_hidden_proto(optopt)
 libc_hidden_proto(stderr)
 
 extern int _getopt_internal (int argc, char *const *argv, const char *optstring, 
@@ -83,6 +79,7 @@
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
+libc_hidden_proto(optarg)
 char *optarg = NULL;
 libc_hidden_data_def(optarg)
 
@@ -99,12 +96,14 @@
    how much of ARGV has been scanned so far.  */
 
 /* 1003.2 says this must be 1 before any call.  */
+libc_hidden_proto(optind)
 int optind = 1;
 libc_hidden_data_def(optind)
 
 /* Callers store zero here to inhibit the error message
    for unrecognized options.  */
 
+libc_hidden_proto(opterr)
 int opterr = 1;
 libc_hidden_data_def(opterr)
 
@@ -112,6 +111,7 @@
    This must be initialized on some systems to avoid linking in the
    system's own getopt implementation.  */
 
+libc_hidden_proto(optopt)
 int optopt = '?';
 libc_hidden_data_def(optopt)
 
@@ -327,7 +327,7 @@
    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
    long-named options.  */
 
-int attribute_hidden _getopt_internal (int argc, char *const *argv, const char *optstring, 
+int _getopt_internal (int argc, char *const *argv, const char *optstring, 
 	const struct option *longopts, int *longind, int long_only)
 {
     int print_errors = opterr;




More information about the uClibc-cvs mailing list