You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1997/06/02 19:22:26 UTC
[BUG] apache_1.2b11/mod_usertrack: gettimeofday() in SVR4
Hi,
I just fetched apache_1.2b11. It compiles (almost) painlessly under SVR4,
except for the gettimeofday() call, which was broken by the SYSV people:
mod_usertrack.c 150: [error]: CFE1140 too many arguments in function call
gettimeofday(&tv, &tz);
^
The system has the following definition for gettimeofday(), and apparently
does NOT define _XPG_IV by default....:
> #if defined(_XPG_IV)
> int gettimeofday(struct timeval *, void *);
> #else
> int gettimeofday(struct timeval *);
> #endif /* defined(_XPG_IV) */
The following patch fixes this problem for SINIX (this is the current
SVR4 version of SIEMENS NIXDORF), maybe this could make it into 1.2?!?
It also defines the shared memory flags which work correctly in SINIX
versions.
diff -u -r1.37 Configure
--- Configure 1997/05/13 07:45:04 1.37
+++ Configure 1997/06/02 17:17:32
@@ -393,7 +393,7 @@
;;
*-sni-sysv4*)
OS='SVR4'
- CFLAGS="$CFLAGS -DSVR4"
+ CFLAGS="$CFLAGS -DSVR4 -D_XPG_IV -DHAVE_MMAP -DHAVE_SHMGET"
DEF_WANTHSREGEX=yes
LIBS="$LIBS -lsocket -lnsl -lc"
;;
Martin.
_____
PS: Furthermore, there are a couple of warnings, from which I show only the
most important ones (call me if you're interested in more):
util_snprintf.c 187: [warning]: CFE1260 explicit type is missing ("int" assumed)
register i;
^
buff.h 68: [warning]: CFE1881 macro defined differently than macro "B_ERROR" (declared at line 208 of "/usr/include/sys/buf.h")
#define B_ERROR (48)
^
http_main.c 1779: [warning]: CFE1167 argument of type "int *" is incompatible with parameter of type "size_t *"
csd = accept(sd, &sa_client, &clen);
^
http_main.c 1824: [warning]: CFE1167 argument of type "int *" is incompatible with parameter of type "size_t *"
if (getsockname(csd, &sa_server, &clen) < 0) {
^
http_main.c 2428: [warning]: CFE1167 argument of type "int *" is incompatible with parameter of type "size_t *"
if ((getpeername(fileno(stdin), &sa_client, &c)) < 0)
^
http_main.c 2436: [warning]: CFE1167 argument of type "int *" is incompatible with parameter of type "size_t *"
if(getsockname(fileno(stdin), &sa_server, &c) < 0) {
^
http_config.c 622: [warning]: CFE1676 using out-of-scope declaration of function "strcasecmp" (declared at line 332)
if (!strcasecmp (name, cmds->name))
^
util_script.c 409: [warning]: CFE1068 integer conversion resulted in a change of sign
if(size == -1)
^
--
| S I E M E N S | <Ma...@mch.sni.de> | Siemens Nixdorf
| ------------- | Voice: +49-89-636-46021 | Informationssysteme AG
| N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request