summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-21 08:49:57 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-21 08:52:29 +0100
commit11925eef789566a226d8eaacbceb4d89df787ebc (patch)
treed9012073fa76528fd205eed96cc016d566f7c89d /cpukit
parentsmpschedaffinity05: Change semaphore attributes. (diff)
downloadrtems-11925eef789566a226d8eaacbceb4d89df787ebc.tar.bz2
Delete or rename MIN/MAX macros and defines
Include <sys/param.h> if necessary to get the MIN()/MAX() macros.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/dosfs/fat.h5
-rw-r--r--cpukit/libfs/src/imfs/imfs_load_tar.c3
-rw-r--r--cpukit/libfs/src/pipe/fifo.c4
-rw-r--r--cpukit/libmisc/untar/untar.c4
-rw-r--r--cpukit/librpc/src/rpc/svc_udp.c2
-rw-r--r--cpukit/pppd/pppd.h9
6 files changed, 6 insertions, 21 deletions
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 <sys/param.h>
#include <string.h>
#include <rtems/seterr.h>
@@ -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 <sys/param.h>
#include <sys/stat.h>
#include <string.h>
#include <tar.h>
@@ -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 <sys/param.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -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 <sys/param.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -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 <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -54,7 +55,6 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_udp.c,v 1.13 2000/01/27 23:
#include <errno.h>
#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 <stdbool.h> /* bool */
#include <stdio.h> /* for FILE */
#include <limits.h> /* for NGROUPS_MAX */
-#include <sys/param.h> /* for MAXPATHLEN and BSD4_4, if defined */
+#include <sys/param.h>
#include <sys/types.h> /* for uint32_t, if defined */
#include <sys/time.h> /* for struct timeval */
#include <net/ppp_defs.h>
@@ -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__ */