changeset 5161:24371bb8c5a8

(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.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 07 Aug 2004 06:43:34 +0000
parents e70798064461
children a9f2632fa41f
files lib/argp-help.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -439,9 +439,8 @@
       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 @@
 	    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 @@
 weak_alias (__argp_help, argp_help)
 #endif
 
-#ifndef _LIBC
+#ifndef __argp_short_program_name
 char *__argp_basename (char *name)
 {
   char *short_name = strrchr (name, '/');