Imported Upstream version 2.5.1
[ossec-hids.git] / src / headers / shared.h
index d3e019b..4165c5b 100755 (executable)
@@ -1,11 +1,11 @@
-/* @(#) $Id: shared.h,v 1.47 2009/09/17 18:47:23 dcid Exp $ */
+/* @(#) $Id$ */
 
 /* Copyright (C) 2009 Trend Micro Inc.
  * All rights reserved.
  *
  * This program is a free software; you can redistribute it
  * and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
  * Foundation
  */
 
@@ -132,7 +132,13 @@ typedef uint8_t u_int8_t;
 typedef int sock2len_t;
 #endif
 
-/* For Windows (so high maintenance :)) */
+
+#ifndef WIN32
+#define CloseSocket(x) close(x)
+#endif
+
+
+/* For Windows */
 #ifdef WIN32
 typedef int uid_t;
 typedef int gid_t;
@@ -141,6 +147,7 @@ typedef int socklen_t;
 #define srandom(x) srand(x)
 #define random(x) rand(x)
 #define lstat(x,y) stat(x,y)
+#define CloseSocket(x) closesocket(x)
 void WinSetError();
 typedef unsigned short int u_int16_t;
 typedef unsigned char u_int8_t;