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 1998/05/06 17:13:12 UTC
union semun needs to be fixed (for 64-bit)
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 <pi...@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 | <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
Re: union semun needs to be fixed (for 64-bit)
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Wed, May 06, 1998 at 01:47:54PM -0400, Jim Jagielski wrote:
> > > And on Solaris2, it's an 'int'
> >
> > Is there already a '64-bit Solaris'?
>
> Not sure... I wouldn't be surprised.
>
> > ReliantUNIX requires NEED_UNION_SEMUN as well...
>
> Oh... I didn't see that in conf.h... Is that set via Configure
> maybe?
Yes. There's no #ifdef ReliantUNIX block (and I didn't want to
clutter the SVR4 block with sub-#ifdef's)
> > And, as I said, it doesn't break any unix where sizeof(int) == sizeof(long)
>
> Most OS's don't even define NEED_UNION_SEMUN so we should be
> OK. If we can better fine-tune the Solaris stuff, even better.
Does that mean I can proceed and change it?
Martin
--
| 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
Re: union semun needs to be fixed (for 64-bit)
Posted by Michael Parker <pa...@austx.tandem.com>.
64-bit versions of Solaris are currently being tested.
I don't have access, have just seen people working with them.
Michael
On Wed, May 06, 1998 at 05:37:35PM +0200, Martin Kraemer wrote:
> On Wed, May 06, 1998 at 12:25:35PM -0400, Jim Jagielski wrote:
> > But this is only used by Solaris2... No other OS in
> > conf.h defines NEED_UNION_SEMUN :/
> >
> > And on Solaris2, it's an 'int'
>
> Is there already a '64-bit Solaris'?
> ReliantUNIX requires NEED_UNION_SEMUN as well...
> And, as I said, it doesn't break any unix where sizeof(int) == sizeof(long)
>
> Martin
> --
> | 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
Re: union semun needs to be fixed (for 64-bit)
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Wed, May 06, 1998 at 12:25:35PM -0400, Jim Jagielski wrote:
> But this is only used by Solaris2... No other OS in
> conf.h defines NEED_UNION_SEMUN :/
>
> And on Solaris2, it's an 'int'
Is there already a '64-bit Solaris'?
ReliantUNIX requires NEED_UNION_SEMUN as well...
And, as I said, it doesn't break any unix where sizeof(int) == sizeof(long)
Martin
--
| 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