RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm-5_1: rpm/rpmio/ argv.h

From: Arkadiusz Miskiewicz <arekm@maven.pl>
Date: Tue 29 Jul 2008 - 19:03:59 CEST
Message-Id: <200807291903.59455.arekm@maven.pl>
On Tuesday 29 July 2008, Ralf S. Engelschall wrote:

> >     */
> >
> >   +#include <stdint.h>
> >   +
> >    typedef	const char * ARGstr_t;
> >    typedef ARGstr_t * ARGV_t;
> > [...]
>
> Even if we are already in 2008, unconditionally including the C99
> header <stdint.h> is not recommended as it breaks platform portability.
> We really have to wrap this. If you want to externally include this
> "argv.h" outside the RPM source tree one really has to supply #defines
> to enable those includes.

I think that we should wrap crappy old platforms and don't punish modern one 
(not vice versa).

So AC_PROG_CC_C99 in configure.ac

if x = xno; then
 AC_DEFINE(MY_COMPILER_IS_A_CRAP)
fi

and 
#ifndef MY_COMPILER_IS_A_CRAP
#include <stdint.h>
#endif

type of solution. Does that work for you?

About " If you want to externally include this argv.h" - I don't but rpm*.h 
headers do that for me.

>                                        Ralf S. Engelschall

-- 
Arkadiusz Miƛkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
Received on Tue Jul 29 19:23:02 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.