Use our own bitmap macros instead of borrowing the ones from select.
This commit is contained in:
@@ -297,6 +297,15 @@ extern int errno;
|
||||
# define WCOREDUMP(x) ((x) & 0x80)
|
||||
#endif
|
||||
|
||||
/* Number of bits in a byte. */
|
||||
#ifndef NBBY
|
||||
# ifdef __NBBY
|
||||
# define NBBY __NBBY
|
||||
# else
|
||||
# define NBBY 8
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETEUID
|
||||
# if defined(HAVE_SETRESUID)
|
||||
# define seteuid(u) setresuid(-1, (u), -1)
|
||||
|
@@ -25,21 +25,6 @@
|
||||
#endif
|
||||
#include "sudo_queue.h"
|
||||
|
||||
/* Number of bits in a byte. */
|
||||
#ifndef NBBY
|
||||
# ifdef __NBBY
|
||||
# define NBBY __NBBY
|
||||
# else
|
||||
# define NBBY 8
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Bit map macros. */
|
||||
#define sudo_setbit(_a, _i) ((_a)[(_i) / NBBY] |= 1 << ((_i) % NBBY))
|
||||
#define sudo_clrbit(_a, _i) ((_a)[(_i) / NBBY] &= ~(1<<((_i) % NBBY)))
|
||||
#define sudo_isset(_a, _i) ((_a)[(_i) / NBBY] & (1<<((_i) % NBBY)))
|
||||
#define sudo_isclr(_a, _i) (((_a)[(_i) / NBBY] & (1<<((_i) % NBBY))) == 0)
|
||||
|
||||
/*
|
||||
* List of debug files and flags for use in registration.
|
||||
*/
|
||||
|
@@ -132,6 +132,12 @@
|
||||
# define mtim_get(_x, _y) do { (_y).tv_sec = (_x)->st_mtime; (_y).tv_nsec = 0; } while (0)
|
||||
#endif /* HAVE_ST_MTIM */
|
||||
|
||||
/* Bit map macros. */
|
||||
#define sudo_setbit(_a, _i) ((_a)[(_i) / NBBY] |= 1 << ((_i) % NBBY))
|
||||
#define sudo_clrbit(_a, _i) ((_a)[(_i) / NBBY] &= ~(1<<((_i) % NBBY)))
|
||||
#define sudo_isset(_a, _i) ((_a)[(_i) / NBBY] & (1<<((_i) % NBBY)))
|
||||
#define sudo_isclr(_a, _i) (((_a)[(_i) / NBBY] & (1<<((_i) % NBBY))) == 0)
|
||||
|
||||
/*
|
||||
* Macros to quiet gcc's warn_unused_result attribute.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user