diff options
Diffstat (limited to 'libs/libevent/docs/cmake/CheckFunctionExistsEx.c')
-rw-r--r-- | libs/libevent/docs/cmake/CheckFunctionExistsEx.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/libevent/docs/cmake/CheckFunctionExistsEx.c b/libs/libevent/docs/cmake/CheckFunctionExistsEx.c new file mode 100644 index 0000000000..5ee3e5913a --- /dev/null +++ b/libs/libevent/docs/cmake/CheckFunctionExistsEx.c @@ -0,0 +1,30 @@ +#ifdef CHECK_FUNCTION_EXISTS + +#ifndef _WIN32 +char CHECK_FUNCTION_EXISTS(); +#endif + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif +#ifdef _WIN32 + void * p = &CHECK_FUNCTION_EXISTS; +#else + CHECK_FUNCTION_EXISTS(); +#endif + if(ac > 1000) + { + return *av[0]; + } + return 0; +} + +#else /* CHECK_FUNCTION_EXISTS */ + +# error "CHECK_FUNCTION_EXISTS has to specify the function" + +#endif /* CHECK_FUNCTION_EXISTS */ |