Prechádzať zdrojové kódy

Get rid of some arch-dependant in examples and tests

Jose Cabral 5 rokov pred
rodič
commit
fba3aa57a0

+ 0 - 8
examples/client_async.c

@@ -16,14 +16,6 @@
 #include <stdio.h>
 #include "open62541.h"
 
-#ifdef _WIN32
-# include <windows.h>
-# define UA_sleep_ms(X) Sleep(X)
-#else
-# include <unistd.h>
-# define UA_sleep_ms(X) usleep(X * 1000)
-#endif
-
 #define NODES_EXIST
 /* async connection callback, it only gets called after the completion of the whole
  * connection process*/

+ 0 - 21
examples/client_connectivitycheck_loop.c

@@ -1,30 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-/* Enable POSIX features */
-#if !defined(_XOPEN_SOURCE) && !defined(_WRS_KERNEL)
-# define _XOPEN_SOURCE 600
-#endif
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE
-#endif
-/* On older systems we need to define _BSD_SOURCE.
- * _DEFAULT_SOURCE is an alias for that. */
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
 #include "open62541.h"
 #include <signal.h>
 
-#ifdef _WIN32
-# include <windows.h>
-# define UA_sleep_ms(X) Sleep(X)
-#else
-# include <unistd.h>
-# define UA_sleep_ms(X) usleep(X * 1000)
-#endif
-
 UA_Boolean running = true;
 UA_Logger logger = UA_Log_Stdout;
 

+ 0 - 4
tests/client/check_client_async_connect.c

@@ -5,10 +5,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
 #include "ua_types.h"
 #include "ua_server.h"
 #include "ua_client.h"