Skip site navigation (1) Skip section navigation (2)

Embedded SQL: Putting a guard around included stdio.h for convenience

From: Carsten Klein <carstenklein(at)yahoo(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Embedded SQL: Putting a guard around included stdio.h for convenience
Date: 2003-10-01 22:57:37
Message-ID: 3F7B5BE1.3000309@yahoo.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi all,

I have just tried to compile an application consisting of multiple 
modules, each of them encapsulation access to a single table of
the default database, using embedded sql.

Well, until now, I have had problems with stuff being declared twice 
(from stdio.h and successively included include files by stdio.h),
since postgres sources seemingly do not put a guard around the include 
statement.

what i mean is, please, do include the following:

#ifndef _STDIO_H
#include <stdio.h>
#endif /* _STDIO_H */

This seemingly is not being generated by the ecpg or included in the 
header files being included.

And while we are at it, although I personally think that Embedded SQL is 
quite obsolete by now (but we have to do this stuff in school, perhaps 
I'm wrong),
please check other parts of your source referencing (including) external 
include files, where there is no guard around the include statement. It 
makes things
tedious and nearly impossible to solve, when they are not there...


Thanks.

Carsten Klein



Responses

pgsql-interfaces by date

Next:From: gregDate: 2003-10-03 13:37:34
Subject: Re: PQescapeString handling of \0
Previous:From: Igor ShevchenkoDate: 2003-09-29 19:15:20
Subject: Re: PQescapeString handling of \0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group