mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 05:20:34 +00:00
4f252abea5
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.
30 lines
514 B
C
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;
|
|
}
|