CMake/Modules/CheckPrototypeDefinition.c.in
Andreas Schneider 4f252abea5 Modules: Added CheckPrototypeDefinition module.
This check if the function exists and the prototype we want to use is
correct. There are still functions which have different prototypes on
different UNIX systems.
2011-03-18 14:03:35 -04:00

30 lines
514 B
C

@CHECK_PROTOTYPE_DEFINITION_HEADER@
static void cmakeRequireSymbol(int dummy, ...) {
(void) dummy;
}
static void checkSymbol(void) {
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
#endif
}
@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
}
#ifdef __CLASSIC_C__
int main() {
int ac;
char*av[];
#else
int main(int ac, char *av[]) {
#endif
checkSymbol();
if (ac > 1000) {
return *av[0];
}
return 0;
}