aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Koch <kpkoch@mit.edu>2008-01-22 16:34:31 +0000
committerKevin Koch <kpkoch@mit.edu>2008-01-22 16:34:31 +0000
commit71bc89ed452de3b5aa6356087280554e58ae4456 (patch)
treeba6b451184014bffd741037c0b80a27e9517e115
parent3bbddf92797339694a9881d6f08b5bb0aea5adbe (diff)
downloadkrb5-71bc89ed452de3b5aa6356087280554e58ae4456.zip
krb5-71bc89ed452de3b5aa6356087280554e58ae4456.tar.gz
krb5-71bc89ed452de3b5aa6356087280554e58ae4456.tar.bz2
Make windows debug message line endings match the Mac endings.
Windows needs k5-platform helper function declared explicitly. Change definition of ccs_pipe_t for windows. #define strdup -- it's now deprecated on windows. TargetVersion: 1.7 Component: krb5-libs Ticket: 5594 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20201 dc483132-0cff-0310-8789-dd5450dbe970
-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 4545b40..e359261 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 7a165cf..6bcbd23 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 4ac0b06..a9989a1 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 56056b9..a1e65a2 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 923fe60..f77cd2b 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