diff options
author | Zack Weinberg <zackw@panix.com> | 2017-03-25 11:24:24 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-04-07 07:53:03 -0400 |
commit | 10a33cf8b403e3c031c5dd10a06b4a2a6489e48c (patch) | |
tree | dd0fe2c58f8a61cb33ee60fffd287f609745ac7a /include | |
parent | 0f3be8721a86299600eae2d266934f661bf7c990 (diff) | |
download | glibc-10a33cf8b403e3c031c5dd10a06b4a2a6489e48c.zip glibc-10a33cf8b403e3c031c5dd10a06b4a2a6489e48c.tar.gz glibc-10a33cf8b403e3c031c5dd10a06b4a2a6489e48c.tar.bz2 |
getopt: eliminate __need_getopt by splitting up getopt.h.
__need_getopt is misnamed; what it really means is "we want only the
getopt features specified in POSIX, not the GNU extensions". Because
this code is shared with gnulib, it winds up being cleanest to split
getopt.h into *four* headers. getopt_core.h and getopt_ext.h will
be shared with gnulib, getopt_posix.h will be just for glibc, and
each project will have its own copy of getopt.h.
* posix/bits/getopt_core.h, posix/bits/getopt_ext.h:
New files, intended to be shared with gnulib.
* posix/bits/getopt_posix.h:
New file, not intended to be shared with gnulib.
* posix/getopt.h: Now just includes features.h,
bits/getopt_core.h, and bits/getopt_ext.h. Will
no longer be shared with gnulib.
* include/bits/getopt_core.h, include/bits/getopt_ext.h
* include/bits/getopt_posix.h: New wrappers.
* posix/Makefile: Install new headers.
* posix/unistd.h, libio/stdio.h:
Include bits/getopt_posix.h instead of getopt.h.
Diffstat (limited to 'include')
-rw-r--r-- | include/bits/getopt_core.h | 1 | ||||
-rw-r--r-- | include/bits/getopt_ext.h | 1 | ||||
-rw-r--r-- | include/bits/getopt_posix.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/include/bits/getopt_core.h b/include/bits/getopt_core.h new file mode 100644 index 0000000..1200de8 --- /dev/null +++ b/include/bits/getopt_core.h @@ -0,0 +1 @@ +#include <posix/bits/getopt_core.h> diff --git a/include/bits/getopt_ext.h b/include/bits/getopt_ext.h new file mode 100644 index 0000000..31b9983 --- /dev/null +++ b/include/bits/getopt_ext.h @@ -0,0 +1 @@ +#include <posix/bits/getopt_ext.h> diff --git a/include/bits/getopt_posix.h b/include/bits/getopt_posix.h new file mode 100644 index 0000000..e3b70c8 --- /dev/null +++ b/include/bits/getopt_posix.h @@ -0,0 +1 @@ +#include <posix/bits/getopt_posix.h> |