mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-27 16:18:52 +00:00
4b173045e9
Woo... It seems the glibc guys finally decided that tarballs were not deprecated, in fact. The patchset was vampirised from Gentoo (kudos, guys!), and applies to glibc+ports, so that's why it's been added as a patchset against ports, not against glibc.
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
2009-05-16 Aurelien Jarno <aurelien@aurel32.net>
|
|
|
|
* sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
|
|
Change parameters and use next_line.
|
|
|
|
ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff -durN glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/getsysstats.c glibc-2.10.1/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/getsysstats.c
|
|
--- glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/getsysstats.c 2009-05-16 10:36:20.000000000 +0200
|
|
+++ glibc-2.10.1/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/getsysstats.c 2009-11-13 00:51:07.000000000 +0100
|
|
@@ -20,15 +20,16 @@
|
|
|
|
|
|
/* We need to define a special parser for /proc/cpuinfo. */
|
|
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
|
|
+#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
|
|
do \
|
|
{ \
|
|
/* Find the line that contains the information about the number of \
|
|
active cpus. We don't have to fear extremely long lines since \
|
|
the kernel will not generate them. 8192 bytes are really enough. \
|
|
If there is no "CPUs ..." line then we are on a UP system. */ \
|
|
+ char *l; \
|
|
(RESULT) = 1; \
|
|
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
|
|
+ while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
|
|
if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \
|
|
|| (sscanf (BUFFER, "CPUs probed %*d active %d", \
|
|
&(RESULT)) == 1)) \
|
|
diff -durN glibc-2.10.1.orig/ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c glibc-2.10.1/ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c
|