@@ -1,6 +1,10 @@
#ifndef UA_CONFIG_H_
#define UA_CONFIG_H_
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 500
+#endif
+
#define UA_LOGLEVEL ${UA_LOGLEVEL}
#cmakedefine UA_MULTITHREADING
@@ -5,22 +5,6 @@
# include "ua_config.h"
#endif
-#ifndef __USE_POSIX
-# define __USE_POSIX
-#endif
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 199309L
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE
-
/*********************/
/* Memory Management */
@@ -66,11 +50,10 @@
#define UA_memset(ptr, value, size) memset(ptr, value, size)
#ifndef NO_ALLOCA
-# ifdef _WIN32
-# define UA_alloca(SIZE) _alloca(SIZE)
-# endif
# ifdef __GNUC__
# define UA_alloca(size) __builtin_alloca (size)
+# elif defined(_WIN32)
+# define UA_alloca(SIZE) _alloca(SIZE)
# else
# include <alloca.h>
# define UA_alloca(SIZE) alloca(SIZE)