Commit graph

13 commits

Author SHA1 Message Date
Érico Rolim
e7ff8d9787 Remove extern statics.
They have weird semantics and lead to hard to debug linking issues. Just
force static inline everywhere.
2021-02-10 18:54:02 -03:00
Érico Rolim
6336530a9c Fix argp-help.c.
It tried to use an __argp_basename function, which was defined to
program_invocation_short_name. The function definition should have been
gated.

This patch may be upstreamable to glibc.
2021-02-10 18:08:36 -03:00
Érico Rolim
c57dfcb63a Import argp-namefrob.h from glibc 2.33. 2021-02-10 18:08:19 -03:00
Érico Rolim
a05d76cc6d Import argp-help.c from glibc 2.33.
Also:
- support only strerror(), not strerror_r()
2021-02-10 18:08:19 -03:00
Érico Rolim
8069113599 Import argp-parse.c from glibc 2.33.
Also:
- make it not thread safe, since the thread safe getopt variants are GNU
only
- don't cater to compilers which don't support inlining
2021-02-10 18:08:19 -03:00
Érico Rolim
3358bdadaf Import argp-fmtstream.{c,h} from glibc 2.33.
Also:
- use vsnprintf instead of __vsnprintf_internal
- don't cater to compilers which can't inline functions
2021-02-10 18:08:19 -03:00
Érico Rolim
a5fcbcecd9 Import argp-test.c from glibc 2.33.
This change assumes that asprintf is always available.
2021-02-10 17:41:05 -03:00
Érico Rolim
06a70d506f Import trivial changes from glibc 2.33.
Mostly style/license changes and initialization removal when the
variable is a global.
2021-02-10 17:41:05 -03:00
Érico Rolim
c474ac2af7 Import argp.h from glibc 2.33.
With some changes of my own:
- pull <sys/cdef.h> ifdefs for compiler keywords
- always define error_t
- change !_LIBC to 1: should always be true
2021-02-10 17:41:05 -03:00
Érico Rolim
92bd24de26 Import argp-standalone 1.3. 2021-02-10 17:41:05 -03:00
Érico Rolim
ede863a979 Import argp-standalone 1.2. 2021-02-10 17:41:05 -03:00
Érico Rolim
3d5f6735d4 Import argp-standalone 1.1. 2021-02-10 16:17:50 -03:00
Érico Rolim
8333609d29 Import argp-standalone 1.0. 2021-02-10 16:16:04 -03:00