about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-20 20:06:45 +0000
committerRoland McGrath <roland@gnu.org>2002-09-20 20:06:45 +0000
commitfcdc67f963a44603553e52a0f883e5d0e5727b34 (patch)
tree64b68e8749cca4a3a7630d9e3b63874ca5845be0 /sysdeps/unix
parent51104ec01415a078b6d8ab2717721b578dd5d1b3 (diff)
downloadglibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.tar.gz
glibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.tar.xz
glibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.zip
* sysdeps/powerpc/bits/setjmp.h [__WORDSIZE]: Add 64-bit jmpbuf.
	* sysdeps/powerpc/bits/wordsize.h: New file.
	* sysdeps/powerpc/fpu/bits/mathinline.h (lrint, lrintf): Change long
	array to int array for 32-/64-bit compatibility.

2002-09-20  Roland McGrath  <roland@redhat.com>

	* login/programs/utmpdump.c: Don't include <error.h>, <errno.h>.

	* sysdeps/generic/utimes.c (__utimes): Don't check TVP for null.
	Reported by Bruno Haible <bruno@clisp.org>.

	* sysdeps/generic/ifreq.h (__ifreq): Compute termination condition
	before doubling RQ_LEN.
	* sysdeps/unix/sysv/linux/ifreq.h (__ifreq): Likewise.
	Reported by Bruno Haible <bruno@clisp.org>.

2002-09-18  Bruno Haible  <bruno@clisp.org>

	* login/logout.c (logout): Don't assume ut_time has the same size as
	a time_t.
	* login/logwtmp.c (logwtmp): Likewise.

	* sysdeps/pthread/configure: New file, moved here from
	linuxthreads/sysdeps/unix/sysv/linux/configure.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/ifreq.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/ifreq.h b/sysdeps/unix/sysv/linux/ifreq.h
index 216c1f3373..9d42664444 100644
--- a/sysdeps/unix/sysv/linux/ifreq.h
+++ b/sysdeps/unix/sysv/linux/ifreq.h
@@ -26,7 +26,7 @@
 #include "kernel-features.h"
 
 /* Variable to signal whether SIOCGIFCONF is not available.  */
-#if __ASSUME_SIOCGIFNAME == 0
+#if __ASSUME_SIOCGIFNAME == 0 || 1
 static int old_siocgifconf;
 #else
 # define old_siocgifconf 0
@@ -73,7 +73,7 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
     rq_len = RQ_IFS * sizeof (struct ifreq);
 
   /* Read all the interfaces out of the kernel.  */
-  do
+  while (1)
     {
       ifc.ifc_len = rq_len;
       ifc.ifc_buf = realloc (ifc.ifc_buf, ifc.ifc_len);
@@ -89,9 +89,12 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
 	  *ifreqs = NULL;
 	  return;
 	}
+
+      if (!old_siocgifconf || ifc.ifc_len < rq_len)
+	break;
+
       rq_len *= 2;
     }
-  while (ifc.ifc_len == rq_len && old_siocgifconf);
 
   nifs = ifc.ifc_len / sizeof (struct ifreq);