summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ccapi/common/cci_debugging.c12
-rw-r--r--src/ccapi/lib/ccapi_context.c6
-rw-r--r--src/ccapi/lib/ccapi_context.h5
-rw-r--r--src/ccapi/server/ccs_types.h8
-rw-r--r--src/include/win-mac.h5
5 files changed, 30 insertions, 6 deletions
diff --git a/src/ccapi/common/cci_debugging.c b/src/ccapi/common/cci_debugging.c
index 4545b402ef..e35926117c 100644
--- a/src/ccapi/common/cci_debugging.c
+++ b/src/ccapi/common/cci_debugging.c
@@ -1,7 +1,7 @@
/*
* $Header$
*
- * Copyright 2006 Massachusetts Institute of Technology.
+ * Copyright 2007, 2008 Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -27,6 +27,12 @@
#include "cci_common.h"
#include "cci_os_debugging.h"
+#ifdef WIN32
+char* eol = "\n";
+#else
+char* eol = "";
+#endif
+
/* ------------------------------------------------------------------------ */
cc_int32 _cci_check_error (cc_int32 in_error,
@@ -36,8 +42,8 @@ cc_int32 _cci_check_error (cc_int32 in_error,
{
/* Do not log for flow control errors or when there is no error at all */
if (in_error != ccNoError && in_error != ccIteratorEnd) {
- cci_debug_printf ("%s() got %d at %s: %d", in_function,
- in_error, in_file, in_line);
+ cci_debug_printf ("%s() got %d at %s: %d%s", in_function,
+ in_error, in_file, in_line, eol);
}
return in_error;
diff --git a/src/ccapi/lib/ccapi_context.c b/src/ccapi/lib/ccapi_context.c
index 7a165cf980..6bcbd239a6 100644
--- a/src/ccapi/lib/ccapi_context.c
+++ b/src/ccapi/lib/ccapi_context.c
@@ -81,6 +81,12 @@ static cc_int32 cci_context_sync (cci_context_t in_context,
MAKE_INIT_FUNCTION(cci_thread_init);
+#ifdef WIN32
+void cci_thread_init_helper() {
+ cci_thread_init__auxinit();
+ }
+#endif
+
/* ------------------------------------------------------------------------ */
static int cci_thread_init (void)
diff --git a/src/ccapi/lib/ccapi_context.h b/src/ccapi/lib/ccapi_context.h
index 4ac0b06c3a..a9989a1264 100644
--- a/src/ccapi/lib/ccapi_context.h
+++ b/src/ccapi/lib/ccapi_context.h
@@ -75,4 +75,9 @@ cc_int32 ccapi_context_compare (cc_context_t in_context,
cc_context_t in_compare_to_context,
cc_uint32 *out_equal);
+#ifdef WIN32
+void cci_thread_init_helper();
+#endif
+
+
#endif /* CCAPI_CONTEXT_H */
diff --git a/src/ccapi/server/ccs_types.h b/src/ccapi/server/ccs_types.h
index 56056b99ed..a1e65a2515 100644
--- a/src/ccapi/server/ccs_types.h
+++ b/src/ccapi/server/ccs_types.h
@@ -57,9 +57,10 @@ typedef mach_port_t ccs_pipe_t; /* Mach IPC port */
#else
#ifdef WIN32
-/* On Windows, a pipe is the name of the endpoint to which to send the reply: */
-typedef char* ccs_pipe_t;
-#define CCS_PIPE_NULL (char*)NULL
+/* On Windows, a pipe is s struct: */
+#include "ccs_win_pipe.h"
+typedef struct ccs_win_pipe_t* ccs_pipe_t;
+#define CCS_PIPE_NULL (ccs_pipe_t)NULL
#else
typedef int ccs_pipe_t; /* Unix domain socket */
@@ -67,6 +68,7 @@ typedef int ccs_pipe_t; /* Unix domain socket */
#endif
#endif
+
#ifdef TARGET_OS_MAC
#pragma mark -
#endif
diff --git a/src/include/win-mac.h b/src/include/win-mac.h
index 923fe60453..f77cd2b419 100644
--- a/src/include/win-mac.h
+++ b/src/include/win-mac.h
@@ -200,6 +200,11 @@ typedef _W64 int ssize_t;
#define strncasecmp strnicmp
#endif
+/* VS2005 has deprecated strdup */
+#ifndef strdup
+#define strdup _strdup
+#endif
+
HINSTANCE get_lib_instance(void);
#define GETSOCKNAME_ARG2_TYPE struct sockaddr