Thread: pgsql: Prevent redeclaration of typedef yyscan_t

pgsql: Prevent redeclaration of typedef yyscan_t

From
Peter Eisentraut
Date:
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@eisentraut.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(+)