httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] NET_SIZE_T on 64 bit machines
Date Wed, 03 Jun 1998 15:53:20 GMT
Ugg... It would nice to know if other 64s acted the same. If so,
then I would think that this would need to go into 1.3.0 (which,
of course, couldn't be called that anymore, but instead 1.3.1)

Martin Kraemer wrote:
> 
> 
> --k+w/mQv8wyuph6w0
> Content-Type: text/plain; charset=us-ascii
> 
> I noticed the problem on a 64 bit machine (with apache-1.3.0) that all log
> file entries only logged accesses from addr 0.0.0.0.
> 
> Tracking down the problem showed that the 64 bit versions of accept(),
> bind() et al. need an "int *" as length parameter instead of a "size_t *".
> Since this is a big endian machine (MIPS EB) the size was interpreted
> as zero and the IP address of the caller was discarded.
> 
> The patch below fixes it _for_this_machine_ (because setting the 64 bit
> compilation mode sets the compiler #define __LP64__). I wonder how other
> 64 bit compilers do it.
> 
>     Martin
> -- 
> | S I E M E N S |  <Martin.Kraemer@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
> 
> --k+w/mQv8wyuph6w0
> Content-Type: text/plain; charset=us-ascii
> Content-Description: Patch for 64 bit detection of client address - for ReliantUNIX-5.44
> Content-Disposition: attachment; filename="conf64.patch"
> 
> Index: include/conf.h
> ===================================================================
> RCS file: /home/cvs/apachen/src/include/conf.h,v
> retrieving revision 1.36
> diff -u -r1.36 conf.h
> --- conf.h	1998/05/29 15:39:31	1.36
> +++ conf.h	1998/06/03 15:40:09
> @@ -497,7 +497,11 @@
>  #define USE_FCNTL_SERIALIZED_ACCEPT
>  #endif
>  #define HAVE_SYSLOG 1
> +#ifdef __LP64__ /* 64 bit systems still have an int here */
> +#define NET_SIZE_T int
> +#else
>  #define NET_SIZE_T size_t
> +#endif
>  #define HAVE_SHMGET 1
>  #define USE_SHMGET_SCOREBOARD
>  #ifdef _OSD_POSIX /* BS2000-POSIX mainframe needs initgroups */
> 
> --k+w/mQv8wyuph6w0--
> 


-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message