Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFHVG-0002LP-Iz for pgsql-interfaces@arkaria.postgresql.org; Mon, 07 Sep 2020 13:48:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFHVF-0005Dr-Hi for pgsql-interfaces@arkaria.postgresql.org; Mon, 07 Sep 2020 13:48:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFHVF-0005Dg-AO for pgsql-interfaces@lists.postgresql.org; Mon, 07 Sep 2020 13:48:13 +0000 Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFHVC-0002L6-Uj; Mon, 07 Sep 2020 13:48:12 +0000 Received: by mail-yb1-xb42.google.com with SMTP id q3so9381202ybp.7; Mon, 07 Sep 2020 06:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=aQpJ6E2HSULGAF3fgXZwZHafyP1TCA+rMnUoRSgMeAM=; b=ALI+X2+dZF9wJWGsD6HWACb0VkaTl+JLSsMD0SG4AWFb8IkheuiLoC5vcg4+l/LPMg ZezUQygPXbLw/do5GuosMLUMfHzMjVdQgW3eirScEsDMbsKv5aVvz5HzrHTjQHL+l5w3 3jSZCi8ClUIcVlRoFOwDNvXlt6L3fXJfe+B5KDLBq3qZVOVOMYoNXX1MaI8qconRn2Qo 3qdQRQe9/VgNiYPx1KmS7TL5f8JTADTFnjxgHiDUK9MyWYwJgRTs2h3oxncL/9EsgkEZ MScWMlyoPZEQkcqWlgobmZS/KMgcxps0VewNNbU55Od4ESoSPbqv5FJjO4sXVGFCE0nP MZLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=aQpJ6E2HSULGAF3fgXZwZHafyP1TCA+rMnUoRSgMeAM=; b=XZ5EMKJrjKv1CT1WE41Irksq06dIA6Cd0+8VbgydOwcMxoyDXZV7MgH8f2zF8mbTfM /AGVYYrm4ZalUfWtYaZQ2aibpFdqDGIDnlWLMSICNZgyx5bGGP3AlMFZXF7xOKeg7St8 OSqd2TWeXgjHMuffEya6ojRYggCSwbcqT8CPrWJYY7qCZt1L5jwLyfn4i2mKG83OKei+ U6IZDzFkUSan4teoCWFiuiWZv5wT0DpMpy7Kct1p5k1r/L9a/z9sUwc3pVvaWn9Ehzwc 5wPssFxr+88xg6yB3Y3sQji3jaMYsc8E51W8G9njDuMLGmVcDkoi7hndBgy+896ADBFE vjDw== X-Gm-Message-State: AOAM531QhVkGNUO0pb6gO6ftXo6c/rOs6Fk4GPBEtQrFM/v9Lyi67NpR Y7ReKbLuqaaEh8ZSVzptWG26oPP+ManpKnk3IOsBYpwDe4A= X-Google-Smtp-Source: ABdhPJzdJTE0+AfGZsyBbH5f7aGBmDrJXWpf2/mDA+SXuqoWzTXrV6nQ/m8GPUSVNOKlNQOx0OvYBCniQo6BH7P4rIU= X-Received: by 2002:a25:c4c4:: with SMTP id u187mr26025688ybf.454.1599486489575; Mon, 07 Sep 2020 06:48:09 -0700 (PDT) MIME-Version: 1.0 From: Ashutosh Sharma Date: Mon, 7 Sep 2020 19:17:58 +0530 Message-ID: Subject: #include present twice in define.pgc To: pgsql-interfaces@postgresql.org Cc: Michael Meskes Content-Type: multipart/alternative; boundary="00000000000008c5f905aeb978cd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000008c5f905aeb978cd Content-Type: text/plain; charset="UTF-8" Hi All, I could see that the #include statement is present twice in the define.pgc test file. See below: [ashu@localhost postgresql]$ head src/interfaces/ecpg/test/preproc/define.pgc #include #include #include #include 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 --00000000000008c5f905aeb978cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All,

I could see that the #include <stdlib.h&= gt; statement is present twice in the define.pgc test file. See below:
<= br>[ashu@localhost postgresql]$ head src/interfaces/ecpg/test/preproc/defin= e.pgc
#include <stdlib.h>
#include <string.h>
#include= <stdlib.h>
#include <stdio.h>

exec sql include ../re= gression;

...
...

Should we consider removing one of them?=

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

--
W= ith Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com
--00000000000008c5f905aeb978cd--