Переглянути джерело

Remove hidden_data_def for opt*

Peter S. Mazinger 18 роки тому
батько
коміт
babffcaa72
2 змінених файлів з 0 додано та 16 видалено
  1. 0 8
      libc/unistd/getopt-susv3.c
  2. 0 8
      libc/unistd/getopt.c

+ 0 - 8
libc/unistd/getopt-susv3.c

@@ -54,18 +54,10 @@ static const char missing[] = "%s: option requires an argument -- %c\n";
 static const char illegal[] = "%s: illegal option -- %c\n";
 static const char illegal[] = "%s: illegal option -- %c\n";
 #endif
 #endif
 
 
-libc_hidden_proto(opterr)
 int opterr = 1;
 int opterr = 1;
-libc_hidden_data_def(opterr)
-libc_hidden_proto(optind)
 int optind = 1;
 int optind = 1;
-libc_hidden_data_def(optind)
-libc_hidden_proto(optopt)
 int optopt = 0;
 int optopt = 0;
-libc_hidden_data_def(optopt)
-libc_hidden_proto(optarg)
 char *optarg = NULL;
 char *optarg = NULL;
-libc_hidden_data_def(optarg)
 
 
 int getopt(int argc, char * const argv[], const char *optstring)
 int getopt(int argc, char * const argv[], const char *optstring)
 {
 {

+ 0 - 8
libc/unistd/getopt.c

@@ -79,9 +79,7 @@ extern int _getopt_internal (int argc, char *const *argv, const char *optstring,
    Also, when `ordering' is RETURN_IN_ORDER,
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
    each non-option ARGV-element is returned here.  */
 
 
-libc_hidden_proto(optarg)
 char *optarg = NULL;
 char *optarg = NULL;
-libc_hidden_data_def(optarg)
 
 
 /* Index in ARGV of the next element to be scanned.
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
    This is used for communication to and from the caller
@@ -96,24 +94,18 @@ libc_hidden_data_def(optarg)
    how much of ARGV has been scanned so far.  */
    how much of ARGV has been scanned so far.  */
 
 
 /* 1003.2 says this must be 1 before any call.  */
 /* 1003.2 says this must be 1 before any call.  */
-libc_hidden_proto(optind)
 int optind = 1;
 int optind = 1;
-libc_hidden_data_def(optind)
 
 
 /* Callers store zero here to inhibit the error message
 /* Callers store zero here to inhibit the error message
    for unrecognized options.  */
    for unrecognized options.  */
 
 
-libc_hidden_proto(opterr)
 int opterr = 1;
 int opterr = 1;
-libc_hidden_data_def(opterr)
 
 
 /* Set to an option character which was unrecognized.
 /* Set to an option character which was unrecognized.
    This must be initialized on some systems to avoid linking in the
    This must be initialized on some systems to avoid linking in the
    system's own getopt implementation.  */
    system's own getopt implementation.  */
 
 
-libc_hidden_proto(optopt)
 int optopt = '?';
 int optopt = '?';
-libc_hidden_data_def(optopt)
 
 
 /* The next char to be scanned in the option-element
 /* The next char to be scanned in the option-element
    in which the last option character we returned was found.
    in which the last option character we returned was found.