|  | @@ -152,7 +152,11 @@ int clock_gettime(int clk_id, struct timespec* t) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  #if defined(_WIN32) && !defined(__SYMBIAN32__) /* Windows specific */
 | 
	
		
			
				|  |  |  #include <windows.h>
 | 
	
		
			
				|  |  | +<<<<<<< HEAD
 | 
	
		
			
				|  |  |  #include <winsock2.h>    /* DTL add for SO_EXCLUSIVE */
 | 
	
		
			
				|  |  | +=======
 | 
	
		
			
				|  |  | +#include <winsock2.h>    /* DTL add for SO_EXCLUSIVE */
 | 
	
		
			
				|  |  | +>>>>>>> 8bf5a3e... inline under Solaris
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  typedef const char * SOCK_OPT_TYPE;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -371,23 +375,23 @@ typedef unsigned short int in_port_t;
 | 
	
		
			
				|  |  |  typedef int SOCKET;
 | 
	
		
			
				|  |  |  #define WINCDECL
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -#if defined(__hpux)
 | 
	
		
			
				|  |  | -/* HPUX 11 does not have monotonic, fall back to realtime */
 | 
	
		
			
				|  |  | -#ifndef CLOCK_MONOTONIC
 | 
	
		
			
				|  |  | -#define CLOCK_MONOTONIC CLOCK_REALTIME
 | 
	
		
			
				|  |  | -#endif
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -/* HPUX defines socklen_t incorrectly as size_t which is 64bit on
 | 
	
		
			
				|  |  | - * Itanium.  Without defining _XOPEN_SOURCE or _XOPEN_SOURCE_EXTENDED
 | 
	
		
			
				|  |  | - * the prototypes use int* rather than socklen_t* which matches the
 | 
	
		
			
				|  |  | - * actual library expectation.  When called with the wrong size arg
 | 
	
		
			
				|  |  | - * accept() returns a zero client inet addr and check_acl() always
 | 
	
		
			
				|  |  | - * fails.  Since socklen_t is widely used below, just force replace
 | 
	
		
			
				|  |  | - * their typedef with int. - DTL
 | 
	
		
			
				|  |  | - */
 | 
	
		
			
				|  |  | -#define socklen_t int
 | 
	
		
			
				|  |  | -#endif /* hpux */
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +#if defined(__hpux)
 | 
	
		
			
				|  |  | +/* HPUX 11 does not have monotonic, fall back to realtime */
 | 
	
		
			
				|  |  | +#ifndef CLOCK_MONOTONIC
 | 
	
		
			
				|  |  | +#define CLOCK_MONOTONIC CLOCK_REALTIME
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* HPUX defines socklen_t incorrectly as size_t which is 64bit on
 | 
	
		
			
				|  |  | + * Itanium.  Without defining _XOPEN_SOURCE or _XOPEN_SOURCE_EXTENDED
 | 
	
		
			
				|  |  | + * the prototypes use int* rather than socklen_t* which matches the
 | 
	
		
			
				|  |  | + * actual library expectation.  When called with the wrong size arg
 | 
	
		
			
				|  |  | + * accept() returns a zero client inet addr and check_acl() always
 | 
	
		
			
				|  |  | + * fails.  Since socklen_t is widely used below, just force replace
 | 
	
		
			
				|  |  | + * their typedef with int. - DTL
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +#define socklen_t int
 | 
	
		
			
				|  |  | +#endif /* hpux */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  #endif /* End of Windows and UNIX specific includes */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* va_copy should always be a macro, C99 and C++11 - DTL */
 | 
	
	
		
			
				|  | @@ -578,17 +582,12 @@ static void * mg_realloc_ex(void * memory, size_t newsize, const char * file, un
 | 
	
		
			
				|  |  |  #define mg_free(a)        mg_free_ex(a, __FILE__, __LINE__)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  #else
 | 
	
		
			
				|  |  | -#ifdef __sun
 | 
	
		
			
				|  |  | -static inline void * mg_malloc(size_t a)             {return malloc(a);}
 | 
	
		
			
				|  |  | -static inline void * mg_calloc(size_t a, size_t b)   {return calloc(a, b);}
 | 
	
		
			
				|  |  | -static inline void * mg_realloc(void * a, size_t b)  {return realloc(a, b);}
 | 
	
		
			
				|  |  | -static inline void   mg_free(void * a)               {free(a); a = NULL;}
 | 
	
		
			
				|  |  | -#else
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  static __inline void * mg_malloc(size_t a)             {return malloc(a);}
 | 
	
		
			
				|  |  |  static __inline void * mg_calloc(size_t a, size_t b)   {return calloc(a, b);}
 | 
	
		
			
				|  |  |  static __inline void * mg_realloc(void * a, size_t b)  {return realloc(a, b);}
 | 
	
		
			
				|  |  | -static __inline void   mg_free(void * a)               {free(a); a = NULL;}
 | 
	
		
			
				|  |  | -#endif
 | 
	
		
			
				|  |  | +static __inline void   mg_free(void * a)               {free(a);}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  #endif
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* This following lines are just meant as a reminder to use the mg-functions for memory management */
 |