Mercurial > hg > octave-nkf > gnulib-hg
changeset 5454:d809d8b12ac5
(POSIXLY_CORRECT): New constant.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 17 Nov 2004 01:52:35 +0000 |
parents | d29dafc60cf3 |
children | 4e3460b787b0 |
files | lib/getopt.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/getopt.c +++ b/lib/getopt.c @@ -1154,10 +1154,19 @@ return result; } +/* glibc gets a LSB-compliant getopt. + Standalone applications get a POSIX-compliant getopt. */ +#if _LIBC +enum { POSIXLY_CORRECT = 0 }; +#else +enum { POSIXLY_CORRECT = 1 }; +#endif + int getopt (int argc, char *const *argv, const char *optstring) { - return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, 1); + return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, + POSIXLY_CORRECT); }