Commit Graph

6 Commits

Author SHA1 Message Date
Corinna Vinschen 02365c2064 * newlib/libc/include/getopt.h (struct option): name field should be
"const char *".
	* newlib/libc/stdlib/getopt.c (getopt_internal): Use fputs()/fputc()
	instead of fprintf() to save code space.  Fix signed/unsigned
	comparison.
2013-11-13 09:09:45 +00:00
Jeff Johnston 85191fc5aa 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-08 16:26:28 +00:00
Jeff Johnston c622842865 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.
2008-03-07 18:16:35 +00:00
Jeff Johnston be62101c60 2008-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/getopt.h (no_argument): Added for glibc compatibility.
        (required_argument, optional_argument): Ditto.
2008-03-03 19:47:59 +00:00
Jeff Johnston 76ff710cfa 2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
* libc/stdlib/getopt.c (getopt_internal): Rewrite to accept
        data area so as to support reentrant calls.  Change all callers
        to fill in data area with global values and restore any changes
        to the global values after call.
        (__getopt_r, __getopt_long_r, __getopt_long_only_r): New routines
        to support reentrancy that add a data area argument.
        * libc/include/getopt.h: Add new _r routines and provide macros
        so they can be called with using double-underscores.
2008-02-29 21:11:57 +00:00
Jeff Johnston 791c9bda57 2006-01-04 Gregory Pietsch <gpietsch@comcast.net>
* libc/stdlib/getopt.c: Replaced with version
        that adds getopt_long and getopt_long_only support.
        * libc/include/getopt.h: New file.
2006-01-04 21:21:52 +00:00