From 34662f15afa2de93ccf2c972d5cde14d304315ba Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 1 Mar 2024 19:22:45 +0100 Subject: [PATCH] os: unexport fields from opaque.h not used by modules / drivers There're lots of field that aren't used by any modules or drivers, thus no need to keep them exported. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- dix/colormap.c | 1 + dix/dispatch.c | 1 + dix/resource.c | 1 + hw/xfree86/common/xf86Config.c | 2 ++ include/opaque.h | 21 +-------------------- os/auth.h | 2 ++ os/osdep.h | 13 +++++++++++++ 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/dix/colormap.c b/dix/colormap.c index c63646a8d..77b80d0e9 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -55,6 +55,7 @@ SOFTWARE. #include #include "dix/colormap_priv.h" +#include "os/osdep.h" #include "misc.h" #include "dix.h" diff --git a/dix/dispatch.c b/dix/dispatch.c index 3004e9528..72cd08750 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -109,6 +109,7 @@ Equipment Corporation. #include "dix/gc_priv.h" #include "dix/registry_priv.h" #include "dix/screenint_priv.h" +#include "include/resource.h" #include "os/auth.h" #include "os/ddx_priv.h" #include "os/osdep.h" diff --git a/dix/resource.c b/dix/resource.c index e9c6e0149..87936886b 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -125,6 +125,7 @@ Equipment Corporation. #include "dix/gc_priv.h" #include "dix/registry_priv.h" +#include "os/osdep.h" #include "misc.h" #include "os.h" diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 09e946c9a..ec84748ea 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -50,6 +50,8 @@ #include #include +#include "os/osdep.h" + #include "xf86.h" #include "xf86Modes.h" #include "xf86Parser.h" diff --git a/include/opaque.h b/include/opaque.h index 048a1c946..7850792e8 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -33,27 +33,8 @@ from The Open Group. #include "globals.h" -extern _X_EXPORT int LimitClients; - +// needed by libglx and libglamor (server modules) extern _X_EXPORT Bool enableIndirectGLX; -extern _X_EXPORT Bool PartialNetwork; -extern _X_EXPORT Bool RunFromSigStopParent; - -#ifdef RLIMIT_DATA -extern _X_EXPORT int limitDataSpace; -#endif -#ifdef RLIMIT_STACK -extern _X_EXPORT int limitStackSpace; -#endif -#ifdef RLIMIT_NOFILE -extern _X_EXPORT int limitNoFile; -#endif -extern _X_EXPORT Bool defeatAccessControl; extern _X_EXPORT Bool bgNoneRoot; -extern _X_EXPORT Bool CoreDump; -extern _X_EXPORT Bool NoListenAll; - -extern _X_EXPORT Bool AllowByteSwappedClients; - #endif /* OPAQUE_H */ diff --git a/os/auth.h b/os/auth.h index e03144f11..5d23e9ada 100644 --- a/os/auth.h +++ b/os/auth.h @@ -111,4 +111,6 @@ int ChangeAccessControl(ClientPtr client, int fEnabled); void AccessUsingXdmcp(void); +extern Bool defeatAccessControl; + #endif /* _XSERVER_OS_AUTH_H */ diff --git a/os/osdep.h b/os/osdep.h index d3c5f4e4f..321642585 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -61,6 +61,7 @@ SOFTWARE. #include #include #include +#include /* If EAGAIN and EWOULDBLOCK are distinct errno values, then we check errno * for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX @@ -199,4 +200,16 @@ void ListenToAllClients(void); /* allow DDX to force using another clock */ void ForceClockId(clockid_t forced_clockid); +extern int LimitClients; +extern Bool PartialNetwork; +extern Bool RunFromSigStopParent; + +extern int limitDataSpace; +extern int limitStackSpace; +extern int limitNoFile; + +extern Bool CoreDump; +extern Bool NoListenAll; +extern Bool AllowByteSwappedClients; + #endif /* _OSDEP_H_ */