On 7/5/22 21:01, Guilherme Janczak wrote:
I intend to send this file to glibc to make gnulib and glibc source the
same.

A couple of things. First, this doesn't seem to be glibc patch; it seems to be a reverse patch.

Second, these days, why not just initialize to a null pointer all the time? That should work for glibc and is simpler. Something like the attached Gnulib patch, say.
diff --git a/lib/argp-ba.c b/lib/argp-ba.c
index 5e43c75d32..3033cc7fb5 100644
--- a/lib/argp-ba.c
+++ b/lib/argp-ba.c
@@ -16,19 +16,17 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+#include <stddef.h>
+
 /* If set by the user program, it should point to string that is the
    bug-reporting address for the program.  It will be printed by argp_help if
    the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
    messages), embedded in a sentence that says something like "Report bugs to
-   ADDR."  */
-const char *argp_program_bug_address
-/* This variable should be zero-initialized.  On most systems, putting it into
-   BSS is sufficient.  Not so on Mac OS X 10.3 and 10.4, see
+   ADDR."
+
+   Initialize to a null pointer to work around a bug in MacOS X 10.3-10.4; see
    <https://lists.gnu.org/r/bug-gnulib/2009-01/msg00329.html>
-   <https://lists.gnu.org/r/bug-gnulib/2009-08/msg00096.html>.  */
-#if defined __ELF__
-  /* On ELF systems, variables in BSS behave well.  */
-#else
-  = (const char *) 0
-#endif
-  ;
+   <https://lists.gnu.org/r/bug-gnulib/2009-08/msg00096.html>.
+   This initialization doesn't cost anything with GCC these days.  */
+
+char const *argp_program_bug_address = NULL;

Reply via email to