]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 18 Aug 2001 11:55:52 +0000 (11:55 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 18 Aug 2001 11:55:52 +0000 (11:55 +0000)
2001-08-18  Ulrich Drepper  <drepper@redhat.com>

* conform/conformtest.pl: Change namespace test to take #undef
lines into account.

* conform/data/netinet/in.h-data: Fix typo in allow-header line.

* conform/data/sys/socket.h-data: Add sockatmark.

ChangeLog
conform/conformtest.pl
conform/data/netinet/in.h-data
conform/data/sys/socket.h-data
io/fts.c

index 1f9713971d1044b51c13a27b4322adbfa444d069..1f653b49db56b2408c79920ed6ee61a5c297e55e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-08-18  Ulrich Drepper  <drepper@redhat.com>
+
+       * conform/conformtest.pl: Change namespace test to take #undef
+       lines into account.
+
+       * conform/data/netinet/in.h-data: Fix typo in allow-header line.
+
+       * conform/data/sys/socket.h-data: Add sockatmark.
+
 2001-08-17  Ulrich Drepper  <drepper@redhat.com>
 
        * io/fts.c: Update from recent BSD source.
index 5ae1cea45a5f7eb60851df7c7708f08863c17a3f..364e34d2a462a3efa4133d35ee909d0d5f384ad8 100644 (file)
@@ -224,11 +224,19 @@ sub newtoken {
   if ($isknown{$token}) {
     ++$nknown;
   } else {
-    ++$nerrors;
-    if ($nerrors == 1) {
-      printf ("FAIL\n    " . "-" x 72 . "\n");
-    }
-    printf ("    Namespace violation: \"%s\"\n", $token);
+    $errors{$token} = 1;
+  }
+}
+
+
+sub removetoken {
+  my($token) = @_;
+  my($idx);
+
+  return if ($token =~ /^[0-9_]/ || $iskeyword{$token});
+
+  if (exists $errors{$token}) {
+    undef $errors{$token};
   }
 }
 
@@ -243,14 +251,15 @@ sub checknamespace {
   print TESTFILE "#include <$h>\n";
   close (TESTFILE);
 
-  $nerrors = 0;
+  undef %errors;
   $nknown = 0;
   open (CONTENT, "$CC $CFLAGS{$dialect} -E $fnamebase.c -P -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
   loop: while (<CONTENT>) {
-    next loop if (/^#undef /);
     chop;
     if (/^#define (.*)/) {
       newtoken ($1, @allow);
+    } elsif (/^#undef (.*)/) {
+      removetoken ($1);
     } else {
       # We have to tokenize the line.
       my($str) = $_;
@@ -266,14 +275,28 @@ sub checknamespace {
   }
   close (CONTENT);
   unlink "$fnamebase.c";
-  if ($nerrors != 0) {
-    printf ("    " . "-" x 72 . "\n");
-    ++$errors;
-  } elsif ($nknown > 0) {
-    printf ("EXPECTED FAILURES\n");
-    ++$known;
-  } else {
-    printf ("OK\n");
+  $realerror = 0;
+  if ($#errors != 0) {
+    foreach $f (%errors) {
+      if ($errors{$f} == 1) {
+       if ($realerror == 0) {
+         printf ("FAIL\n    " . "-" x 72 . "\n");
+         $realerror = 1;
+         ++$errors;
+       }
+       printf ("    Namespace violation: \"%s\"\n", $f);
+      }
+    }
+    printf ("    " . "-" x 72 . "\n") if ($realerror != 0);
+  }
+
+  if ($realerror == 0) {
+    if ($nknown > 0) {
+      printf ("EXPECTED FAILURES\n");
+      ++$known;
+    } else {
+      printf ("OK\n");
+    }
   }
 }
 
index 9b7d05e8217bc02dd1db9a29825734d140c7912e..1f1955d1a6035294fcc0f4d3064cd0665d9fca09 100644 (file)
@@ -58,7 +58,7 @@ function uint16_t htons (uint16_t)
 function uint32_t ntohl (uint32_t)
 function uint16_t ntohs (uint16_t)
 
-allow-header intttypes.h
+allow-header inttypes.h
 allow-header arpa/inet.h
 
 constant INET6_ADDRSTRLEN 46
index 151ade5b92ff13785bda132b41367eddcd908f0c..61f30abc823cc854a3626ae6cb30da62aeeec943 100644 (file)
@@ -103,6 +103,7 @@ function int setsockopt (int, int, int, const void*, socklen_t)
 function int shutdown (int, int)
 function int socket (int, int, int)
 function int socketpair (int, int, int, int[2])
+function int sockatmark (int)
 
 allow-header sys/uio.h
 
index 44473a6bc2a8de56123315a21f5ed60c292956fa..bfe41d3f44c7857737146fcf05c4a0218daacf97 100644 (file)
--- a/io/fts.c
+++ b/io/fts.c
@@ -653,7 +653,7 @@ fts_build(sp, type)
                        cur->fts_flags |= FTS_DONTCHDIR;
                        descend = 0;
                        cderrno = errno;
-                       (void)closedir(dirp);
+                       (void)__closedir(dirp);
                        dirp = NULL;
                } else
                        descend = 1;
@@ -685,7 +685,7 @@ fts_build(sp, type)
 
        /* Read the directory, attaching each entry to the `link' pointer. */
        doadjust = 0;
-       for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
+       for (head = tail = NULL, nitems = 0; dirp && (dp = __readdir(dirp));) {
                if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
                        continue;