diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-13 04:39:47 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-13 04:39:47 +0000 |
commit | 3d3e22c643e59a01ab000cb44f7a6574c506633f (patch) | |
tree | 7c9e1eeb76b7aa3fb9c00abf06162e155540c646 /cpukit/libmisc | |
parent | 2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-3d3e22c643e59a01ab000cb44f7a6574c506633f.tar.bz2 |
2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/fts.c (fts_pow2): Rebase fts_pow2 on
SIZEOF_SIZE_T * CHAR_BIT.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r-- | cpukit/libmisc/shell/fts.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/libmisc/shell/fts.c b/cpukit/libmisc/shell/fts.c index 2eeed2558e..e960a0ab19 100644 --- a/cpukit/libmisc/shell/fts.c +++ b/cpukit/libmisc/shell/fts.c @@ -49,6 +49,7 @@ __RCSID("$NetBSD: fts.c,v 1.40 2009/11/02 17:17:34 stacktic Exp $"); #ifndef __rtems__ #include "namespace.h" #endif +#include <limits.h> #include <sys/param.h> #include <sys/stat.h> @@ -1115,11 +1116,13 @@ fts_pow2(size_t x) x |= x>>2; x |= x>>4; x |= x>>8; +#if (SIZEOF_SIZE_T * CHAR_BIT) > 16 x |= x>>16; -#if LONG_BIT > 32 +#endif +#if (SIZEOF_SIZE_T * CHAR_BIT) > 32 x |= x>>32; #endif -#if LONG_BIT > 64 +#if (SIZEOF_SIZE_T * CHAR_BIT) > 64 x |= x>>64; #endif x++; |