Browse Source

include: ssize_t is not defined on virtual studio, use starpu_ssize_t which will be defined as ssize_t or long depending on the platform

Nathalie Furmento 14 years ago
parent
commit
bc7c8bcc60
2 changed files with 9 additions and 1 deletions
  1. 8 0
      include/starpu_config.h.in
  2. 1 1
      include/starpu_data_interfaces.h

+ 8 - 0
include/starpu_config.h.in

@@ -57,4 +57,12 @@
 #undef starpu_srand48
 #undef starpu_erand48
 
+#ifdef _MSC_VER
+typedef long starpu_ssize_t;
+#else
+#  include <sys/types.h>
+typedef ssize_t starpu_ssize_t;
+#endif
+
+
 #endif

+ 1 - 1
include/starpu_data_interfaces.h

@@ -84,7 +84,7 @@ struct starpu_data_copy_methods {
 struct starpu_data_interface_ops_t {
 	void (*register_data_handle)(starpu_data_handle handle,
 					uint32_t home_node, void *data_interface);
-	ssize_t (*allocate_data_on_node)(void *data_interface, uint32_t node);
+	starpu_ssize_t (*allocate_data_on_node)(void *data_interface, uint32_t node);
 	void (*free_data_on_node)(void *data_interface, uint32_t node);
 	const struct starpu_data_copy_methods *copy_methods;
 	size_t (*get_size)(starpu_data_handle handle);