include: misc.h: unexport lowbit() macro

Not used by any drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-11-10 20:07:17 +01:00
committed by Enrico Weigelt
parent 44077ee11c
commit 416f69eb88
5 changed files with 17 additions and 11 deletions

View File

@@ -117,6 +117,7 @@ Equipment Corporation.
#include "mi/mi_priv.h" /* miPaintWindow */
#include "os/auth.h"
#include "os/client_priv.h"
#include "os/osdep.h"
#include "os/screensaver.h"
#include "Xext/panoramiX.h"
#include "Xext/panoramiXsrv.h"

View File

@@ -21,12 +21,15 @@
*/
#include <kdrive-config.h>
#include "fbdev.h"
#include "fb/fb_priv.h"
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include "fb/fb_priv.h"
#include "os/osdep.h"
#include "fbdev.h"
#ifndef xallocarray
#define xallocarray(num, size) reallocarray(NULL, (num), (size))
#endif

View File

@@ -20,6 +20,7 @@ is" without express or implied warranty.
#include <xcb/xcb.h>
#include "dix/colormap_priv.h"
#include "os/osdep.h"
#include "scrnintstr.h"
#include "window.h"

View File

@@ -136,14 +136,6 @@ typedef struct _xReq *xReqPtr;
#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
/* this assumes b > 0 */
#define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b)
/*
* return the least significant bit in x which is set
*
* This works on 1's complement and 2's complement machines.
* If you care about the extra instruction on 2's complement
* machines, change to ((x) & (-(x)))
*/
#define lowbit(x) ((x) & (~(x) + 1))
/* XXX Not for modules */
#include <limits.h>

View File

@@ -57,6 +57,15 @@ SOFTWARE.
#include <X11/Xmd.h>
#include <X11/Xdefs.h>
/*
* return the least significant bit in x which is set
*
* This works on 1's complement and 2's complement machines.
* If you care about the extra instruction on 2's complement
* machines, change to ((x) & (-(x)))
*/
#define lowbit(x) ((x) & (~(x) + 1))
#ifndef __has_builtin
# define __has_builtin(x) 0 /* Compatibility with older compilers */
#endif