A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert the sem_open 'fix'
[simgrid.git]
/
buildtools
/
Cmake
/
test_prog
/
prog_sem_open.c
diff --git
a/buildtools/Cmake/test_prog/prog_sem_open.c
b/buildtools/Cmake/test_prog/prog_sem_open.c
index
4679c32
..
8a1dfb6
100644
(file)
--- a/
buildtools/Cmake/test_prog/prog_sem_open.c
+++ b/
buildtools/Cmake/test_prog/prog_sem_open.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010
-2014
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-10,9
+10,16
@@
#include <semaphore.h>
#include <stdio.h>
#include <semaphore.h>
#include <stdio.h>
-int main(void) {
- sem_t * s;
-
+#ifndef SEM_FAILED
+#define SEM_FAILED (-1)
+#endif
+
+int main(void) {
+#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");
s = sem_open("/0", O_CREAT, 0644, 10);
if (s == SEM_FAILED){
// printf("sem_open failed\n");