summaryrefslogtreecommitdiff
blob: f3d61862bc2e365b43aecdd7d764c5c6881689cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
On systems which define a macro 'isnumber()', cpio goes kaboom!
OS X is on example of where this happens.
http://bugs.gentoo.org/show_bug.cgi?id=74929

diff -uNr cpio-2.5.90.orig/src/userspec.c cpio-2.5.90/src/userspec.c
--- cpio-2.5.90.orig/src/userspec.c	Wed Dec 29 13:51:30 2004
+++ cpio-2.5.90/src/userspec.c	Wed Dec 29 13:52:13 2004
@@ -72,7 +72,7 @@
    otherwise return 0. */
 
 static int
-isnumber (const char *str)
+cpio_isnumber (const char *str)
 {
   for (; *str; str++)
     if (!isdigit (*str))
@@ -136,7 +136,7 @@
       if (pwd == NULL)
 	{
 
-	  if (!isnumber (u))
+	  if (!cpio_isnumber (u))
 	    error_msg = _("invalid user");
 	  else
 	    {
@@ -182,7 +182,7 @@
       grp = getgrnam (g);
       if (grp == NULL)
 	{
-	  if (!isnumber (g))
+	  if (!cpio_isnumber (g))
 	    error_msg = _("invalid group");
 	  else
 	    *gid = atoi (g);