Subject: #include <stdlib.h> present twice in define.pgc

From: Ashutosh Sharma <[email-masked]>
Date: Mon, 7 Sep 2020 19:17:58 +0530

Hi All,

I could see that the #include <stdlib.h> statement is present twice in the
define.pgc test file. See below:

[ashu@localhost postgresql]$ head
src/interfaces/ecpg/test/preproc/define.pgc
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

exec sql include ../regression;

...
...

Should we consider removing one of them?

I know that there won't be multiple inclusion of the same header file
because of #ifndef and #define pre-processor directives which defines
_STDLIB_H macro that allows the file to included just once, but I still
feel that it is better to avoid having such things. It doesn't do any harm
but is certainly not required. Thoughts?

-- 
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 25 Jan 2021 09:16:12 +0100

On 2020-09-07 15:47, Ashutosh Sharma wrote:
> I could see that the #include <stdlib.h> statement is present twice in 
> the define.pgc test file. See below:
> 

fixed

---

From: Ashutosh Sharma <[email-masked]>
Date: Mon, 25 Jan 2021 17:20:51 +0530

thanks.!

On Monday, January 25, 2021, Peter Eisentraut <
[email-masked]> wrote:

>> [ashu@localhost postgresql]$ head src/interfaces/ecpg/test/prepr
>> oc/define.pgc
>> #include <stdlib.h>
>> #include <string.h>
>> #include <stdlib.h>
>> #include <stdio.h>
>>
>
> fixed
>