Re: [PATCHES] Cygwin PostgreSQL ESQL Patch - Mailing list pgsql-cygwin

From Tom Lane
Subject Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
Date
Msg-id 26867.987785010@sss.pgh.pa.us
Whole thread Raw
In response to Cygwin PostgreSQL ESQL Patch  (Jason Tishler <Jason.Tishler@dothill.com>)
Responses Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
List pgsql-cygwin
Jason Tishler <Jason.Tishler@dothill.com> writes:
> --- include/sqlca.h    2001/03/22 06:16:20    1.16
> +++ include/sqlca.h    2001/04/20 14:15:01
> @@ -1,6 +1,12 @@
>  #ifndef POSTGRES_SQLCA_H
>  #define POSTGRES_SQLCA_H

> +#ifdef __CYGWIN__
> +#define DLLIMPORT __declspec (dllimport)
> +#else
> +#define DLLIMPORT
> +#endif /* __CYGWIN__ */
> +
>  #define SQLERRMC_LEN    70

This seems rather bad --- why should sqlca.h define this symbol?  What
happens if sqlca.h is included in a file that also includes other
Postgres includes, which will probably pull in c.h where the real
definition is?  I'd suggest adding

    #include "postgres_ext.h"
    #include "c.h"

instead, which may be more namespace pollution than we'd like, but
at least it does not create a potential definition conflict.

            regards, tom lane

pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: initdb fails
Next
From: Jason Tishler
Date:
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch