Changeset 127296c in rtems-libbsd


Ignore:
Timestamp:
Jul 10, 2017, 6:24:56 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
9128d20
Parents:
e3e88e1
git-author:
Sebastian Huber <sebastian.huber@…> (07/10/17 06:24:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/10/17 06:27:47)
Message:

libkern.h: Avoid conflict with <strings.h>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/sys/libkern.h

    re3e88e1 r127296c  
    165165
    166166static inline int
    167 fls(int x)
     167builtin_fls(int x)
    168168{
    169169
     
    172172
    173173static inline int
    174 flsl(long x)
     174builtin_flsl(long x)
    175175{
    176176
    177177  return (x != 0 ? sizeof(x) * 8 - __builtin_clzl((unsigned long)x) : 0);
    178178}
     179
     180static inline int
     181builtin_flsll(long long x)
     182{
     183
     184  return (x != 0 ? sizeof(x) * 8 - __builtin_clzll((unsigned long long)x) : 0);
     185}
     186
     187#define fls(_x)         builtin_fls(_x)
     188#define flsl(_x)        builtin_flsl(_x)
     189#define flsll(_x)       builtin_flsll(_x)
    179190#endif /* __rtems__ */
    180191#define bitcount64(x)   __bitcount64((uint64_t)(x))
Note: See TracChangeset for help on using the changeset viewer.