Browse Source

libtool was refusing to create a dll just because objdump on wsock32 was talking french. Force C messages, and re-enable the use of wsock32

Samuel Thibault 15 years ago
parent
commit
c6b4a8be4c

+ 1 - 1
configure.ac

@@ -76,7 +76,7 @@ AC_COMPILE_IFELSE(
   ]], [[ pthread_t t; pthread_create(&t, NULL, NULL, NULL); ]]),,
   ]], [[ pthread_t t; pthread_create(&t, NULL, NULL, NULL); ]]),,
   AC_MSG_ERROR([pthread_create unavailable]))
   AC_MSG_ERROR([pthread_create unavailable]))
 AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
 AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
-#AC_HAVE_LIBRARY([wsock32])
+AC_HAVE_LIBRARY([wsock32])
 AC_CHECK_FUNCS([sysconf])
 AC_CHECK_FUNCS([sysconf])
 
 
 AC_CHECK_FUNC([pthread_spin_lock], have_pthread_spin_lock=yes, have_pthread_spin_lock=no)
 AC_CHECK_FUNC([pthread_spin_lock], have_pthread_spin_lock=yes, have_pthread_spin_lock=no)

+ 4 - 0
src/Makefile.am

@@ -23,6 +23,10 @@ EXTRA_DIST = dolib.c
 ldflags =
 ldflags =
 
 
 if STARPU_HAVE_WINDOWS
 if STARPU_HAVE_WINDOWS
+
+LC_MESSAGES=C
+export LC_MESSAGES
+
 ldflags += -Xlinker --output-def -Xlinker .libs/libstarpu.def
 ldflags += -Xlinker --output-def -Xlinker .libs/libstarpu.def
 
 
 if STARPU_HAVE_MS_LIB
 if STARPU_HAVE_MS_LIB

+ 0 - 4
src/core/perfmodel/perfmodel_bus.c

@@ -449,11 +449,7 @@ static void get_bus_path(const char *type, char *path, size_t maxlen)
 	strncat(path, type, maxlen);
 	strncat(path, type, maxlen);
 
 
 	char hostname[32];
 	char hostname[32];
-#ifndef __MINGW32__
 	gethostname(hostname, 32);
 	gethostname(hostname, 32);
-#else
-	snprintf(hostname, sizeof(hostname), "localhost");
-#endif
 	strncat(path, ".", maxlen);
 	strncat(path, ".", maxlen);
 	strncat(path, hostname, maxlen);
 	strncat(path, hostname, maxlen);
 }
 }

+ 0 - 8
src/core/perfmodel/perfmodel_history.c

@@ -200,11 +200,7 @@ static void get_model_debug_path(struct starpu_perfmodel_t *model, const char *a
 	strncat(path, model->symbol, maxlen);
 	strncat(path, model->symbol, maxlen);
 	
 	
 	char hostname[32];
 	char hostname[32];
-#ifndef __MINGW32__
 	gethostname(hostname, 32);
 	gethostname(hostname, 32);
-#else
-	snprintf(hostname, sizeof(hostname), "localhost");
-#endif
 	strncat(path, ".", maxlen);
 	strncat(path, ".", maxlen);
 	strncat(path, hostname, maxlen);
 	strncat(path, hostname, maxlen);
 	strncat(path, ".", maxlen);
 	strncat(path, ".", maxlen);
@@ -246,11 +242,7 @@ static void get_model_path(struct starpu_perfmodel_t *model, char *path, size_t
 	strncat(path, model->symbol, maxlen);
 	strncat(path, model->symbol, maxlen);
 	
 	
 	char hostname[32];
 	char hostname[32];
-#ifndef __MINGW32__
 	gethostname(hostname, 32);
 	gethostname(hostname, 32);
-#else
-	snprintf(hostname, sizeof(hostname), "localhost");
-#endif
 	strncat(path, ".", maxlen);
 	strncat(path, ".", maxlen);
 	strncat(path, hostname, maxlen);
 	strncat(path, hostname, maxlen);
 }
 }

+ 1 - 1
src/core/workers.c

@@ -254,7 +254,7 @@ int starpu_init(struct starpu_conf *user_conf)
 	initialized = CHANGING;
 	initialized = CHANGING;
 	PTHREAD_MUTEX_UNLOCK(&init_mutex);
 	PTHREAD_MUTEX_UNLOCK(&init_mutex);
 
 
-#ifdef __MINGW32__DISABLED
+#ifdef __MINGW32__
 	WSADATA wsadata;
 	WSADATA wsadata;
 	WSAStartup(MAKEWORD(1,0), &wsadata);
 	WSAStartup(MAKEWORD(1,0), &wsadata);
 #endif
 #endif