This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS,M68K] Update getsysstats.c


Ports copies of getsysstats.c need updating for changes to the libc 
version; without updates, the build fails.  This patch updates the MIPS 
and M68K versions; I've committed the MIPS changes; OK to commit the M68K 
changes?

Index: ChangeLog.m68k
===================================================================
RCS file: /cvs/glibc/ports/ChangeLog.m68k,v
retrieving revision 1.12
diff -u -r1.12 ChangeLog.m68k
--- ChangeLog.m68k	15 Mar 2009 18:42:52 -0000	1.12
+++ ChangeLog.m68k	17 Mar 2009 15:51:23 -0000
@@ -1,3 +1,8 @@
+2009-03-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
+	Change parameters and use next_line.
+
 2009-03-15  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/m68k/bits/link.h: Uglify function parameter names.
Index: ChangeLog.mips
===================================================================
RCS file: /cvs/glibc/ports/ChangeLog.mips,v
retrieving revision 1.76
diff -u -r1.76 ChangeLog.mips
--- ChangeLog.mips	17 Mar 2009 15:49:10 -0000	1.76
+++ ChangeLog.mips	17 Mar 2009 15:51:24 -0000
@@ -1,5 +1,10 @@
 2009-03-17  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
+	Change parameters and use next_line.
+
+2009-03-17  Joseph Myers  <joseph@codesourcery.com>
+
 	* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h.
 	* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
 	* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
Index: sysdeps/unix/sysv/linux/m68k/getsysstats.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/m68k/getsysstats.c,v
retrieving revision 1.1
diff -u -r1.1 getsysstats.c
--- sysdeps/unix/sysv/linux/m68k/getsysstats.c	10 Jan 2003 15:36:20 -0000	1.1
+++ sysdeps/unix/sysv/linux/m68k/getsysstats.c	17 Mar 2009 15:51:24 -0000
@@ -1,5 +1,5 @@
 /* Determine various system internal values, Linux/m68k version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@suse.de>
 
@@ -20,7 +20,7 @@
 
 
 /* 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									  \
     {									  \
       (RESULT) = 0;							  \
@@ -28,8 +28,9 @@
 	 "CPU:".  We don't have to fear extremely long lines since	  \
 	 the kernel will not generate them.  8192 bytes are really	  \
 	 enough.  */							  \
-      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)	  \
-	if (strncmp (BUFFER, "CPU:", 4) == 0)	      	     		  \
+      char *l;								  \
+      while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL)  \
+	if (strncmp (l, "CPU:", 4) == 0)	      	     		  \
 	  ++(RESULT);							  \
     }									  \
   while (0)
Index: sysdeps/unix/sysv/linux/mips/getsysstats.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/getsysstats.c,v
retrieving revision 1.2
diff -u -r1.2 getsysstats.c
--- sysdeps/unix/sysv/linux/mips/getsysstats.c	6 Jul 2001 04:56:18 -0000	1.2
+++ sysdeps/unix/sysv/linux/mips/getsysstats.c	17 Mar 2009 15:51:24 -0000
@@ -1,5 +1,5 @@
 /* Determine various system internal values, Linux/MIPS version.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2009 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
@@ -19,7 +19,7 @@
 
 
 /* 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									  \
     {									  \
       (RESULT) = 0;							  \
@@ -27,8 +27,9 @@
 	 "cpu model".  We don't have to fear extremely long lines since	  \
 	 the kernel will not generate them.  8192 bytes are really	  \
 	 enough.  */							  \
-      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)	  \
-	if (strncmp (BUFFER, "cpu model", 9) == 0)			  \
+      char *l;								  \
+      while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL)  \
+	if (strncmp (l, "cpu model", 9) == 0)				  \
 	  ++(RESULT);							  \
     }									  \
   while (0)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]