summaryrefslogtreecommitdiff
path: root/p11-kit/debug.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-10-24 08:05:43 +0200
committerStef Walter <stefw@collabora.co.uk>2011-10-24 08:05:43 +0200
commit5507dc4946f0a68cece5ec9e7096e0f9b8c55984 (patch)
treed3921c57fabb04aceedf052d051ffa77f22f4b1e /p11-kit/debug.c
parentdb92b76e3acb11e330309ebce071ec2e61400a71 (diff)
Rename non-static functions to have a _p11_xxx prefix.
* Work around issues with brain-dead linkers not respecting the libtool -export-symbol-regex argument https://bugs.freedesktop.org/show_bug.cgi?id=42020
Diffstat (limited to 'p11-kit/debug.c')
-rw-r--r--p11-kit/debug.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/p11-kit/debug.c b/p11-kit/debug.c
index 5766dae..b332407 100644
--- a/p11-kit/debug.c
+++ b/p11-kit/debug.c
@@ -63,7 +63,7 @@ static int debug_inited = 0;
static mutex_t debug_mutex;
/* global variable exported in debug.h */
-int debug_current_flags;
+int _p11_debug_current_flags = ~0;
static int
parse_environ_flags (void)
@@ -111,23 +111,24 @@ parse_environ_flags (void)
}
void
-debug_init (void)
+_p11_debug_init (void)
{
- debug_current_flags = parse_environ_flags ();
- mutex_init (&debug_mutex);
+ _p11_debug_current_flags = parse_environ_flags ();
+ _p11_mutex_init (&debug_mutex);
debug_inited = 1;
}
void
-debug_message (int flag, const char *format, ...)
+_p11_debug_message (int flag,
+ const char *format, ...)
{
char buffer[512];
va_list args;
assert (debug_inited);
- mutex_lock (&debug_mutex);
+ _p11_mutex_lock (&debug_mutex);
- if (flag & debug_current_flags) {
+ if (flag & _p11_debug_current_flags) {
va_start (args, format);
vsnprintf (buffer, sizeof (buffer), format, args);
buffer[sizeof (buffer) -1] = 0;
@@ -135,5 +136,5 @@ debug_message (int flag, const char *format, ...)
fprintf (stderr, "(p11-kit:%d) %s\n", getpid(), buffer);
}
- mutex_unlock (&debug_mutex);
+ _p11_mutex_unlock (&debug_mutex);
}