diff --git a/cmake/CheckFunctionExistsEx.c b/cmake/CheckFunctionExistsEx.c index 5ee3e591..224e3404 100644 --- a/cmake/CheckFunctionExistsEx.c +++ b/cmake/CheckFunctionExistsEx.c @@ -1,30 +1,28 @@ #ifdef CHECK_FUNCTION_EXISTS -#ifndef _WIN32 -char CHECK_FUNCTION_EXISTS(); +#ifdef __cplusplus +extern "C" #endif - + char + CHECK_FUNCTION_EXISTS(void); #ifdef __CLASSIC_C__ -int main(){ +int main() +{ int ac; - char*av[]; + char* av[]; #else -int main(int ac, char*av[]){ +int main(int ac, char* av[]) +{ #endif -#ifdef _WIN32 - void * p = &CHECK_FUNCTION_EXISTS; -#else CHECK_FUNCTION_EXISTS(); -#endif - if(ac > 1000) - { + if (ac > 1000) { return *av[0]; - } + } return 0; } -#else /* CHECK_FUNCTION_EXISTS */ +#else /* CHECK_FUNCTION_EXISTS */ -# error "CHECK_FUNCTION_EXISTS has to specify the function" +#error "CHECK_FUNCTION_EXISTS has to specify the function" #endif /* CHECK_FUNCTION_EXISTS */