mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-18 18:08:15 +02:00
And use it from ac_linux_drm.h Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39482>
54 lines
No EOL
1.9 KiB
C
54 lines
No EOL
1.9 KiB
C
/*
|
|
* Copyright 2026 Advanced Micro Devices, Inc.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Helpers macro to stub out some functions by replacing the declaration
|
|
* with an empty stub.
|
|
* The typical usage is:
|
|
*
|
|
* #ifndef HAVE_XXXX
|
|
* #define __U_STUB__
|
|
* #endif
|
|
* #include "u_stub.h"
|
|
*
|
|
*/
|
|
|
|
#undef PROC
|
|
#undef TAIL
|
|
#undef TAILV
|
|
#undef TAILB
|
|
#undef TAILBT
|
|
#undef TAILPTR
|
|
|
|
#ifdef __U_STUB__
|
|
#define PROC static inline
|
|
#define TAIL \
|
|
{ \
|
|
return -1; \
|
|
}
|
|
#define TAILV \
|
|
{ \
|
|
}
|
|
#define TAILPTR \
|
|
{ \
|
|
return NULL; \
|
|
}
|
|
#define TAILB \
|
|
{ \
|
|
return false; \
|
|
}
|
|
#define TAILBT \
|
|
{ \
|
|
return true; \
|
|
}
|
|
#else
|
|
#define PROC
|
|
#define TAIL
|
|
#define TAILV
|
|
#define TAILB
|
|
#define TAILBT
|
|
#define TAILPTR
|
|
#endif
|
|
|
|
#undef __U_STUB__ |