about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/getloadavg.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-31 17:46:59 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-31 17:46:59 +0000
commit84fb7c8c26edf479ad40cc27c41d2a0b1b452b99 (patch)
tree5795a9c99a1376b836c31665cd67b5cefcc9d704 /sysdeps/unix/sysv/linux/getloadavg.c
parentf8580b753aceb4e6fe2e32bebd33320abe717d33 (diff)
downloadglibc-84fb7c8c26edf479ad40cc27c41d2a0b1b452b99.tar.gz
glibc-84fb7c8c26edf479ad40cc27c41d2a0b1b452b99.tar.xz
glibc-84fb7c8c26edf479ad40cc27c41d2a0b1b452b99.zip
Update.
2001-12-31  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Always use C
	locale to parse /proc/loadavg.

2001-12-31  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-conflict.c: Include sys/param.h.
	(RESOLVE_CONFLICT_FIND_MAP): Cast r_offset to ElfW(Addr).
	* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Avoid
	warning.
	(TRAMPOLINE_TEMPLATE, RTLD_START): Don't use multi-line string
	literals to avoid warnings.

	* configure.in: Don't check for gsed since we do not use it anywhere.
Diffstat (limited to 'sysdeps/unix/sysv/linux/getloadavg.c')
-rw-r--r--sysdeps/unix/sysv/linux/getloadavg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/getloadavg.c b/sysdeps/unix/sysv/linux/getloadavg.c
index 39b143336a..e1a372cd5f 100644
--- a/sysdeps/unix/sysv/linux/getloadavg.c
+++ b/sysdeps/unix/sysv/linux/getloadavg.c
@@ -18,9 +18,10 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#include <unistd.h>
 #include <fcntl.h>
+#include <locale.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 /* Put the 1 minute, 5 minute and 15 minute load averages
    into the first NELEM elements of LOADAVG.
@@ -53,8 +54,8 @@ getloadavg (double loadavg[], int nelem)
       for (i = 0; i < nelem; ++i)
 	{
 	  char *endp;
-	  loadavg[i] = strtod (p, &endp);
-	  if (!endp || endp == p)
+	  loadavg[i] = __strtod_l (p, &endp, &_nl_C_locobj);
+	  if (endp == NULL || endp == p)
 	    /* This should not happen.  The format of /proc/loadavg
 	       must have changed.  Don't return with what we have,
 	       signal an error.  */