From: unknown Date: Tue, 10 Jan 2012 14:27:15 +0000 (+0100) Subject: Make those programs succed on windows. X-Git-Tag: exp_20120216~164 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f5b2572660011ca060fcbc47c548dc199b170f26 Make those programs succed on windows. --- diff --git a/buildtools/Cmake/test_prog/prog_sem_init.c b/buildtools/Cmake/test_prog/prog_sem_init.c index 5302a80562..e822e64f4e 100644 --- a/buildtools/Cmake/test_prog/prog_sem_init.c +++ b/buildtools/Cmake/test_prog/prog_sem_init.c @@ -4,6 +4,9 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include +#include +#include #include int main(void) diff --git a/buildtools/Cmake/test_prog/prog_sem_open.c b/buildtools/Cmake/test_prog/prog_sem_open.c index 4679c32f1b..e9f04456bd 100644 --- a/buildtools/Cmake/test_prog/prog_sem_open.c +++ b/buildtools/Cmake/test_prog/prog_sem_open.c @@ -10,9 +10,16 @@ #include #include +#ifndef SEM_FAILED +#define SEM_FAILED (-1) +#endif + int main(void) { - sem_t * s; - +#ifdef WIN32 + int s; +#else + sem_t * s; +#endif s = sem_open("/0", O_CREAT, 0644, 10); if (s == SEM_FAILED){ // printf("sem_open failed\n");