Browse Source

Remove mingw guard for queue.h

Jose Cabral 6 years ago
parent
commit
7e9f1b8392

+ 2 - 32
arch/eCos/ua_architecture.h

@@ -10,6 +10,8 @@
 
 #define UA_THREAD_LOCAL
 
+#include <../deps/queue.h>  //TODO: in some compilers there's already a _SYS_QUEUE_H_ who is included first and doesn't have all functions
+
 #include <pkgconf/system.h>
 #include <cyg/kernel/kapi.h>
 #include <cyg/io/io.h>
@@ -85,36 +87,4 @@ int gethostname_ecos(char* name, size_t len);
 
 #include "../ua_architecture_functions.h"
 
-#undef SLIST_EMPTY
-#undef SLIST_FOREACH
-#undef SLIST_INIT
-#undef SLIST_REMOVE
-
-#undef LIST_EMPTY
-#undef LIST_FOREACH
-#undef LIST_INIT
-#undef LIST_REMOVE
-
-#undef TAILQ_EMPTY
-#undef TAILQ_FOREACH
-#undef TAILQ_INIT
-#undef TAILQ_REMOVE
-#undef TAILQ_FOREACH_REVERSE
-
-#undef CIRCLEQ_EMPTY
-#undef CIRCLEQ_FOREACH
-#undef CIRCLEQ_INIT
-#undef CIRCLEQ_FOREACH_REVERSE
-#undef CIRCLEQ_REMOVE
-#undef CIRCLEQ_INSERT_TAIL
-#undef CIRCLEQ_INSERT_HEAD
-#undef CIRCLEQ_INSERT_AFTER
-#undef CIRCLEQ_INSERT_BEFORE
-
-#undef _SYS_QUEUE_H_
-
-//#include "../deps/queue.h"  //in some compilers there's already a _SYS_QUEUE_H_ who is included first and doesn't have all functions
-
-
-
 #endif /* PLUGINS_ARCH_POSIX_UA_ARCHITECTURE_H_ */

+ 5 - 0
arch/win32/ua_architecture.h

@@ -153,6 +153,11 @@ void UA_sleep_ms(size_t ms);
 
 #include "../ua_architecture_functions.h"
 
+/* Fix redefinition of SLIST_ENTRY on mingw winnt.h */
+#ifdef SLIST_ENTRY
+# undef SLIST_ENTRY
+#endif
+
 #endif /* PLUGINS_ARCH_WIN32_UA_ARCHITECTURE_H_ */
 
 #endif /* UA_ARCHITECTURE_WIN32 */

+ 0 - 5
deps/queue.h

@@ -99,11 +99,6 @@ struct name {								\
 #define	SLIST_HEAD_INITIALIZER(head)					\
     { NULL }
 
-/* Fix redefinition of SLIST_ENTRY on mingw winnt.h */
-# ifdef SLIST_ENTRY
-#  undef SLIST_ENTRY
-# endif
-
 #define SLIST_ENTRY(type)						\
 struct {								\
     struct type *sle_next;	/* next element */			\

+ 1 - 1
src/client/ua_client_internal.h

@@ -16,8 +16,8 @@
 #include "ua_securechannel.h"
 #include "ua_client_highlevel.h"
 #include "ua_client_subscriptions.h"
-#include "../../deps/queue.h"
 #include "ua_timer.h"
+#include "../../deps/queue.h"
 
 /**************************/
 /* Subscriptions Handling */

+ 1 - 1
src/pubsub/ua_pubsub.h

@@ -12,11 +12,11 @@
 extern "C" {
 #endif
 
-#include "../deps/queue.h"
 #include "ua_plugin_pubsub.h"
 #include "ua_pubsub_networkmessage.h"
 #include "ua_server.h"
 #include "ua_server_pubsub.h"
+#include "../deps/queue.h"
 
 #ifdef UA_ENABLE_PUBSUB /* conditional compilation */
 

+ 1 - 1
src/server/ua_session.h

@@ -12,8 +12,8 @@
 extern "C" {
 #endif
 
-#include "../deps/queue.h"
 #include "ua_securechannel.h"
+#include "../deps/queue.h"
 
 #define UA_MAXCONTINUATIONPOINTS 5
 

+ 1 - 1
src/server/ua_session_manager.h

@@ -16,10 +16,10 @@
 extern "C" {
 #endif
 
-#include "../../deps/queue.h"
 #include "ua_server.h"
 #include "ua_util.h"
 #include "ua_session.h"
+#include "../../deps/queue.h"
 
 typedef struct session_list_entry {
     LIST_ENTRY(session_list_entry) pointers;

+ 1 - 1
src/ua_securechannel.h

@@ -15,12 +15,12 @@
 extern "C" {
 #endif
 
-#include "../deps/queue.h"
 #include "ua_types.h"
 #include "ua_transport_generated.h"
 #include "ua_connection_internal.h"
 #include "ua_plugin_securitypolicy.h"
 #include "ua_plugin_log.h"
+#include "../deps/queue.h"
 
 #define UA_SECURE_CONVERSATION_MESSAGE_HEADER_LENGTH 12
 #define UA_SECURE_MESSAGE_HEADER_LENGTH 24