httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <>
Subject Re: WWW Form Bug Report: "problems compiling on Alpha OSF1" on OSF/1
Date Mon, 18 Dec 1995 22:31:29 GMT
In reply to Ben Laurie who said
> > > gcc -c -O2 -DOSF1 alloc.c
> > > In file included from /usr/local/lib/gcc-lib/alpha-dec-osf3.0/2.6.3/include/sys/wait.h:299,
> > >                  from conf.h:313,
> > >                  from alloc.c:62:
> > > /usr/include/sys/siginfo.h:45: redefinition of `union sigval'
> > > /usr/include/sys/siginfo.h:48: redefinition of `sigval_t'
> > > /usr/local/lib/gcc-lib/alpha-dec-osf3.0/2.6.3/include/sys/signal.h:206: `sigval_t'
previously declared here
> I think this is Digital's problem.

Or gcc's since gcc installs it's own header files. Looks like a clash between
the two.

> > > alloc.c: In function `fd_cleanup':
> > > alloc.c:676: warning: cast from pointer to integer of different size
> > > alloc.c: In function `note_cleanups_for_fd':
> > > alloc.c:679: warning: cast to pointer from integer of different size
> > > alloc.c: In function `pclosef':
> > > alloc.c:699: warning: cast to pointer from integer of different size
> And these are, of course, because of 64 bit integers. However, they should
> be harmless (file descriptors should fit into a pointer without any problems),
> so fixing this is cleanup.

I wonder if Apache is 64 bit clean?

static void fd_cleanup (void *fdv) { close ((int)fdv); }

Tut, tut, tut. Someone needs to go and read their C manual.

I don't have a copy of the standard but at best this is implementation
dependant and at worst it's simply wrong :-) I thing the standard says
something like, casting a pointer to an int is ok *if* the int is large
enough and casting back from an int will give you the original pointer
if the int was big enough in the first place. Whether the int is big
enough or not *depends on the implementation*.

int may not be 64 bits on a 64 bit architecture whereas an address
probably would be. This may well work on all platform we currently
support but that would be down to luck and not design.

  Paul Richards. Originative Solutions Ltd.
  Phone: 0370 462071 (Mobile), +44 1225 447500 (work)

View raw message