summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-03 10:00:23 +0100
committerStef Walter <stefw@gnome.org>2013-03-03 10:07:14 +0100
commitbee435e09111f43dcc406160e9c9bdd8645fc86c (patch)
tree8ca133400350ede433cb110fef632a7905bf4129
parent61e0cb5dddb89ddab1d68791eb28d892c114622f (diff)
downloadp11-kit-bee435e09111f43dcc406160e9c9bdd8645fc86c.tar.gz
Fix syntax errors in OS_WIN32 ifdefs
-rw-r--r--common/compat.h4
-rw-r--r--common/library.c6
-rw-r--r--p11-kit/conf.c2
-rw-r--r--p11-kit/util.c4
-rw-r--r--trust/module.c6
-rw-r--r--trust/tests/test-module.c2
6 files changed, 14 insertions, 10 deletions
diff --git a/common/compat.h b/common/compat.h
index d4858f0..a6a02af 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -127,9 +127,9 @@ typedef DWORD p11_thread_id_t;
typedef void * (*p11_thread_routine) (void *arg);
-int p11_thread_create (thread_t *thread, thread_routine, void *arg);
+int p11_thread_create (p11_thread_t *thread, p11_thread_routine, void *arg);
-int p11_thread_join (thread_t thread);
+int p11_thread_join (p11_thread_t thread);
/* Returns a thread_id_t */
#define p11_thread_id_self() \
diff --git a/common/library.c b/common/library.c
index 0bc7e0c..64b8baf 100644
--- a/common/library.c
+++ b/common/library.c
@@ -234,7 +234,7 @@ p11_library_init (void)
void
p11_library_thread_cleanup (void)
{
- p11_local *local = data;
+ p11_local *local;
if (thread_local != TLS_OUT_OF_INDEXES) {
p11_debug ("thread stopped, freeing tls");
local = TlsGetValue (thread_local);
@@ -253,10 +253,10 @@ p11_library_uninit (void)
if (thread_local != TLS_OUT_OF_INDEXES) {
data = TlsGetValue (thread_local);
- free_tls_value (data);
+ free (data);
TlsFree (thread_local);
}
- _p11_mutex_uninit (&p11_library_mutex);
+ p11_mutex_uninit (&p11_library_mutex);
}
#endif /* OS_WIN32 */
diff --git a/p11-kit/conf.c b/p11-kit/conf.c
index 778ea00..894566a 100644
--- a/p11-kit/conf.c
+++ b/p11-kit/conf.c
@@ -316,7 +316,7 @@ expand_user_path (const char *path)
char directory[MAX_PATH + 1];
if (!SHGetSpecialFolderPathA (NULL, directory, CSIDL_PROFILE, TRUE)) {
- _p11_message ("couldn't lookup home directory for user");
+ p11_message ("couldn't lookup home directory for user");
errno = ENOTDIR;
return NULL;
}
diff --git a/p11-kit/util.c b/p11-kit/util.c
index 95190c5..a7b3c25 100644
--- a/p11-kit/util.c
+++ b/p11-kit/util.c
@@ -260,13 +260,13 @@ p11_kit_fini (void)
#ifdef OS_WIN32
+BOOL WINAPI DllMain (HINSTANCE, DWORD, LPVOID);
+
BOOL WINAPI
DllMain (HINSTANCE instance,
DWORD reason,
LPVOID reserved)
{
- LPVOID data;
-
switch (reason) {
case DLL_PROCESS_ATTACH:
p11_library_init ();
diff --git a/trust/module.c b/trust/module.c
index 2583b2b..bf9c0db 100644
--- a/trust/module.c
+++ b/trust/module.c
@@ -34,6 +34,8 @@
#include "config.h"
+#define CRYPTOKI_EXPORTS
+
#include "attrs.h"
#define P11_DEBUG_FLAG P11_DEBUG_TRUST
#include "debug.h"
@@ -1545,13 +1547,13 @@ p11_trust_module_fini (void)
#ifdef OS_WIN32
+BOOL WINAPI DllMain (HINSTANCE, DWORD, LPVOID);
+
BOOL WINAPI
DllMain (HINSTANCE instance,
DWORD reason,
LPVOID reserved)
{
- LPVOID data;
-
switch (reason) {
case DLL_PROCESS_ATTACH:
p11_library_init ();
diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c
index 42eea41..577ae5a 100644
--- a/trust/tests/test-module.c
+++ b/trust/tests/test-module.c
@@ -39,6 +39,8 @@
#include <stdio.h>
#include <string.h>
+#define CRYPTOKI_EXPORTS
+
#include "attrs.h"
#include "checksum.h"
#include "debug.h"