1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

Fix compiler warnings in threads.c

Use '#pragma weak' to declare weak functions.
This commit is contained in:
Nick Wellnhofer
2017-06-17 15:05:34 +02:00
parent 629e47e7a2
commit 1f09aea26d

View File

@@ -50,43 +50,23 @@ static int libxml_is_threaded = -1;
#if defined(__GNUC__) && defined(__GLIBC__) #if defined(__GNUC__) && defined(__GLIBC__)
#ifdef linux #ifdef linux
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
extern int pthread_once (pthread_once_t *__once_control, #pragma weak pthread_once
void (*__init_routine) (void)) #pragma weak pthread_getspecific
__attribute((weak)); #pragma weak pthread_setspecific
extern void *pthread_getspecific (pthread_key_t __key) #pragma weak pthread_key_create
__attribute((weak)); #pragma weak pthread_key_delete
extern int pthread_setspecific (pthread_key_t __key, #pragma weak pthread_mutex_init
__const void *__pointer) #pragma weak pthread_mutex_destroy
__attribute((weak)); #pragma weak pthread_mutex_lock
extern int pthread_key_create (pthread_key_t *__key, #pragma weak pthread_mutex_unlock
void (*__destr_function) (void *)) #pragma weak pthread_cond_init
__attribute((weak)); #pragma weak pthread_cond_destroy
extern int pthread_key_delete (pthread_key_t __key) #pragma weak pthread_cond_wait
__attribute((weak)); #pragma weak pthread_equal
extern int pthread_mutex_init () #pragma weak pthread_self
__attribute((weak)); #pragma weak pthread_key_create
extern int pthread_mutex_destroy () #pragma weak pthread_key_delete
__attribute((weak)); #pragma weak pthread_cond_signal
extern int pthread_mutex_lock ()
__attribute((weak));
extern int pthread_mutex_unlock ()
__attribute((weak));
extern int pthread_cond_init ()
__attribute((weak));
extern int pthread_cond_destroy ()
__attribute((weak));
extern int pthread_cond_wait ()
__attribute((weak));
extern int pthread_equal ()
__attribute((weak));
extern pthread_t pthread_self ()
__attribute((weak));
extern int pthread_key_create ()
__attribute((weak));
extern int pthread_key_delete ()
__attribute((weak));
extern int pthread_cond_signal ()
__attribute((weak));
#endif #endif
#endif /* linux */ #endif /* linux */
#endif /* defined(__GNUC__) && defined(__GLIBC__) */ #endif /* defined(__GNUC__) && defined(__GLIBC__) */