]> Savannah Git Hosting - gnulib.git/commit
getopt: port recent getopt changes to macOS
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Apr 2017 00:26:03 +0000 (17:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Apr 2017 07:52:20 +0000 (00:52 -0700)
commit4172365d89eb1f404d43740dcbdb1aef599f8e14
tree32f26352414bde55a488f28ecbc4c3aed315bc86
parent28ac412baf1c48b73ebc6057879626b0b1aa2a59
getopt: port recent getopt changes to macOS

Problem reported by Harald Maier (Bug#26398).
The macOS C compiler uses __nonnull for its own purposes and that
clashes with glibc's __nonnull.
* lib/getopt.in.h: Add comment for _GL_ARG_NONNULL snippet.
* lib/getopt_cdefs.in.h (__nonnull): Remove.
* lib/getopt_core.h (getopt):
* lib/getopt_ext.h (getopt_long, getopt_long_only):
Use _GL_ARG_NONNULL, not __nonnull.
* lib/unistd.in.h: Move snippet hooks to before where the getopt
.h files are included, so that _GL_ARG_NONNULL is defined in time.
* modules/getopt-posix (Depends-on): Add snippet/arg-nonnull.
(getopt.h): Interpolate _GL_ARG_NONNULL snippet.
ChangeLog
lib/getopt.in.h
lib/getopt_cdefs.in.h
lib/getopt_core.h
lib/getopt_ext.h
lib/unistd.in.h
modules/getopt-posix