This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
A patch for timeval
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: A patch for timeval
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 24 Oct 1998 18:05:15 -0700 (PDT)
- Cc: libc-hacker@cygnus.com (GNU C Library)
I added __need_timeval.
--
H.J. Lu (hjl@gnu.org)
---
Sat Oct 24 17:59:51 1998 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/alpha/bits/time.h (timeval): Protect
with __need_timeval.
* sysdeps/unix/sysv/linux/mips/bits/time.h (timeval): Likewise.
* sysdeps/unix/sysv/linux/bits/time.h (timeval): Likewise.
Index: sysdeps/unix/sysv/linux/alpha/bits/time.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/alpha/bits/time.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 time.h
--- time.h 1998/07/31 16:13:22 1.1.1.4
+++ time.h 1998/10/23 15:28:38
@@ -42,11 +42,12 @@
# endif /* bits/time.h */
#endif /* !__need_timeval */
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-# include <bits/types.h>
-
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
@@ -54,4 +55,5 @@
__time_t tv_sec; /* Seconds. */
__time_t tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */
Index: sysdeps/unix/sysv/linux/mips/bits/time.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/mips/bits/time.h,v
retrieving revision 1.4
diff -u -r1.4 time.h
--- time.h 1998/09/12 18:17:01 1.4
+++ time.h 1998/10/23 15:29:25
@@ -42,8 +42,10 @@
# endif /* bits/time.h */
#endif
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
@@ -51,4 +53,5 @@
long int tv_sec; /* Seconds. */
long int tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */
Index: sysdeps/unix/sysv/linux/bits/time.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/bits/time.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 time.h
--- time.h 1997/12/05 00:30:16 1.1.1.2
+++ time.h 1998/10/23 15:29:44
@@ -42,9 +42,11 @@
# endif /* bits/time.h */
#endif
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-# include <bits/types.h>
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
@@ -53,4 +55,5 @@
__time_t tv_sec; /* Seconds. */
__time_t tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */