Thread

  1. config.h name clash

    Tomasz Wegrzanowski <taw@users.sourceforge.net> — 2001-05-23T21:09:01Z

    ============================================================================
                            POSTGRESQL BUG REPORT TEMPLATE
    ============================================================================
    
    
    Your name		:	Tomasz Wegrzanowski
    Your email address	:	taw@users.sourceforge.net
    
    
    System Configuration
    ---------------------
      Architecture (example: Intel Pentium)  	:   i386
    
      Operating System (example: Linux 2.0.26 ELF) 	:   GNU/Linux 2.4.3
    
      PostgreSQL version (example: PostgreSQL-7.1.1):   PostgreSQL-7.1.1
    
      Compiler used (example:  gcc 2.95.2)		:   gcc 2.95.4
    
    
    Please enter a FULL description of your problem:
    ------------------------------------------------
    
    My program uses autoconf and libpq++. Unfortunatelly autoconf's
    config.h and poetgresql's config.h name-clashes and either libpq++.h
    includes autoconf's config.h or program files include postgresql's
    config.h
    
    
    
    
    Please describe a way to repeat the problem.   Please try to provide a
    concise reproducible example, if at all possible: 
    ----------------------------------------------------------------------
    
    Too many files even for smallest project that uses autoconf would be required.
    If you need them, mail me.
    
    
    
    If you know how this problem might be fixed, list the solution below:
    ---------------------------------------------------------------------
    
    Rename config.h to pgconfig.h or something like that.
    
    
  2. Re: config.h name clash

    Peter Eisentraut <peter_e@gmx.net> — 2001-05-29T20:03:49Z

    Tomasz Wegrzanowski writes:
    
    > My program uses autoconf and libpq++. Unfortunatelly autoconf's
    > config.h and poetgresql's config.h name-clashes and either libpq++.h
    > includes autoconf's config.h or program files include postgresql's
    > config.h
    
    Put -I. before -I<libpq++dir> in your compiler flags.
    
    -- 
    Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter
    
    
    
  3. Re: config.h name clash

    Tomasz Wegrzanowski <taw@users.sourceforge.net> — 2001-05-30T13:44:08Z

    On Tue, May 29, 2001 at 10:03:49PM +0200, Peter Eisentraut wrote:
    > Tomasz Wegrzanowski writes:
    > 
    > > My program uses autoconf and libpq++. Unfortunatelly autoconf's
    > > config.h and poetgresql's config.h name-clashes and either libpq++.h
    > > includes autoconf's config.h or program files include postgresql's
    > > config.h
    > 
    > Put -I. before -I<libpq++dir> in your compiler flags.
    
    That won't work.
    
    program.c:
        #include "config.h"
        #includes <libpq++.h>
    <libpq++dir>/libpq++.h:
        #include "libpq++/pgconnection.h"
    <libpq++dir>/libpq++/pgconnection.h:
        #include "config.h"
    
    Lines `#include "config.h"' must include different files,
    preferably in right order.
    Both `-I. -I<libpq++dir>' and `-I<libpq++dir> -I.'
    includes only one of `config.h's twice.