diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-15 12:22:19 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-15 12:22:19 (GMT) |
commit | fad91fb77038a243711677e904314ff0f283a68c (patch) | |
tree | 89337a6d28353128b27da9115ac1452d50907b91 /Modules/CheckForPthreads.c | |
parent | c7a42a1b1f633d89d1d80d8b2703202b0827724e (diff) | |
download | CMake-fad91fb77038a243711677e904314ff0f283a68c.zip CMake-fad91fb77038a243711677e904314ff0f283a68c.tar.gz CMake-fad91fb77038a243711677e904314ff0f283a68c.tar.bz2 |
ENH: fix tests for non-ansi c on hp and remove warnings for ansi c
Diffstat (limited to 'Modules/CheckForPthreads.c')
-rw-r--r-- | Modules/CheckForPthreads.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c index 0f57245..2f0c203 100644 --- a/Modules/CheckForPthreads.c +++ b/Modules/CheckForPthreads.c @@ -5,8 +5,13 @@ void* runner(void*); int res = 0; -int main() -{ +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif pthread_t tid[2]; pthread_create(&tid[0], 0, runner, (void*)1); pthread_create(&tid[1], 0, runner, (void*)2); @@ -14,7 +19,7 @@ int main() usleep(1); // for strange behavior on single-processor sun pthread_join(tid[0], 0); pthread_join(tid[1], 0); - + if(ac > 1000){return *av[0];} return res; } |