1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-29 05:32:59 +00:00

Prevent multiple definition of bool,Min(),Max() (MacOS X)

This commit is contained in:
Gerhard Rieger 2014-11-16 21:53:36 +01:00
parent 4228399da0
commit fb0246084a
4 changed files with 26 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/* source: mytypes.h */
/* Copyright Gerhard Rieger 2001-2006 */
/* Copyright Gerhard Rieger */
/* Published under the GNU General Public License V.2, see file COPYING */
#ifndef __mytypes_h_included
@ -7,10 +7,18 @@
/* some types and macros I miss in C89 */
#ifndef HAVE_TYPE_BOOL
# undef bool
typedef enum { false, true } bool;
#endif
#ifndef Min
#define Min(x,y) ((x)<=(y)?(x):(y))
#endif
#ifndef Max
#define Max(x,y) ((x)>=(y)?(x):(y))
#endif
#define SOCKADDR_MAX UNIX_PATH_MAX