1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
diff --git xbmc/screensavers/rsxs-0.9/lib/argp-fmtstream.h xbmc/screensavers/rsxs-0.9/lib/argp-fmtstream.h
index e045a72..ff4f575 100644
--- xbmc/screensavers/rsxs-0.9/lib/argp-fmtstream.h
+++ xbmc/screensavers/rsxs-0.9/lib/argp-fmtstream.h
@@ -198,8 +198,12 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#endif
#ifndef ARGP_FS_EI
+#ifdef __clang__
+#define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
+#else
#define ARGP_FS_EI extern inline
#endif
+#endif
ARGP_FS_EI size_t
__argp_fmtstream_write (argp_fmtstream_t __fs,
diff --git lib/cpluff/libcpluff/cpluff.c lib/cpluff/libcpluff/cpluff.c
index a7e8725..0f5bb90 100644
--- lib/cpluff/libcpluff/cpluff.c
+++ lib/cpluff/libcpluff/cpluff.c
@@ -77,6 +77,7 @@ CP_C_API const char *cp_get_host_type(void) {
return CP_HOST;
}
+#if defined(CP_THREADS) || !defined(NDEBUG)
CP_HIDDEN void cpi_lock_framework(void) {
#if defined(CP_THREADS)
cpi_lock_mutex(framework_mutex);
@@ -93,6 +94,7 @@ CP_HIDDEN void cpi_unlock_framework(void) {
framework_locked--;
#endif
}
+#endif
static void reset(void) {
#ifdef CP_THREADS
diff --git lib/cpluff/libcpluff/logging.c lib/cpluff/libcpluff/logging.c
index 928f0b4..f0f873d 100644
--- lib/cpluff/libcpluff/logging.c
+++ lib/cpluff/libcpluff/logging.c
@@ -129,10 +129,12 @@ CP_C_API cp_status_t cp_register_logger(cp_context_t *context, cp_logger_func_t
// Report error
if (status == CP_ERR_RESOURCE) {
cpi_error(context, N_("Logger could not be registered due to insufficient memory."));
+#if defined(CP_THREADS) || !defined(NDEBUG)
} else if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: %s is the context owner */
cpi_debugf(context, N_("%s registered a logger."), cpi_context_owner(context, owner, sizeof(owner)));
+#endif
}
cpi_unlock_context(context);
@@ -166,11 +168,13 @@ CP_C_API void cp_unregister_logger(cp_context_t *context, cp_logger_func_t logge
free(lh);
update_logging_limits(context);
}
+#if defined(CP_THREADS) || !defined(NDEBUG)
if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: %s is the context owner */
cpi_debugf(context, N_("%s unregistered a logger."), cpi_context_owner(context, owner, sizeof(owner)));
}
+#endif
cpi_unlock_context(context);
}
diff --git lib/cpluff/libcpluff/pinfo.c lib/cpluff/libcpluff/pinfo.c
index cfbf049..f7b4a4b 100644
--- lib/cpluff/libcpluff/pinfo.c
+++ lib/cpluff/libcpluff/pinfo.c
@@ -569,10 +569,12 @@ CP_C_API cp_status_t cp_register_plistener(cp_context_t *context, cp_plugin_list
// Report error or success
if (status != CP_OK) {
cpi_error(context, _("A plug-in listener could not be registered due to insufficient memory."));
+#if defined(CP_THREADS) || !defined(NDEBUG)
} else if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: %s is the context owner */
cpi_debugf(context, N_("%s registered a plug-in listener."), cpi_context_owner(context, owner, sizeof(owner)));
+#endif
}
cpi_unlock_context(context);
@@ -591,10 +593,12 @@ CP_C_API void cp_unregister_plistener(cp_context_t *context, cp_plugin_listener_
if (node != NULL) {
process_unregister_plistener(context->env->plugin_listeners, node, NULL);
}
+#if defined(CP_THREADS) || !defined(NDEBUG)
if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: %s is the context owner */
cpi_debugf(context, N_("%s unregistered a plug-in listener."), cpi_context_owner(context, owner, sizeof(owner)));
}
+#endif
cpi_unlock_context(context);
}
diff --git lib/cpluff/libcpluff/psymbol.c lib/cpluff/libcpluff/psymbol.c
index 632b087..fdc15af 100644
--- lib/cpluff/libcpluff/psymbol.c
+++ lib/cpluff/libcpluff/psymbol.c
@@ -248,11 +248,13 @@ CP_C_API void * cp_resolve_symbol(cp_context_t *context, const char *id, const c
symbol_info->usage_count++;
provider_info->usage_count++;
+#if defined(CP_THREADS) || !defined(NDEBUG)
if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: First %s is the context owner */
cpi_debugf(context, "%s resolved symbol %s defined by plug-in %s.", cpi_context_owner(context, owner, sizeof(owner)), name, id);
}
+#endif
} while (0);
// Clean up
@@ -314,11 +316,13 @@ CP_C_API void cp_release_symbol(cp_context_t *context, const void *ptr) {
if (symbol_info->usage_count == 0) {
hash_delete_free(context->resolved_symbols, node);
free(symbol_info);
+#if defined(CP_THREADS) || !defined(NDEBUG)
if (cpi_is_logged(context, CP_LOG_DEBUG)) {
char owner[64];
/* TRANSLATORS: First %s is the context owner */
cpi_debugf(context, _("%s released the symbol at address %p defined by plug-in %s."), cpi_context_owner(context, owner, sizeof(owner)), ptr, provider_info->plugin->plugin->identifier);
}
+#endif
}
// Check if the symbol providing plug-in is not being used anymore
|