Changeset 11925eef in rtems


Ignore:
Timestamp:
Nov 21, 2014, 7:49:57 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
5dff7425
Parents:
db44590c
git-author:
Sebastian Huber <sebastian.huber@…> (11/21/14 07:49:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/14 07:52:29)
Message:

Delete or rename MIN/MAX macros and defines

Include <sys/param.h> if necessary to get the MIN()/MAX() macros.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c

    rdb44590c r11925eef  
    7676/***********************************************************************/
    7777
     78#include <sys/param.h>
    7879#include <rtems.h>
    7980#include <rtems/error.h>
     
    8990#include <string.h>
    9091
    91 #ifndef MIN
    92 #define MIN(a,b) (((a)<(b))?(a):(b))
    93 #endif
    9492#define IDE_DMA_TEST            FALSE
    9593
  • c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c

    rdb44590c r11925eef  
    901901#endif
    902902
    903 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
    904 
    905903static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
    906904{
  • c/src/libchip/ide/ata_internal.h

    rdb44590c r11925eef  
    1616#define __ATA_INTERNAL_H__
    1717
     18#include <sys/param.h>
    1819#include <rtems.h>
    1920#include <sys/types.h>
     
    4647#endif
    4748
    48 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
    4949#define ATA_UNDEFINED_VALUE   (-1)
    5050
  • cpukit/libfs/src/dosfs/fat.h

    rdb44590c r11925eef  
    2323#define __DOSFS_FAT_H__
    2424
     25#include <sys/param.h>
    2526#include <string.h>
    2627
     
    6768#    define CT_LE_W(v) (v)
    6869#    define CT_LE_L(v) (v)
    69 #endif
    70 
    71 #ifndef MIN
    72 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
    7370#endif
    7471
  • cpukit/libfs/src/imfs/imfs_load_tar.c

    rdb44590c r11925eef  
    2121#include "imfs.h"
    2222
     23#include <sys/param.h>
    2324#include <sys/stat.h>
    2425#include <string.h>
     
    2829
    2930#define MAX_NAME_FIELD_SIZE      99
    30 
    31 #define MIN(a,b)   ((a)>(b)?(b):(a))
    3231
    3332int rtems_tarfs_load(
  • cpukit/libfs/src/pipe/fifo.c

    rdb44590c r11925eef  
    1919#endif
    2020
     21#include <sys/param.h>
    2122#include <errno.h>
    2223#include <stdlib.h>
     
    2930
    3031#include "pipe.h"
    31 
    32 
    33 #define MIN(a, b) ((a) < (b)? (a): (b))
    3432
    3533#define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE)
  • cpukit/libmisc/untar/untar.c

    rdb44590c r11925eef  
    2424#endif
    2525
     26#include <sys/param.h>
    2627#include <stdio.h>
    2728#include <string.h>
     
    6667
    6768#define MAX_NAME_FIELD_SIZE      99
    68 
    69 #define MIN(a,b)   ((a)>(b)?(b):(a))
    70 
    7169
    7270/**************************************************************************
  • cpukit/librpc/src/rpc/svc_udp.c

    rdb44590c r11925eef  
    4646#endif
    4747
     48#include <sys/param.h>
    4849#include <stdio.h>
    4950#include <stdlib.h>
     
    5556
    5657#define rpc_buffer(xprt) ((xprt)->xp_p1)
    57 #define MAX(a, b)     ((a > b) ? a : b)
    5858
    5959static bool_t           svcudp_recv(SVCXPRT *xprt, struct rpc_msg *msg);
  • cpukit/pppd/pppd.h

    rdb44590c r11925eef  
    2626#include <stdio.h>              /* for FILE */
    2727#include <limits.h>             /* for NGROUPS_MAX */
    28 #include <sys/param.h>          /* for MAXPATHLEN and BSD4_4, if defined */
     28#include <sys/param.h>
    2929#include <sys/types.h>          /* for uint32_t, if defined */
    3030#include <sys/time.h>           /* for struct timeval */
     
    654654#endif /* SIGTYPE */
    655655
    656 #ifndef MIN
    657 #define MIN(a, b)       ((a) < (b)? (a): (b))
    658 #endif
    659 #ifndef MAX
    660 #define MAX(a, b)       ((a) > (b)? (a): (b))
    661 #endif
    662 
    663656#endif /* __PPP_H__ */
  • testsuites/psxtests/psxaio02/init.c

    rdb44590c r11925eef  
    3131
    3232#define BUFSIZE 32
    33 #define MAX 10
     33#define FD_COUNT 10
    3434#define WRONG_FD 666
    3535
     
    6060POSIX_Init (void *argument)
    6161{
    62   int fd[MAX];
    63   struct aiocb *aiocbp[MAX+1];
     62  int fd[FD_COUNT];
     63  struct aiocb *aiocbp[FD_COUNT+1];
    6464  int status, i, policy = SCHED_FIFO;
    6565  char filename[BUFSIZE];
     
    8080  puts ("Init: Open files");
    8181
    82   for (i=0; i<MAX; i++)
     82  for (i=0; i<FD_COUNT; i++)
    8383    {
    8484      sprintf (filename, "/tmp/aio_fildes%d",i);
     
    176176  TEST_END();
    177177
    178   for (i = 0; i < MAX; i++)
     178  for (i = 0; i < FD_COUNT; i++)
    179179    {
    180180      close (fd[i]);
  • testsuites/psxtests/psxaio03/init.c

    rdb44590c r11925eef  
    3131void free_aiocb(struct aiocb *aiocbp);
    3232
    33 #define MAX 6
     33#define FD_COUNT 6
    3434#define BUFSIZE 128
    3535
     
    6161POSIX_Init (void *argument)
    6262{
    63   int fd[MAX];
    64   struct aiocb *aiocbp[MAX+1];
     63  int fd[FD_COUNT];
     64  struct aiocb *aiocbp[FD_COUNT+1];
    6565  int status, i, policy = SCHED_FIFO;
    6666  char filename[BUFSIZE];
     
    8181  puts (" Init: Open files ");
    8282
    83   for (i=0; i<MAX; i++)
     83  for (i=0; i<FD_COUNT; i++)
    8484    {
    8585      sprintf (filename, "/tmp/aio_fildes%d",i);
     
    132132  TEST_END();
    133133 
    134   for (i = 0; i < MAX; i++)
     134  for (i = 0; i < FD_COUNT; i++)
    135135    {
    136136      close (fd[i]);
  • testsuites/samples/fileio/init.c

    rdb44590c r11925eef  
    1414#define CONFIGURE_INIT
    1515#include "system.h"
     16#include <sys/param.h>
    1617#include <crypt.h>
    1718#include <stdio.h>
     
    214215  }
    215216};
    216 
    217 #ifndef MIN
    218 #define MIN(a,b) (((a) > (b)) ? (b) : (a))
    219 #endif
    220217
    221218#define USE_SHELL
  • testsuites/sptests/sp48/init.c

    rdb44590c r11925eef  
    2121rtems_task Init(rtems_task_argument ignored);
    2222
    23 #define MAX 5000
    24 rtems_id Semaphores[MAX];
     23#define SEMA_COUNT 5000
     24rtems_id Semaphores[SEMA_COUNT];
    2525
    2626rtems_task Init(rtems_task_argument ignored)
     
    3636    malloc_free_space()
    3737  );
    38   for (i=0 ; i<MAX ; i++ ) {
     38  for (i=0 ; i<SEMA_COUNT ; i++ ) {
    3939    sc = rtems_semaphore_create(
    4040      rtems_build_name('s', 'e', 'm', ' '),
     
    5858
    5959  created = i;
    60   if ( created == MAX )
     60  if ( created == SEMA_COUNT )
    6161    puts( "Created all semaphores allowed in this test" );
    6262
  • testsuites/sptests/sp63/init.c

    rdb44590c r11925eef  
    2424void test_case_three(void);
    2525
    26 #define MAX 256
    27 uint32_t      Memory[MAX];
     26uint32_t      Memory[256];
    2827Heap_Control  Heap;
    2928
Note: See TracChangeset for help on using the changeset viewer.