Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fix number and address of blocks in heap comparison algorithm
[simgrid.git] / buildtools / Cmake / test_prog / prog_sem_open.c
index 4679c32f1b181a0490538a839085b539ffd8bf0f..e9f04456bd4267fbf358a10c7505b38632535f52 100644 (file)
 #include <semaphore.h>
 #include <stdio.h>
 
+#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");