Is it posible to check if a struct was defined before (in a header file) during preprocessor?
c
Solution
I have checked in ANSI C spec
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
here Preprocessing directives only talk about identifier.
so it is NOT possible to check that this structure is defined or not.
Problem
I want to check if a certain structure was defined in a header file I included and define it if it is not. The header might, or might not be included in the source file and that is (obviously) known at compile time. Essentially I want something similar to the `ifndef` guards used in header files and I know that I could use a check if the header file where the `struct` is defined is included by checking it's guard, but I am wandering if I could check for the `struct` itself.