about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-07-21 08:25:57 +0000
committerJakub Jelinek <jakub@redhat.com>2005-07-21 08:25:57 +0000
commit736e2ab430e006ba09a2fe34d7887d3812ac808f (patch)
treef2d5948776e91112fcfd9199a757cd58e1be867a /sysdeps/generic
parent366c71f353afc163b8d31c9db6e90919b5c2e1c0 (diff)
downloadglibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.tar.gz
glibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.tar.xz
glibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.zip
Updated to fedora-glibc-20050721T0814
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/clock_gettime.c3
-rw-r--r--sysdeps/generic/feholdexcpt.c3
-rw-r--r--sysdeps/generic/fesetround.c3
-rw-r--r--sysdeps/generic/s_significand.c2
-rw-r--r--sysdeps/generic/s_significandf.c4
-rw-r--r--sysdeps/generic/stpncpy_chk.c85
-rw-r--r--sysdeps/generic/wordexp.c7
7 files changed, 95 insertions, 12 deletions
diff --git a/sysdeps/generic/clock_gettime.c b/sysdeps/generic/clock_gettime.c
index 85bb79c548..ff306120ba 100644
--- a/sysdeps/generic/clock_gettime.c
+++ b/sysdeps/generic/clock_gettime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -26,5 +26,6 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
   __set_errno (ENOSYS);
   return -1;
 }
+librt_hidden_def (clock_gettime)
 stub_warning (clock_gettime)
 #include <stub-tag.h>
diff --git a/sysdeps/generic/feholdexcpt.c b/sysdeps/generic/feholdexcpt.c
index 927a6dc95c..8680d1e492 100644
--- a/sysdeps/generic/feholdexcpt.c
+++ b/sysdeps/generic/feholdexcpt.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment and clear exceptions.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -25,5 +25,6 @@ feholdexcept (fenv_t *envp)
 {
   return 1;		/* Signal failure.  */
 }
+libm_hidden_def (feholdexcept)
 stub_warning (feholdexcept)
 #include <stub-tag.h>
diff --git a/sysdeps/generic/fesetround.c b/sysdeps/generic/fesetround.c
index e5a27d2aa0..5b14826390 100644
--- a/sysdeps/generic/fesetround.c
+++ b/sysdeps/generic/fesetround.c
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -25,5 +25,6 @@ fesetround (int round)
 {
   return 1;	/* Signal we are unable to set the direction.  */
 }
+libm_hidden_def (fesetround)
 stub_warning (fesetround)
 #include <stub-tag.h>
diff --git a/sysdeps/generic/s_significand.c b/sysdeps/generic/s_significand.c
index 4ab078c473..f95b6481c2 100644
--- a/sysdeps/generic/s_significand.c
+++ b/sysdeps/generic/s_significand.c
@@ -30,7 +30,7 @@ static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Ex
 	double x;
 #endif
 {
-	return __ieee754_scalb(x,(double) -ilogb(x));
+	return __ieee754_scalb(x,(double) -__ilogb(x));
 }
 weak_alias (__significand, significand)
 #ifdef NO_LONG_DOUBLE
diff --git a/sysdeps/generic/s_significandf.c b/sysdeps/generic/s_significandf.c
index 2893a4e1b7..cf5eb59efc 100644
--- a/sysdeps/generic/s_significandf.c
+++ b/sysdeps/generic/s_significandf.c
@@ -8,7 +8,7 @@
  *
  * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  */
@@ -27,6 +27,6 @@ static char rcsid[] = "$NetBSD: s_significandf.c,v 1.3 1995/05/10 20:48:13 jtc E
 	float x;
 #endif
 {
-	return __ieee754_scalbf(x,(float) -ilogbf(x));
+	return __ieee754_scalbf(x,(float) -__ilogbf(x));
 }
 weak_alias (__significandf, significandf)
diff --git a/sysdeps/generic/stpncpy_chk.c b/sysdeps/generic/stpncpy_chk.c
new file mode 100644
index 0000000000..d136339dea
--- /dev/null
+++ b/sysdeps/generic/stpncpy_chk.c
@@ -0,0 +1,85 @@
+/* Copyright (C) 1993,1995,1996,1997,2002,2005 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* This is almost copied from strncpy.c, written by Torbjorn Granlund.  */
+
+#include <string.h>
+
+
+/* Copy no more than N characters of SRC to DEST, returning the address of
+   the terminating '\0' in DEST, if any, or else DEST + N.  */
+char *
+__stpncpy_chk (char *dest, const char *src, size_t n, size_t destlen)
+{
+  char c;
+  char *s = dest;
+
+  if (__builtin_expect (destlen < n, 0))
+    __chk_fail ();
+
+  if (n >= 4)
+    {
+      size_t n4 = n >> 2;
+
+      for (;;)
+	{
+	  c = *src++;
+	  *dest++ = c;
+	  if (c == '\0')
+	    break;
+	  c = *src++;
+	  *dest++ = c;
+	  if (c == '\0')
+	    break;
+	  c = *src++;
+	  *dest++ = c;
+	  if (c == '\0')
+	    break;
+	  c = *src++;
+	  *dest++ = c;
+	  if (c == '\0')
+	    break;
+	  if (--n4 == 0)
+	    goto last_chars;
+	}
+      n -= dest - s;
+      goto zero_fill;
+    }
+
+ last_chars:
+  n &= 3;
+  if (n == 0)
+    return dest;
+
+  for (;;)
+    {
+      c = *src++;
+      --n;
+      *dest++ = c;
+      if (c == '\0')
+	break;
+      if (n == 0)
+	return dest;
+    }
+
+ zero_fill:
+  while (n-- > 0)
+    dest[n] = '\0';
+
+  return dest - 1;
+}
diff --git a/sysdeps/generic/wordexp.c b/sysdeps/generic/wordexp.c
index 06d38f6b24..2eb58089c4 100644
--- a/sysdeps/generic/wordexp.c
+++ b/sysdeps/generic/wordexp.c
@@ -1798,12 +1798,7 @@ envsubst:
 	      if (str[0] == '\0')
 		str = _("parameter null or not set");
 
-#ifdef USE_IN_LIBIO
-	      if (_IO_fwide (stderr, 0) > 0)
-		__fwprintf (stderr, L"%s: %s\n", env, str);
-	      else
-#endif
-		fprintf (stderr, "%s: %s\n", env, str);
+	      __fxprintf (NULL, "%s: %s\n", env, str);
 	    }
 
 	  if (free_value)