pgsql: Prevent redeclaration of typedef yyscan_t

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prevent redeclaration of typedef yyscan_t
Date: 2024-12-19 10:43:46
Message-ID: E1tOE0P-000LIY-L9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent redeclaration of typedef yyscan_t

Fix for 1f0de66ea2a: We need to prevent redeclaration of typedef
yyscan_t. (This will work with C11 but not currently with C99.) The
generated scanner files provide their own typedef, but we also need to
provide one for the interfaces that we expose. So we need to add some
preprocessor guards to avoid a redefinition. (This is how the
generated scanner files do it internally as well.) This way
everything now works independent of the order in which things are
included.

Discussion: https://www.postgresql.org/message-id/flat/eb6faeac-2a8a-4b69-9189-c33c520e5b7b(at)eisentraut(dot)org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/382092a0cd2c75613f3df889f7b821577e6773d7

Modified Files
--------------
contrib/cube/cubedata.h | 3 +++
contrib/seg/segdata.h | 3 +++
2 files changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-12-19 11:09:33 Re: pgsql: seg: pure parser and reentrant scanner
Previous Message Michael Paquier 2024-12-19 04:20:57 pgsql: Add backend-level statistics to pgstats