"[PATCH] - libU77 not handling gettimeofday args"
Donn Terry
donnte@microsoft.com
Mon Jul 3 10:17:00 GMT 2000
I'm told that some of my patches come thru with whitespace mangling.
I'm sending this patch a different way, so maybe it won't happen.
If it does happen, I'll be resubmitting it another way yet, but I can't
see it until after it comes back from the list.
---
Problem: Illegal call to gettimeofday on a strictly SUS conformant
system. The SUS requires that gettimeofday be called with exactly
two arguments, with the second one always NULL. (That's what
the book says, see SUS V5 P375 -- OK, it's unspecified what happens
if the 2'd argument is not null.)
The aclocal.m4 script to gettimeofday for that assumes that either the
implementation has a one-argument gettimeofday (if there is no
struct timezone) or that the implementation has a two-argument
gettimeofday if there is a struct timezone. The SUS permits a
third alternative: a two argument gettimeofday where there is no
struct timezone because the second argument is required to be NULL.
The patch allows for that.
2000-07-03 Donn Terry (donnte@microsoft.com)
* libU77/aclocal.m4: check for 2 argument gettimeofday without
struct
timezone.
diff egcs.source/libf2c/libU77/aclocal.m4.orig
egcs.source/libf2c/libU77/aclocal.m4
--- egcs.source/libf2c/libU77/aclocal.m4.orig Fri Nov 5 18:06:24 1999
+++ egcs.source/libf2c/libU77/aclocal.m4 Fri Nov 5 18:16:19 1999
@@ -54,8 +54,13 @@ main ()
],
[
struct timeval time;
+#ifdef HAVE_TIMEZONE
struct timezone dummy;
- gettimeofday (&time, &dummy);],
+#define DUMMY &dummy
+#else
+#define DUMMY NULL
+#endif
+ gettimeofday (&time, DUMMY);],
emacs_cv_gettimeofday_two_arguments=yes,
emacs_cv_gettimeofday_two_arguments=no))
if test $emacs_cv_gettimeofday_two_arguments = no; then
+
More information about the Gcc-patches
mailing list