[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] argp-help.c patch for GNU tar; any more thoughts on uClibc
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] argp-help.c patch for GNU tar; any more thoughts on uClibc getopt? |
Date: |
Fri, 06 Aug 2004 23:59:19 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
I installed the following change to gnulib's copy of argp-help.c to
get GNU tar to build.
I'd like to take a look at the uClibc getopt thread
<http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00023.html>
soon (as tar uses argp), but first I wanted to make sure that 'tar'
works before any real hacking.
2004-08-06 Paul Eggert <address@hidden>
Merge from tar.
* argp-help.c (make_hol, hol_append): Don't assume that
SIZE_MAX is a valid preprocessor constant.
(__argp_basename): Change from "#ifndef _LIBC"
to "#ifndef __argp_short_program_name", so that
we don't compile these functions for tar.
Index: argp-help.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/argp-help.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -p -u -r1.9 -r1.10
--- argp-help.c 18 May 2004 05:18:41 -0000 1.9
+++ argp-help.c 7 Aug 2004 06:43:34 -0000 1.10
@@ -439,9 +439,8 @@ make_hol (const struct argp *argp, struc
hol->short_options = malloc (num_short_options + 1);
assert (hol->entries && hol->short_options);
-#if SIZE_MAX <= UINT_MAX
- assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-#endif
+ if (SIZE_MAX <= UINT_MAX)
+ assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
/* Fill in the entries. */
so = hol->short_options;
@@ -835,9 +834,8 @@ hol_append (struct hol *hol, struct hol
malloc (hol_so_len + strlen (more->short_options) + 1);
assert (entries && short_options);
-#if SIZE_MAX <= UINT_MAX
- assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-#endif
+ if (SIZE_MAX <= UINT_MAX)
+ assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
__mempcpy (__mempcpy (entries, hol->entries,
hol->num_entries * sizeof (struct hol_entry)),
@@ -1676,7 +1674,7 @@ void __argp_help (const struct argp *arg
weak_alias (__argp_help, argp_help)
#endif
-#ifndef _LIBC
+#ifndef __argp_short_program_name
char *__argp_basename (char *name)
{
char *short_name = strrchr (name, '/');
- [Bug-gnulib] argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?,
Paul Eggert <=
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Simon Josefsson, 2004/08/07
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Paul Eggert, 2004/08/08
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Simon Josefsson, 2004/08/08
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Paul Eggert, 2004/08/12
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Simon Josefsson, 2004/08/12
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Paul Eggert, 2004/08/12
- [Bug-gnulib] Re: [Bug-tar] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Sergey Poznyakoff, 2004/08/12
- [Bug-gnulib] Re: [Bug-tar] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Paul Eggert, 2004/08/12
- [Bug-gnulib] Re: [Bug-tar] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Sergey Poznyakoff, 2004/08/13
- [Bug-gnulib] Re: argp-help.c patch for GNU tar; any more thoughts on uClibc getopt?, Simon Josefsson, 2004/08/12