diff options
Diffstat (limited to 'xorg-server/include/registry.h')
-rw-r--r-- | xorg-server/include/registry.h | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/xorg-server/include/registry.h b/xorg-server/include/registry.h index 96be87aad..43c3db339 100644 --- a/xorg-server/include/registry.h +++ b/xorg-server/include/registry.h @@ -17,18 +17,26 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define XREGISTRY_UNKNOWN "<unknown>" -#ifdef XREGISTRY - #include "resource.h" #include "extnsionst.h" +#if defined(XSELINUX) || defined(RES) +#define X_REGISTRY_RESOURCE 1 +#endif + +#if defined(XSELINUX) || defined(XCSECURITY) +#define X_REGISTRY_REQUEST 1 +#endif + /* Internal string registry - for auditing, debugging, security, etc. */ -/* - * Registration functions. The name string is not copied, so it must - * not be a stack variable. - */ +#ifdef X_REGISTRY_RESOURCE +/* Functions used by the X-Resource extension */ extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name); +extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif + +#ifdef X_REGISTRY_REQUEST extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext); /* @@ -38,29 +46,13 @@ extern _X_EXPORT const char *LookupMajorName(int major); extern _X_EXPORT const char *LookupRequestName(int major, int minor); extern _X_EXPORT const char *LookupEventName(int event); extern _X_EXPORT const char *LookupErrorName(int error); -extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); +#endif /* * Setup and teardown */ extern _X_EXPORT void dixResetRegistry(void); extern _X_EXPORT void dixFreeRegistry(void); +extern _X_EXPORT void dixCloseRegistry(void); -#else /* XREGISTRY */ - -/* Define calls away when the registry is not being built. */ - -#define RegisterResourceName(a, b) { ; } -#define RegisterExtensionNames(a) { ; } - -#define LookupMajorName(a) XREGISTRY_UNKNOWN -#define LookupRequestName(a, b) XREGISTRY_UNKNOWN -#define LookupEventName(a) XREGISTRY_UNKNOWN -#define LookupErrorName(a) XREGISTRY_UNKNOWN -#define LookupResourceName(a) XREGISTRY_UNKNOWN - -#define dixResetRegistry() { ; } -#define dixFreeRegistry() { ; } - -#endif /* XREGISTRY */ #endif /* DIX_REGISTRY_H */ |