]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fri Dec 22 00:38:00 1995 H.J. Lu <hjl@nynexst.com>
authorRoland McGrath <roland@gnu.org>
Sat, 23 Dec 1995 01:14:10 +0000 (01:14 +0000)
committerRoland McGrath <roland@gnu.org>
Sat, 23 Dec 1995 01:14:10 +0000 (01:14 +0000)
        * stdio-common/vfscanf.c: Correctly handle white space skipping.
* stdio-common/Makefile (tests): Add bug11.
* stdio-common/bug11.c: New file.
Fri Dec 22 00:38:00 1995  H.J. Lu  <hjl@nynexst.com>

        * stdio-common/vfscanf.c: Correctly handle white space skipping.
* stdio-common/Makefile (tests): Add bug11.
* stdio-common/bug11.c: New file.

ChangeLog
stdio-common/Makefile
stdio-common/bug11.c [new file with mode: 0644]
stdio-common/vfscanf.c
sysdeps/mach/hurd/setgid.c
sysdeps/mach/hurd/setuid.c

index d2b8241a70f07fa4bd6b5ee81d266736f3cea0f0..53669d2396e519a033b848b4bb74ae622b94c80a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,12 @@ Fri Dec 22 00:57:38 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
        * sysdeps/mach/hurd/fork.c: Peek __mach_task_self_ value before
        proc_dostop call to work around kernel paging bug.
 
+Fri Dec 22 00:38:00 1995  H.J. Lu  <hjl@nynexst.com>
+
+        * stdio-common/vfscanf.c: Correctly handle white space skipping.
+       * stdio-common/Makefile (tests): Add bug11.
+       * stdio-common/bug11.c: New file.
+
 Thu Dec 21 12:19:32 1995  Miles Bader  <miles@gnu.ai.mit.edu>
 
        * sysdeps/mach/hurd/setuid.c (__setuid): Actually add the new uid
index a718db6a2ca3d235bd4ded4b8b5dfb54d0f820f2..d8cd8af749b0ae20ca62be900d00075c27217627 100644 (file)
@@ -39,7 +39,7 @@ distribute := _itoa.h printf-parse.h
 tests := tst-printf tstscanf test_rdwr test-popen tstgetln test-fseek \
         temptest tst-fileno test-fwrite \
         xbug errnobug \
-        bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 \
+        bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 \
         tfformat tiformat tstdiomisc
 
 
diff --git a/stdio-common/bug11.c b/stdio-common/bug11.c
new file mode 100644 (file)
index 0000000..1f5739c
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <string.h>
+
+main ()
+{
+  int ret;
+  char buf [1024] = "Ooops";
+
+  ret = sscanf ("static char Term_bits[] = {", "static char %s = {", buf);
+  printf ("ret: %d, name: %s\n", ret, buf);
+
+  return strcmp (buf, "Term_bits[]") != 0 || ret != 1;
+}
index df68260cdda8097f14d316259a0519f3b14cb239..14aa7d9748fd1363782371590eee2b18d927f64b 100644 (file)
@@ -233,9 +233,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
          if (c == EOF)
            input_error ();
 
-         /* We saw an white space as the last character in the format
-            string.  Now it's time to skip all leading white
-            spaces.  */
+         /* We saw white space char as the last character in the format
+            string.  Now it's time to skip all leading white space.  */
          if (skip_space)
            {
              while (isspace (c))
@@ -243,7 +242,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
              skip_space = 0;
            }
 
-         else if (c == fc)
+         if (c == fc)
            (void) inchar ();
          else
            conv_error ();
index 660a3fe5d07440b0edd3c8a141a9735efbebb61c..b2d9313307182415b0753bf602d91cca6bfaf734 100644 (file)
@@ -66,7 +66,7 @@ DEFUN(__setgid, (gid), gid_t gid)
              newaux = auxbuf;
              naux = 2;
            }
-         _hurd_id.aux.gids[0] = _hurd_id.aux.gids[1] = gid;
+         newaux[0] = newaux[1] = gid;
        }
       else
        {
index 586ad2154fc5a48fe0c782f4cba37a90ead73daf..c2491d6d13156228919b33e7ce3385ef4ba6bb6a 100644 (file)
@@ -66,7 +66,7 @@ DEFUN(__setuid, (uid), uid_t uid)
              newaux = auxbuf;
              naux = 2;
            }
-         _hurd_id.aux.uids[0] = _hurd_id.aux.uids[1] = uid;
+         newaux[0] = newaux[1] = uid;
        }
       else
        {