2008-03-07 Jeff Johnston <jjohnstn@redhat.com>

* libc/include/getopt.h: Hide newlib extensions under
        the __need_getopt_newlib flag.
        * libc/stdlib/getopt.c: #define __need_getopt_newlib before including
        getopt.h.  Put entire code under !HAVE_GETOPT to support platforms
        with their own getopt implementation.
        * configure.host: Specify HAVE_GETOPT for x86-linux.
This commit is contained in:
Jeff Johnston
2008-03-07 18:16:35 +00:00
parent 0382d26727
commit c622842865
4 changed files with 39 additions and 17 deletions

View File

@ -83,11 +83,13 @@ Gregory Pietsch's current e-mail address:
gpietsch@comcast.net
****************************************************************************/
#ifndef HAVE_GETOPT
/* include files */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define __need_getopt_newlib
#include <getopt.h>
/* macros */
@ -472,4 +474,6 @@ __getopt_long_only_r (int argc, char *const argv[], const char *shortopts,
return getopt_internal (argc, argv, shortopts, longopts, longind, 1, data);
}
#endif /* !HAVE_GETOPT */
/* end of file GETOPT.C */