RPM Community Forums

Mailing List Message of <rpm-devel>

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

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 30 Jul 2008 - 11:38:31 CEST
Message-id: <C94BCC77-065F-4508-B35F-A3DA1DA5C884@mac.com>
Argh ...

This "band-aid" prevents installing argv.h in /usr/include/rpm w/o messy
AutoFu.


All rpm include files should __NOT__ carry AutoFu #defines into /usr/ 
include.

Automagically including <stdint.h> is far worse than just forcing  
applications to
include <stdint.h> (or inttypes.h or using their own typedefs's or  
whatever)

Is it __REALLY_ that hard to get application developers to add
    #include <stdint.h>
where needed?

73 de Jeff

On Jul 30, 2008, at 3:42 AM, Ralf S. Engelschall wrote:

>   RPM Package Manager, CVS Repository
>   http://rpm5.org/cvs/
>    
> ______________________________________________________________________ 
> ______
>
>   Server: rpm5.org                         Name:   Ralf S. Engelschall
>   Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
>   Module: rpm                              Date:   30-Jul-2008  
> 09:42:43
>   Branch: HEAD                             Handle: 2008073007424300
>
>   Modified files:
>     rpm/rpmio               argv.h
>
>   Log:
>     band-aid the <stdint.h> inclusion in a portable way
>
>   Summary:
>     Revision    Changes     Path
>     1.11        +8  -0      rpm/rpmio/argv.h
>    
> ______________________________________________________________________ 
> ______
>
>   patch -p0 <<'@@ .'
>   Index: rpm/rpmio/argv.h
>    
> ====================================================================== 
> ======
>   $ cvs diff -u -r1.10 -r1.11 argv.h
>   --- rpm/rpmio/argv.h	29 Jul 2008 15:00:20 -0000	1.10
>   +++ rpm/rpmio/argv.h	30 Jul 2008 07:42:43 -0000	1.11
>   @@ -5,7 +5,15 @@
>     * \file rpmio/argv.h
>     */
>
>   +#ifdef HAVE_CONFIG_H
>   +#include "config.h"
>   +#endif
>   +#if defined(HAVE_STDINT_H) || (defined(__STDC_VERSION__) &&  
> __STDC_VERSION__+0 >= 199901L)
>    #include <stdint.h>
>   +#endif
>   +#if defined(HAVE_INTTYPES_H)
>   +#include <inttypes.h>
>   +#endif
>
>    typedef	const char * ARGstr_t;
>    typedef ARGstr_t * ARGV_t;
>   @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Wed Jul 30 11:39:01 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.