forked from Imagelibrary/rtems
Delete or rename MIN/MAX macros and defines
Include <sys/param.h> if necessary to get the MIN()/MAX() macros.
This commit is contained in:
@@ -75,6 +75,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <rtems/error.h>
|
#include <rtems/error.h>
|
||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
@@ -88,9 +89,6 @@
|
|||||||
#include <libchip/ide_ctrl_io.h>
|
#include <libchip/ide_ctrl_io.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
|
||||||
#endif
|
|
||||||
#define IDE_DMA_TEST FALSE
|
#define IDE_DMA_TEST FALSE
|
||||||
|
|
||||||
/* DMA supported PIO mode is broken */
|
/* DMA supported PIO mode is broken */
|
||||||
|
|||||||
@@ -900,8 +900,6 @@ static int txq_high_limit(struct GTeth_softc *sc)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
|
|
||||||
static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
|
static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
|
||||||
{
|
{
|
||||||
volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_lo];
|
volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_lo];
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#ifndef __ATA_INTERNAL_H__
|
#ifndef __ATA_INTERNAL_H__
|
||||||
#define __ATA_INTERNAL_H__
|
#define __ATA_INTERNAL_H__
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
@@ -45,7 +46,6 @@ extern "C" {
|
|||||||
# define CT_LE_L(v) (v)
|
# define CT_LE_L(v) (v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#define ATA_UNDEFINED_VALUE (-1)
|
#define ATA_UNDEFINED_VALUE (-1)
|
||||||
|
|
||||||
/* Sector size for all ATA devices */
|
/* Sector size for all ATA devices */
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#ifndef __DOSFS_FAT_H__
|
#ifndef __DOSFS_FAT_H__
|
||||||
#define __DOSFS_FAT_H__
|
#define __DOSFS_FAT_H__
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <rtems/seterr.h>
|
#include <rtems/seterr.h>
|
||||||
@@ -68,10 +69,6 @@ extern "C" {
|
|||||||
# define CT_LE_L(v) (v)
|
# define CT_LE_L(v) (v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FAT_HASH_SIZE 2
|
#define FAT_HASH_SIZE 2
|
||||||
#define FAT_HASH_MODULE FAT_HASH_SIZE
|
#define FAT_HASH_MODULE FAT_HASH_SIZE
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tar.h>
|
#include <tar.h>
|
||||||
@@ -28,8 +29,6 @@
|
|||||||
|
|
||||||
#define MAX_NAME_FIELD_SIZE 99
|
#define MAX_NAME_FIELD_SIZE 99
|
||||||
|
|
||||||
#define MIN(a,b) ((a)>(b)?(b):(a))
|
|
||||||
|
|
||||||
int rtems_tarfs_load(
|
int rtems_tarfs_load(
|
||||||
const char *mountpoint,
|
const char *mountpoint,
|
||||||
uint8_t *tar_image,
|
uint8_t *tar_image,
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -29,9 +30,6 @@
|
|||||||
|
|
||||||
#include "pipe.h"
|
#include "pipe.h"
|
||||||
|
|
||||||
|
|
||||||
#define MIN(a, b) ((a) < (b)? (a): (b))
|
|
||||||
|
|
||||||
#define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE)
|
#define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE)
|
||||||
#define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY)
|
#define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY)
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -66,9 +67,6 @@
|
|||||||
|
|
||||||
#define MAX_NAME_FIELD_SIZE 99
|
#define MAX_NAME_FIELD_SIZE 99
|
||||||
|
|
||||||
#define MIN(a,b) ((a)>(b)?(b):(a))
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* This converts octal ASCII number representations into an
|
* This converts octal ASCII number representations into an
|
||||||
* unsigned long. Only support 32-bit numbers for now.
|
* unsigned long. Only support 32-bit numbers for now.
|
||||||
|
|||||||
@@ -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"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.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>
|
#include <errno.h>
|
||||||
|
|
||||||
#define rpc_buffer(xprt) ((xprt)->xp_p1)
|
#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_recv(SVCXPRT *xprt, struct rpc_msg *msg);
|
||||||
static bool_t svcudp_reply(SVCXPRT *xprt, struct rpc_msg *msg);
|
static bool_t svcudp_reply(SVCXPRT *xprt, struct rpc_msg *msg);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <stdbool.h> /* bool */
|
#include <stdbool.h> /* bool */
|
||||||
#include <stdio.h> /* for FILE */
|
#include <stdio.h> /* for FILE */
|
||||||
#include <limits.h> /* for NGROUPS_MAX */
|
#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/types.h> /* for uint32_t, if defined */
|
||||||
#include <sys/time.h> /* for struct timeval */
|
#include <sys/time.h> /* for struct timeval */
|
||||||
#include <net/ppp_defs.h>
|
#include <net/ppp_defs.h>
|
||||||
@@ -653,11 +653,4 @@ extern void (*auth_linkdown_hook)(void);
|
|||||||
#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */
|
#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */
|
||||||
#endif /* SIGTYPE */
|
#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__ */
|
#endif /* __PPP_H__ */
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ struct aiocb *create_aiocb(int fd);
|
|||||||
void free_aiocb(struct aiocb *aiocbp);
|
void free_aiocb(struct aiocb *aiocbp);
|
||||||
|
|
||||||
#define BUFSIZE 32
|
#define BUFSIZE 32
|
||||||
#define MAX 10
|
#define FD_COUNT 10
|
||||||
#define WRONG_FD 666
|
#define WRONG_FD 666
|
||||||
|
|
||||||
struct aiocb *
|
struct aiocb *
|
||||||
@@ -59,8 +59,8 @@ free_aiocb (struct aiocb *aiocbp)
|
|||||||
void *
|
void *
|
||||||
POSIX_Init (void *argument)
|
POSIX_Init (void *argument)
|
||||||
{
|
{
|
||||||
int fd[MAX];
|
int fd[FD_COUNT];
|
||||||
struct aiocb *aiocbp[MAX+1];
|
struct aiocb *aiocbp[FD_COUNT+1];
|
||||||
int status, i, policy = SCHED_FIFO;
|
int status, i, policy = SCHED_FIFO;
|
||||||
char filename[BUFSIZE];
|
char filename[BUFSIZE];
|
||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
@@ -79,7 +79,7 @@ POSIX_Init (void *argument)
|
|||||||
|
|
||||||
puts ("Init: Open files");
|
puts ("Init: Open files");
|
||||||
|
|
||||||
for (i=0; i<MAX; i++)
|
for (i=0; i<FD_COUNT; i++)
|
||||||
{
|
{
|
||||||
sprintf (filename, "/tmp/aio_fildes%d",i);
|
sprintf (filename, "/tmp/aio_fildes%d",i);
|
||||||
fd[i] = open (filename, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
|
fd[i] = open (filename, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
|
||||||
@@ -175,7 +175,7 @@ POSIX_Init (void *argument)
|
|||||||
|
|
||||||
TEST_END();
|
TEST_END();
|
||||||
|
|
||||||
for (i = 0; i < MAX; i++)
|
for (i = 0; i < FD_COUNT; i++)
|
||||||
{
|
{
|
||||||
close (fd[i]);
|
close (fd[i]);
|
||||||
free_aiocb (aiocbp[i]);
|
free_aiocb (aiocbp[i]);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const char rtems_test_name[] = "PSXAIO 3";
|
|||||||
struct aiocb *create_aiocb(int fd);
|
struct aiocb *create_aiocb(int fd);
|
||||||
void free_aiocb(struct aiocb *aiocbp);
|
void free_aiocb(struct aiocb *aiocbp);
|
||||||
|
|
||||||
#define MAX 6
|
#define FD_COUNT 6
|
||||||
#define BUFSIZE 128
|
#define BUFSIZE 128
|
||||||
|
|
||||||
struct aiocb *
|
struct aiocb *
|
||||||
@@ -60,8 +60,8 @@ free_aiocb (struct aiocb *aiocbp)
|
|||||||
void *
|
void *
|
||||||
POSIX_Init (void *argument)
|
POSIX_Init (void *argument)
|
||||||
{
|
{
|
||||||
int fd[MAX];
|
int fd[FD_COUNT];
|
||||||
struct aiocb *aiocbp[MAX+1];
|
struct aiocb *aiocbp[FD_COUNT+1];
|
||||||
int status, i, policy = SCHED_FIFO;
|
int status, i, policy = SCHED_FIFO;
|
||||||
char filename[BUFSIZE];
|
char filename[BUFSIZE];
|
||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
@@ -80,7 +80,7 @@ POSIX_Init (void *argument)
|
|||||||
|
|
||||||
puts (" Init: Open files ");
|
puts (" Init: Open files ");
|
||||||
|
|
||||||
for (i=0; i<MAX; i++)
|
for (i=0; i<FD_COUNT; i++)
|
||||||
{
|
{
|
||||||
sprintf (filename, "/tmp/aio_fildes%d",i);
|
sprintf (filename, "/tmp/aio_fildes%d",i);
|
||||||
fd[i] = open (filename, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
|
fd[i] = open (filename, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
|
||||||
@@ -131,7 +131,7 @@ POSIX_Init (void *argument)
|
|||||||
|
|
||||||
TEST_END();
|
TEST_END();
|
||||||
|
|
||||||
for (i = 0; i < MAX; i++)
|
for (i = 0; i < FD_COUNT; i++)
|
||||||
{
|
{
|
||||||
close (fd[i]);
|
close (fd[i]);
|
||||||
free_aiocb (aiocbp[i]);
|
free_aiocb (aiocbp[i]);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
#include <sys/param.h>
|
||||||
#include <crypt.h>
|
#include <crypt.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -214,10 +215,6 @@ fstab_t fs_table[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a,b) (((a) > (b)) ? (b) : (a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define USE_SHELL
|
#define USE_SHELL
|
||||||
|
|
||||||
#ifdef USE_SHELL
|
#ifdef USE_SHELL
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const char rtems_test_name[] = "SP 48";
|
|||||||
|
|
||||||
rtems_task Init(rtems_task_argument ignored);
|
rtems_task Init(rtems_task_argument ignored);
|
||||||
|
|
||||||
#define MAX 5000
|
#define SEMA_COUNT 5000
|
||||||
rtems_id Semaphores[MAX];
|
rtems_id Semaphores[SEMA_COUNT];
|
||||||
|
|
||||||
rtems_task Init(rtems_task_argument ignored)
|
rtems_task Init(rtems_task_argument ignored)
|
||||||
{
|
{
|
||||||
@@ -35,7 +35,7 @@ rtems_task Init(rtems_task_argument ignored)
|
|||||||
"Largest C program heap block available: %zu\n",
|
"Largest C program heap block available: %zu\n",
|
||||||
malloc_free_space()
|
malloc_free_space()
|
||||||
);
|
);
|
||||||
for (i=0 ; i<MAX ; i++ ) {
|
for (i=0 ; i<SEMA_COUNT ; i++ ) {
|
||||||
sc = rtems_semaphore_create(
|
sc = rtems_semaphore_create(
|
||||||
rtems_build_name('s', 'e', 'm', ' '),
|
rtems_build_name('s', 'e', 'm', ' '),
|
||||||
1,
|
1,
|
||||||
@@ -57,7 +57,7 @@ rtems_task Init(rtems_task_argument ignored)
|
|||||||
}
|
}
|
||||||
|
|
||||||
created = i;
|
created = i;
|
||||||
if ( created == MAX )
|
if ( created == SEMA_COUNT )
|
||||||
puts( "Created all semaphores allowed in this test" );
|
puts( "Created all semaphores allowed in this test" );
|
||||||
|
|
||||||
printf( "%d semaphores created\n", i );
|
printf( "%d semaphores created\n", i );
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ void test_case_one(void);
|
|||||||
void test_case_two(void);
|
void test_case_two(void);
|
||||||
void test_case_three(void);
|
void test_case_three(void);
|
||||||
|
|
||||||
#define MAX 256
|
uint32_t Memory[256];
|
||||||
uint32_t Memory[MAX];
|
|
||||||
Heap_Control Heap;
|
Heap_Control Heap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user