bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merge getopt from gnulib to glibc and vice versa, eliminate __need_g


From: Paul Eggert
Subject: Re: Merge getopt from gnulib to glibc and vice versa, eliminate __need_getopt
Date: Thu, 6 Apr 2017 15:48:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Thanks for doing this, as Gnulib and Glibc should be better-synchronized. In the interests of helping this move along, I installed your proposed changes into Gnulib, with the attached additional minor patches, the first of which I hope you can incorporate into your Glibc proposal (the second patch is Gnulib-only). Perhaps other reviewers will come up with other Gnulib and/or Glibc improvements, but one step at a time. Three thoughts:

* Gnulib lib/getopt_cdefs.in.h, lib/getopt_core.h, lib/getopt_ext.h, lib/getopt_pfx_core.h, and lib/getopt_pfx_ext.h now all have comments saying "Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed." What sort of Gnulib fix did you have in mind? Is this something we can easily fix in Gnulib now?

* From Gnulib's point of view, perhaps it would be better to define a module for sys/cdefs.h, and have the Gnulib getopt-posix module depend on this new module. That way, other Gnulib code could assume a standard GNU system which has sys/cdefs.h. Does this seem like a reasonable way forward to you? It shouldn't affect glibc code, other than perhaps to simplify it a bit.

* Although the Gnulib project prefers to omit leading tabs in .c and .h files, it's OK to put tabs in files shared from glibc, at least while we're doing this merge. I suppose Gnulib developers who prefer to avoid tabs can expand them later, once the merging is done. Personally I would rather let sleeping dogs lie.

Attachment: 0001-getopt-posix-use-angle-bracket-include.patch
Description: Source code patch

Attachment: 0002-getopt-gnu-omit-some-duplicate-code.patch
Description: Source code patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]