Browse Source

Fix compilation on windows OSes

- include/starpu_top.h: does not need to include unistd.h. When included, compilation with nvcc/mvs fails 
- src/top/starputop_connection.c: include starpu_config.h to detect configuration and include now missing unisdt.h
Nathalie Furmento 14 years ago
parent
commit
d60d264c00
2 changed files with 3 additions and 1 deletions
  1. 0 1
      include/starpu_top.h
  2. 3 0
      src/top/starputop_connection.c

+ 0 - 1
include/starpu_top.h

@@ -19,7 +19,6 @@
 #define __STARPU_TOP_H__
 #define __STARPU_TOP_H__
 #include <stdlib.h>
 #include <stdlib.h>
 #include <time.h>
 #include <time.h>
-#include <unistd.h>
 #include <starpu.h>
 #include <starpu.h>
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 3 - 0
src/top/starputop_connection.c

@@ -15,6 +15,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
+#include <starpu_config.h>
+
 #ifdef STARPU_HAVE_WINDOWS
 #ifdef STARPU_HAVE_WINDOWS
 #  include <w32api.h>
 #  include <w32api.h>
 #  define WINVER WindowsXP
 #  define WINVER WindowsXP
@@ -33,6 +35,7 @@
 #include <string.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/types.h>
 #include <stdlib.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 
 const char *STARPUTOP_PORT = "2011";
 const char *STARPUTOP_PORT = "2011";
 const int STARPUTOP_BUFFER_SIZE=1024;
 const int STARPUTOP_BUFFER_SIZE=1024;