mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Cleanup on randomization
tsan reported that rand() is not thread safe, so create a thread safe wrapper, use rand_r() if available. Consolidate the function, initialization and cleanup in dict.c and make sure it is initialized in xmlInitParser()
This commit is contained in:
7
libxml.h
7
libxml.h
@@ -79,6 +79,13 @@ void __xmlGlobalInitMutexLock(void);
|
||||
void __xmlGlobalInitMutexUnlock(void);
|
||||
void __xmlGlobalInitMutexDestroy(void);
|
||||
|
||||
#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
|
||||
/*
|
||||
* internal thread safe random function
|
||||
*/
|
||||
int __xmlRandom(void);
|
||||
#endif
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
#ifdef __GNUC__
|
||||
#ifdef PIC
|
||||
|
Reference in New Issue
Block a user