socat/mytypes.h

26 lines
497 B
C
Raw Permalink Normal View History

2008-01-28 21:37:16 +00:00
/* source: mytypes.h */
/* Copyright Gerhard Rieger */
2008-01-27 12:00:08 +00:00
/* Published under the GNU General Public License V.2, see file COPYING */
#ifndef __mytypes_h_included
#define __mytypes_h_included 1
/* some types and macros I miss in C89 */
#ifndef HAVE_TYPE_BOOL
# undef bool
2008-01-27 12:00:08 +00:00
typedef enum { false, true } bool;
#endif
2008-01-27 12:00:08 +00:00
#ifndef Min
2008-01-27 12:00:08 +00:00
#define Min(x,y) ((x)<=(y)?(x):(y))
#endif
#ifndef Max
2008-01-27 12:00:08 +00:00
#define Max(x,y) ((x)>=(y)?(x):(y))
#endif
2008-01-27 12:00:08 +00:00
#define SOCKADDR_MAX UNIX_PATH_MAX
#endif /* __mytypes_h_included */