This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getopt reinvocation/reentrancy

Ralf Corsepius wrote:
On Mon, 2008-03-03 at 15:07 -0500, Gregory Pietsch wrote:
I got the definition of the GETOPT_DATA_INITIALIZER macro from that old libc manual that Joel provided the link for: .

Then Joel might want to recheck his docs.

Current glibc doesn't have NO_ARG, REQUIRED_ARG, OPTIONAL_ARG nor

FWIW: I removed these defines from the RTEMS newlib's sources.


Ok, here's what I did. The newlib extensions to getopt.h have been placed under the flag __need_getopt_newlib. Applications ported from glibc using getopt.h will be name-space equivalent (i.e. no NO_ARG or GETOPT_DATA_INITIALIZER). Applications needing the reentrant extensions or preferring to use the old macros, may define __need_getopt_newlib before including getopt.h. getopt.c defines this flag. I also added a flag around the whole getopt.c because x86-linux has its own version of getopt.h which obviously doesn't have the stuff needed to compile getopt.c.

-- Jeff J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]