Jose Cabral 6 rokov pred
rodič
commit
a9df86bc2b

+ 3 - 1
arch/posix/ua_architecture.h

@@ -23,6 +23,8 @@
 # define _BSD_SOURCE
 #endif
 
+#include <../deps/queue.h>  //in some compilers there's already a _SYS_QUEUE_H_ who is included first and doesn't have all functions
+
 #include <errno.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
@@ -32,7 +34,7 @@
 #include <sys/types.h>
 #include <net/if.h>
 #ifndef UA_sleep_ms
-#define UA_sleep_ms(X) usleep(X * 1000)
+# define UA_sleep_ms(X) usleep(X * 1000)
 #else /* UA_sleep_ms */
 /* With this one can define its own UA_sleep_ms using a preprocessor define.
 E.g. see unit tests. */

+ 1 - 8
arch/win32/ua_architecture.h

@@ -66,23 +66,16 @@
 # define UA_access access
 #endif
 
-/*#ifdef POP_SLIST_ENTRY
-# undef SLIST_ENTRY
-# undef POP_SLIST_ENTRY
-# pragma pop_macro("SLIST_ENTRY")
-#endif*/
-
 #define ssize_t int
 #define OPTVAL_TYPE char
 #ifndef UA_sleep_ms
-#define UA_sleep_ms(X) Sleep(X)
+# define UA_sleep_ms(X) Sleep(X)
 #else /* UA_sleep_ms */
 /* With this one can define its own UA_sleep_ms using a preprocessor define.
 E.g. see unit tests. */
 void UA_sleep_ms(size_t ms);
 #endif
 
-
 // Windows does not support ansi colors
 // #define UA_ENABLE_LOG_COLORS
 

+ 1 - 2
src/ua_util.h

@@ -14,13 +14,12 @@
 #ifndef UA_UTIL_H_
 #define UA_UTIL_H_
 
-#include "ua_types.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /* BSD Queue Macros */
+#include "ua_types.h"
 #include "../deps/queue.h"
 
 /* Macro-Expand for MSVC workarounds */