httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: union semun needs to be fixed (for 64-bit)
Date Wed, 06 May 1998 15:25:35 GMT
But this is only used by Solaris2... No other OS in
conf.h defines NEED_UNION_SEMUN :/

And on Solaris2, it's an 'int'

Martin Kraemer wrote:
> 
> In order to be compatible between 32-bit & 64-bit unixes, the val field
> in the union semun (in http_main.c) needs to be changed from int to long.
> That is what the man pages of recent 64 bit versions of IRIX & ReliantUNIX
> suggest anyway. With pointers (and longs) being 64 bit wide, it seems
> sensible to make this change (at least when ints are only 4 bytes long).
> 
> On ReliantUNIX, failing to change val results in a off-by-factor-4gig value
> being used by the semctl routines.
> 
> For 32 bit unixes, this change has no impact, so I think it is recommended
> to make the change now.
> 
>     Martin
> 
> PS: Thanks to Uschi Pippel <pippel.pad@sni.de> for this recommendation.
> 
> --- main/http_main.c.bak	Mon May  4 17:03:20 1998
> +++ main/http_main.c	Wed May  6 17:10:49 1998
> @@ -547,7 +547,7 @@
>  #ifdef NEED_UNION_SEMUN
>  /* it makes no sense, but this isn't defined on solaris */
>  union semun {
> -    int val;
> +    long val;
>      struct semid_ds *buf;
>      ushort *array;
>  };
> 
> -- 
> | 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
> 


-- 
===========================================================================
   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