novi upstream verzije 2.8.3
[ossec-hids.git] / src / headers / shared.h
index fe2827c..87fda42 100755 (executable)
 #include <sys/socket.h>
 #include <sys/un.h>
 #else
+#include <winsock2.h>
 #include <windows.h>
-#include <winsock.h>
 #include <io.h>
-#include <winsock2.h>
 #include <ws2tcpip.h>
+#include <shlwapi.h>
 #endif
 
 #include <time.h>
@@ -178,15 +178,15 @@ char *__local_name;
 /*** These functions will exit on error. No need to check return code ***/
 
 /* for calloc: x = calloc(4,sizeof(char)) -> os_calloc(4,sizeof(char),x) */
-#define os_calloc(x,y,z) (z = calloc(x,y))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
+#define os_calloc(x,y,z) ((z = calloc(x,y)))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
 
-#define os_strdup(x,y) (y = strdup(x))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
+#define os_strdup(x,y) ((y = strdup(x)))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
 
-#define os_malloc(x,y) (y = malloc(x))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
+#define os_malloc(x,y) ((y = malloc(x)))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
 
 #define os_free(x) (x)?free(x):merror("free a null")
 
-#define os_realloc(x,y,z) (z = realloc(x,y))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
+#define os_realloc(x,y,z) ((z = realloc(x,y)))?(void)1:ErrorExit(MEM_ERROR, ARGV0)
 
 #define os_clearnl(x,p) if((p = strrchr(x, '\n')))*p = '\0';
 
@@ -225,8 +225,9 @@ char *__local_name;
 #include "os_regex/os_regex.h"
 
 #include "error_messages/error_messages.h"
+#include "custom_output_search.h"
 
 
 #endif /* __SHARED_H */
-                       
+
 /* EOF */