OSDN Git Service

2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
authorjjohnstn <jjohnstn>
Fri, 29 Feb 2008 21:11:56 +0000 (21:11 +0000)
committerjjohnstn <jjohnstn>
Fri, 29 Feb 2008 21:11:56 +0000 (21:11 +0000)
commite5df88e3f1c77278d8d5b59d982e708c6a33d986
treefa24b5f61703a1074ac27fd5b591a706e3fe789e
parent6223520bd4b90133e36d5a8481af6672607d7572
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.
newlib/ChangeLog
newlib/libc/include/getopt.h
newlib/libc/stdlib/getopt.c