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:
parent
4228399da0
commit
fb0246084a
4 changed files with 26 additions and 2 deletions
10
mytypes.h
10
mytypes.h
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue