summaryrefslogtreecommitdiffstats
path: root/bsd_eth_drivers/libbsdport/rtems_verscheck.h
blob: 519f8174b1ec34e4e0ff32952e3af41d086b817c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef RTEMS_VERSION_CHECKER_H
#define RTEMS_VERSION_CHECKER_H
/* $Id$ Macros to check rtems version dependent API features :-( */

#include <rtems.h>

#define RTEMS_REV_LATER_THAN(ma,mi,re) \
	(    __RTEMS_MAJOR__  > (ma)	\
	 || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__  > (mi))	\
	 || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ == (mi) && __RTEMS_REVISION__ > (re)) \
    )

#define RTEMS_REV_AT_LEAST(ma,mi,re) \
	(    __RTEMS_MAJOR__  > (ma)	\
	 || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__  > (mi))	\
	 || (__RTEMS_MAJOR__ == (ma) && __RTEMS_MINOR__ == (mi) && __RTEMS_REVISION__ >= (re)) \
    )

/*
 * unfortunately, (powerpc) libcpu/io.h didn't follow the change from 
 * unsigned -> uin32_t :--(
 */
#if RTEMS_REV_AT_LEAST(4,8,0)
typedef uint32_t libbsdport_u32_t;
#else
typedef unsigned libbsdport_u32_t;
#endif

#endif