mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 22:51:19 +08:00
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* aclocal/gcc-sanity.m4: Add RTEMS_CHECK_GCC_PRINTF_LD_OFF_T,
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user