Oops. Linux...

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: exim-users
Asunto: Oops. Linux...
It didn't take long for the first complaint about 0.56 to come in. I
need advice, please.

One minor change I made was simply to reduce an annoyance. The header
file for the libident library (libident/ident.h) defines the __P macro
for handling function prototypes. The header file for Berkeley DB (db.h)
calls <cdefs.h> which also defines it, and doesn't check it first
(libident does). This causes compiler warnings.

I like things to compile clean, so I added code to undefine __P if it
was already defined, before #including <db.h> from dbhdr.h.

The first person to try compiling on Redhat Linux got a slew of errors.
Turns out that in that system, <db.h>, although the same version as the
copy I have, does NOT call <cdefs.h> and so doesn't define __P.

Sigh. The quick fix is to take out the undefining code at the start of
Exim's dbhdr.h file, of course, but does anyone have any ideas for what
should be done in the long term? I thought about re-ordering the
inclusions, but decided that it wouldn't be a good idea to change things
at this point, as there might be dependences that I didn't know about.
Clearly my worry was well-founded...

Ideas?

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714