Prevent redeclaration of typedef yyscan_t
authorPeter Eisentraut <[email protected]>
Thu, 19 Dec 2024 10:21:06 +0000 (11:21 +0100)
committerPeter Eisentraut <[email protected]>
Thu, 19 Dec 2024 10:24:43 +0000 (11:24 +0100)
commit382092a0cd2c75613f3df889f7b821577e6773d7
tree7d2b6902b5c0cbaaacac5d06191de8d2747db798
parent9aea73fc61d4e77e000724ce0b2f896590a10e03
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
contrib/cube/cubedata.h
contrib/seg/segdata.h