diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
commit | 89376b7141edb6f927fb940c27391cda6e67c785 (patch) | |
tree | 57dd01fd9328b879289493ba848ae5c34c607b91 /bsd_eth_drivers/libbsdport/rtems_verscheck.h | |
download | libbsdport-89376b7141edb6f927fb940c27391cda6e67c785.tar.bz2 |
Initial import.initial
Diffstat (limited to 'bsd_eth_drivers/libbsdport/rtems_verscheck.h')
-rw-r--r-- | bsd_eth_drivers/libbsdport/rtems_verscheck.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bsd_eth_drivers/libbsdport/rtems_verscheck.h b/bsd_eth_drivers/libbsdport/rtems_verscheck.h new file mode 100644 index 0000000..519f817 --- /dev/null +++ b/bsd_eth_drivers/libbsdport/rtems_verscheck.h @@ -0,0 +1,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 |