You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1997/01/07 00:52:29 UTC
Compile-time error for function gettimeofday in file mod_usertrack.c (fwd)
not acked. Anyone with time/expertise to help, please go for it.
---------- Forwarded message ----------
Date: Mon, 06 Jan 1997 17:34:36 -0500
From: Raj Kumar Dash <rk...@geac.com>
To: apache-bugs@apache.org
Subject: Compile-time error for function gettimeofday in file mod_usertrack.c
Greetings again,
The following compile-time error occurred while I was compiling Apache:
cc -c -Iregex -O2 -DSVR4 -DSTATUS mod_headers.c
cc -c -Iregex -O2 -DSVR4 -DSTATUS mod_usertrack.c
mod_usertrack.c: In function `make_cookie':
mod_usertrack.c:134: too many arguments to function `gettimeofday'
*** Error code 1 (bu21)
current working directory is: =
/home/rkdash/apache_1_2b2/apache_1.2b2/src
make: fatal error.
The output of uname -a is:
UNIX_System_V beauty 4.0 R40V4.4 m88k mc88100
I am in fact completely unfamiliar with this version of Unix. I'm trying
to do a port of Apache to this machine to see if it'll work. Do you have
any suggestions? I do not HAVE TO use this OS, but if you have any ideas
on how to get around the compile-time error, it would be much
appreciated.
A portion of /usr/include/sys/time.h follows:
#if !defined(_POSIX_SOURCE)
struct timeval {
time_t tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
};
I sent you an message earlier today stating that I had to set
WANTHSREGEX to "yes" for my OS. Maybe this caused the "gettimeofday"
error?
Raj Dash
Webmaster, Geac Computers
Re: Compile-time error for function gettimeofday in file mod_usertrack.c (fwd)
Posted by Mark J Cox <ma...@ukweb.com>.
> mod_usertrack.c: In function `make_cookie':
> mod_usertrack.c:134: too many arguments to function `gettimeofday'
>
> The output of uname -a is:
> UNIX_System_V beauty 4.0 R40V4.4 m88k mc88100
>
> I sent you an message earlier today stating that I had to set
> WANTHSREGEX to "yes" for my OS.
Turns out that although the man page on his system shows the two
arguments here is what is in his <sys/time.h> file so __BSD__ isn't set.
#ifdef __BSD__
int gettimeofday(struct timeval *, struct timezone *);
int settimeofday(const struct timeval *, const struct timezone *);
#else
int (gettimeofday)(struct timeval *);
int (settimeofday)(const struct timeval *);
#endif /* __BSD__ */
Mark @ukweb