From 11925eef789566a226d8eaacbceb4d89df787ebc Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 21 Nov 2014 08:49:57 +0100 Subject: Delete or rename MIN/MAX macros and defines Include if necessary to get the MIN()/MAX() macros. --- cpukit/libfs/src/dosfs/fat.h | 5 +---- cpukit/libfs/src/imfs/imfs_load_tar.c | 3 +-- cpukit/libfs/src/pipe/fifo.c | 4 +--- cpukit/libmisc/untar/untar.c | 4 +--- cpukit/librpc/src/rpc/svc_udp.c | 2 +- cpukit/pppd/pppd.h | 9 +-------- 6 files changed, 6 insertions(+), 21 deletions(-) (limited to 'cpukit') diff --git a/cpukit/libfs/src/dosfs/fat.h b/cpukit/libfs/src/dosfs/fat.h index 26f0699e78..6b866794e1 100644 --- a/cpukit/libfs/src/dosfs/fat.h +++ b/cpukit/libfs/src/dosfs/fat.h @@ -22,6 +22,7 @@ #ifndef __DOSFS_FAT_H__ #define __DOSFS_FAT_H__ +#include #include #include @@ -68,10 +69,6 @@ extern "C" { # define CT_LE_L(v) (v) #endif -#ifndef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - #define FAT_HASH_SIZE 2 #define FAT_HASH_MODULE FAT_HASH_SIZE diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index 0c4bb66a92..5b6f545f4c 100644 --- a/cpukit/libfs/src/imfs/imfs_load_tar.c +++ b/cpukit/libfs/src/imfs/imfs_load_tar.c @@ -20,6 +20,7 @@ #include "imfs.h" +#include #include #include #include @@ -28,8 +29,6 @@ #define MAX_NAME_FIELD_SIZE 99 -#define MIN(a,b) ((a)>(b)?(b):(a)) - int rtems_tarfs_load( const char *mountpoint, uint8_t *tar_image, diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c index 2c8eb991f0..203b65480a 100644 --- a/cpukit/libfs/src/pipe/fifo.c +++ b/cpukit/libfs/src/pipe/fifo.c @@ -18,6 +18,7 @@ #include "config.h" #endif +#include #include #include #include @@ -29,9 +30,6 @@ #include "pipe.h" - -#define MIN(a, b) ((a) < (b)? (a): (b)) - #define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE) #define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY) diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c index 31af31cde2..04a2d89deb 100644 --- a/cpukit/libmisc/untar/untar.c +++ b/cpukit/libmisc/untar/untar.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#include #include #include #include @@ -66,9 +67,6 @@ #define MAX_NAME_FIELD_SIZE 99 -#define MIN(a,b) ((a)>(b)?(b):(a)) - - /************************************************************************** * This converts octal ASCII number representations into an * unsigned long. Only support 32-bit numbers for now. diff --git a/cpukit/librpc/src/rpc/svc_udp.c b/cpukit/librpc/src/rpc/svc_udp.c index 8b7e1677f2..bb99f4a350 100644 --- a/cpukit/librpc/src/rpc/svc_udp.c +++ b/cpukit/librpc/src/rpc/svc_udp.c @@ -45,6 +45,7 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_udp.c,v 1.13 2000/01/27 23: #include "config.h" #endif +#include #include #include #include @@ -54,7 +55,6 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_udp.c,v 1.13 2000/01/27 23: #include #define rpc_buffer(xprt) ((xprt)->xp_p1) -#define MAX(a, b) ((a > b) ? a : b) static bool_t svcudp_recv(SVCXPRT *xprt, struct rpc_msg *msg); static bool_t svcudp_reply(SVCXPRT *xprt, struct rpc_msg *msg); diff --git a/cpukit/pppd/pppd.h b/cpukit/pppd/pppd.h index 8655f82783..98c49e8f20 100644 --- a/cpukit/pppd/pppd.h +++ b/cpukit/pppd/pppd.h @@ -25,7 +25,7 @@ #include /* bool */ #include /* for FILE */ #include /* for NGROUPS_MAX */ -#include /* for MAXPATHLEN and BSD4_4, if defined */ +#include #include /* for uint32_t, if defined */ #include /* for struct timeval */ #include @@ -653,11 +653,4 @@ extern void (*auth_linkdown_hook)(void); #endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */ #endif /* SIGTYPE */ -#ifndef MIN -#define MIN(a, b) ((a) < (b)? (a): (b)) -#endif -#ifndef MAX -#define MAX(a, b) ((a) > (b)? (a): (b)) -#endif - #endif /* __PPP_H__ */ -- cgit v1.2.3