summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-03-20 05:17:15 +0000
committerUlrich Drepper <drepper@redhat.com>1997-03-20 05:17:15 +0000
commitf752bfe37962db44ac8db553d840f8215966911e (patch)
tree59f831373e01717405dcbbc4ea3b94d82490fa4d /stdlib
parentc57abfa73560ac665e126a66081e1549bcd4645b (diff)
downloadglibc-f752bfe37962db44ac8db553d840f8215966911e.tar.gz
glibc-f752bfe37962db44ac8db553d840f8215966911e.tar.xz
glibc-f752bfe37962db44ac8db553d840f8215966911e.zip
1997-03-20 06:07  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/powerpc/dl-machine.h: Fix typo in last change.

	* sysdeps/unix/sparc/sysdep.h: Update copyright.

1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* linuxthreads/sysdeps/sparc/pt-machine (RELEASE): Fix.

	* stdlib/tst-strtol.c: Save the value of errno, printf may modify
	it.

	* sysdeps/sparc/DEFS.h [HAVE_ELF]: Use type @function in the FUNC
	macro on ELF systems.

	* sysdeps/sparc/configure.in: Fix.

	* sysdeps/sparc/dl-machine.h: Fix OPCODE_CALL.
	* sysdeps/sparc/setjmp.S: Fix my bugs.

	* sysdeps/unix/sysv/linux/sparc/Dist: Add start.c, fork.S, and pipe.S.
	* sysdeps/unix/sysv/linux/sparc/Makefile: Define asm-CPPFLAGS and
	as-FLAGS-.so.
	* sysdeps/unix/sysv/linux/sparc/syscalls.list: Add fork, pipe, and
	syscall.
	* sysdeps/unix/sysv/linux/sparc/fork.S: New file.
	* sysdeps/unix/sysv/linux/sparc/pipe.S: New file.
	* sysdeps/unix/sysv/linux/sparc/socket.S: Fix.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h: Fix.

	* elf/dl-lookup.c (do_lookup): Return true if we found a weak
	symbol.
	(_dl_lookup_symbol): Test against the symbol being global not
	against the symbol being not weak (fixes important problem with
	the SPARC linker)

	* sysdeps/unix/sysv/linux/sparc/brk.c: Fix.

	* sysdeps/unix/sysv/linux/sparc/start.c: Startup code for
	Linux/SPARC (while I get my asmCPPFLAGS-so variable).

1997-03-20 01:49  Ulrich Drepper  <drepper@cygnus.com>
	* sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf.
	* elf/dl-reloc.c (RESOLVE): Don't try to resolve local symbols.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/tst-strtol.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c
index e351e97ceb..085787196b 100644
--- a/stdlib/tst-strtol.c
+++ b/stdlib/tst-strtol.c
@@ -79,16 +79,19 @@ main (int argc, char ** argv)
   register const struct ltest *lt;
   char *ep;
   int status = 0;
+  int save_errno;
 
   for (lt = tests; lt->str != NULL; ++lt)
     {
       register long int l;
 
       errno = 0;
-      l = strtol(lt->str, &ep, lt->base);
-      printf("strtol(\"%s\", , %d) test %u",
-	     lt->str, lt->base, (unsigned int) (lt - tests));
-      if (l == (long int) lt->expect && *ep == lt->left && errno == lt->err)
+      l = strtol (lt->str, &ep, lt->base);
+      save_errno = errno;
+      printf ("strtol(\"%s\", , %d) test %u",
+	      lt->str, lt->base, (unsigned int) (lt - tests));
+      if (l == (long int) lt->expect && *ep == lt->left
+	  && save_errno == lt->err)
 	puts("\tOK");
       else
 	{
@@ -99,13 +102,13 @@ main (int argc, char ** argv)
 	  if (lt->left != *ep)
 	    {
 	      char exp1[5], exp2[5];
-	      expand(exp1, *ep);
-	      expand(exp2, lt->left);
-	      printf("  leaves '%s', expected '%s'\n", exp1, exp2);
+	      expand (exp1, *ep);
+	      expand (exp2, lt->left);
+	      printf ("  leaves '%s', expected '%s'\n", exp1, exp2);
 	    }
 	  if (errno != lt->err)
-	    printf("  errno %d (%s)  instead of %d (%s)\n",
-		   errno, strerror(errno), lt->err, strerror(lt->err));
+	    printf ("  errno %d (%s)  instead of %d (%s)\n",
+		    errno, strerror (errno), lt->err, strerror (lt->err));
 	  status = 1;
 	}
     }
@@ -115,32 +118,32 @@ main (int argc, char ** argv)
       register unsigned long int ul;
 
       errno = 0;
-      ul = strtoul(lt->str, &ep, lt->base);
-      printf("strtoul(\"%s\", , %d) test %u",
-	     lt->str, lt->base, (unsigned int) (lt - tests));
+      ul = strtoul (lt->str, &ep, lt->base);
+      printf ("strtoul(\"%s\", , %d) test %u",
+	      lt->str, lt->base, (unsigned int) (lt - tests));
       if (ul == lt->expect && *ep == lt->left && errno == lt->err)
 	puts("\tOK");
       else
 	{
-	  puts("\tBAD");
+	  puts ("\tBAD");
 	  if (ul != lt->expect)
-	    printf("  returns %lu, expected %lu\n",
-		   ul, lt->expect);
+	    printf ("  returns %lu, expected %lu\n",
+		    ul, lt->expect);
 	  if (lt->left != *ep)
 	    {
 	      char exp1[5], exp2[5];
-	      expand(exp1, *ep);
-	      expand(exp2, lt->left);
-	      printf("  leaves '%s', expected '%s'\n", exp1, exp2);
+	      expand (exp1, *ep);
+	      expand (exp2, lt->left);
+	      printf ("  leaves '%s', expected '%s'\n", exp1, exp2);
 	    }
 	  if (errno != lt->err)
-	    printf("  errno %d (%s) instead of %d (%s)\n",
-		   errno, strerror(errno), lt->err, strerror(lt->err));
+	    printf ("  errno %d (%s) instead of %d (%s)\n",
+		    errno, strerror (errno), lt->err, strerror (lt->err));
 	  status = 1;
 	}
     }
 
-  exit(status ? EXIT_FAILURE : EXIT_SUCCESS);
+  exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
 }
 
 static void
@@ -148,11 +151,11 @@ expand (dst, c)
      char *dst;
      int c;
 {
-  if (isprint(c))
+  if (isprint (c))
     {
       dst[0] = c;
       dst[1] = '\0';
     }
   else
-    (void) sprintf(dst, "%#.3o", (unsigned int) c);
+    (void) sprintf (dst, "%#.3o", (unsigned int) c);
 }