diff options
author | Zack Weinberg <zackw@panix.com> | 2017-03-29 16:58:58 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-04-07 07:45:53 -0400 |
commit | bf079e19f50d64aa5e05b5e17ec29afab9aabb20 (patch) | |
tree | 20d692f78e56b933b229441f678604c3761058ac /manual | |
parent | e4e794841e3140875f2aa86b90e2ada3d61e1244 (diff) | |
download | glibc-bf079e19f50d64aa5e05b5e17ec29afab9aabb20.tar.gz glibc-bf079e19f50d64aa5e05b5e17ec29afab9aabb20.tar.xz glibc-bf079e19f50d64aa5e05b5e17ec29afab9aabb20.zip |
getopt: remove USE_NONOPTION_FLAGS
glibc's implementation of getopt includes code to parse an environment variable named _XXX_GNU_nonoption_argv_flags_ (where XXX is the current process's PID in decimal); but all of it has been #ifdefed out since 2001, with no official way to turn it back on. According to commentary in our config.h.in, bash version 2.0 set this environment variable to indicate argv elements that were the result of glob expansion and therefore should not be treated as options, but the feature was "disabled later" because "it caused problems". According to bash's CHANGES file, "later" was release 2.01; it gives no more detail about what the problems were. Version 2.0 of bash was released on the last day of 1996, and version 2.01 in June of 1997. Twenty years later, I think it is safe to assume that this environment variable isn't coming back. * config.h.in (USE_NONOPTION_FLAGS): Remove. * csu/init-first.c: Remove all #ifdef USE_NONOPTION_FLAGS blocks. * sysdeps/mach/hurd/i386/init-first.c: Likewise. * posix/getopt_int.h: Likewise. * posix/getopt.c: Likewise. Also remove SWAP_FLAGS and the __libc_argc and __libc_argv externs, which were only used by #ifdef USE_NONOPTION_FLAGS blocks. * posix/getopt_init.c: Remove file. * posix/Makefile (routines): Remove getopt_init. * include/getopt.h: Don't declare __getopt_initialize_environment. * manual/getopt.texi: Remove mention of USE_NONOPTION_FLAGS in a comment.
Diffstat (limited to 'manual')
-rw-r--r-- | manual/getopt.texi | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/manual/getopt.texi b/manual/getopt.texi index 20e11ef2e2..a71c3731aa 100644 --- a/manual/getopt.texi +++ b/manual/getopt.texi @@ -70,15 +70,12 @@ option argument, for those options that accept arguments. @c leave (in case of cancellation) stderr in an inconsistent state. @c Various implicit, indirect uses of malloc, in uses of memstream and @c asprintf for error-printing, bring about the usual malloc issues. -@c (The explicit use of malloc in a conditional situation in -@c _getopt_initialize is never exercised in glibc.) @c @c _getopt_internal @c _getopt_internal_r @c gettext @c _getopt_initialize @c getenv -@c malloc if USE_NONOPTION_FLAGS, never defined in libc @c open_memstream @c lockfile, unlockfile, __fxprintf -> stderr @c asprintf |