xserver: Branch 'master' - 10 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 18 00:45:22 UTC 2024


 hw/xfree86/common/xf86AutoConfig.c           |    1 
 hw/xfree86/common/xf86Bus.c                  |    1 
 hw/xfree86/common/xf86Events.c               |    2 
 hw/xfree86/common/xf86Init.c                 |    2 
 hw/xfree86/common/xf86fbBus.c                |    2 
 hw/xfree86/common/xf86noBus.c                |    2 
 hw/xfree86/common/xf86pciBus.c               |    1 
 hw/xfree86/common/xf86platformBus.c          |    1 
 hw/xfree86/dri/dri.c                         |    1 
 hw/xfree86/os-support/bsd/alpha_video.c      |    2 
 hw/xfree86/os-support/bsd/arm_video.c        |    2 
 hw/xfree86/os-support/bsd/bsd_VTsw.c         |    1 
 hw/xfree86/os-support/bsd/bsd_bell.c         |    1 
 hw/xfree86/os-support/bsd/bsd_ev56.c         |    3 -
 hw/xfree86/os-support/bsd/bsd_init.c         |    1 
 hw/xfree86/os-support/bsd/i386_video.c       |    2 
 hw/xfree86/os-support/bsd/ppc_video.c        |    3 -
 hw/xfree86/os-support/bsd/sparc64_video.c    |    4 -
 hw/xfree86/os-support/bus/bsd_pci.c          |    2 
 hw/xfree86/os-support/hurd/hurd_bell.c       |    1 
 hw/xfree86/os-support/hurd/hurd_init.c       |    1 
 hw/xfree86/os-support/hurd/hurd_video.c      |    2 
 hw/xfree86/os-support/linux/lnx_acpi.c       |   11 ++--
 hw/xfree86/os-support/linux/lnx_agp.c        |    2 
 hw/xfree86/os-support/linux/lnx_apm.c        |    2 
 hw/xfree86/os-support/linux/lnx_bell.c       |    3 -
 hw/xfree86/os-support/linux/lnx_init.c       |    1 
 hw/xfree86/os-support/linux/lnx_video.c      |    2 
 hw/xfree86/os-support/shared/VTsw_noop.c     |    1 
 hw/xfree86/os-support/shared/VTsw_usl.c      |    1 
 hw/xfree86/os-support/shared/agp_noop.c      |    4 +
 hw/xfree86/os-support/shared/drm_platform.c  |    1 
 hw/xfree86/os-support/shared/platform_noop.c |    1 
 hw/xfree86/os-support/shared/pm_noop.c       |    3 -
 hw/xfree86/os-support/shared/sigio.c         |    1 
 hw/xfree86/os-support/shared/sigiostubs.c    |    2 
 hw/xfree86/os-support/shared/vidmem.c        |    2 
 hw/xfree86/os-support/solaris/sun_VTsw.c     |    1 
 hw/xfree86/os-support/solaris/sun_agp.c      |    1 
 hw/xfree86/os-support/solaris/sun_apm.c      |    2 
 hw/xfree86/os-support/solaris/sun_bell.c     |    1 
 hw/xfree86/os-support/solaris/sun_init.c     |    3 -
 hw/xfree86/os-support/solaris/sun_vid.c      |    5 +
 hw/xfree86/os-support/stub/stub_bell.c       |    2 
 hw/xfree86/os-support/stub/stub_init.c       |    1 
 hw/xfree86/os-support/stub/stub_video.c      |    2 
 hw/xfree86/os-support/xf86OSpriv.h           |   41 ---------------
 hw/xfree86/os-support/xf86_OSlib.h           |    7 --
 hw/xfree86/os-support/xf86_OSproc.h          |   43 ----------------
 hw/xfree86/os-support/xf86_os_support.h      |   70 +++++++++++++++++++++++++++
 50 files changed, 127 insertions(+), 127 deletions(-)

New commits:
commit 0f715b4ca49b8c0814e540574cc97f31c3b7ec34
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Mar 14 15:21:04 2024 +0100

    xfree86: os-support: move hidden Solaris-specific symbols out of public header
    
    These aren't exported at all, so no need to have it in public header.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 2b8e0060e..6eb3705c2 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -39,6 +39,7 @@
 #include "xf86Config.h"
 #include "xf86MatchDrivers.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86platformBus.h"
 #include "xf86pciBus.h"
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index a86c814cb..2197df6f2 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -67,7 +67,7 @@ static char consoleDev[PATH_MAX] = "/dev/fb";
 
 /* Set by -dev argument on CLI
    Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
-_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
+char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
 
 #ifdef HAS_USL_VTS
 static void
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index b33501a5e..7bdacb9e9 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -104,15 +104,9 @@
 #endif
 #include <sys/kd.h>
 #include <sys/vt.h>
-
-extern _X_HIDDEN void xf86VTAcquire(int);
-extern _X_HIDDEN void xf86VTRelease(int);
 #endif
 
 #if defined(__sun)
-#include <sys/fbio.h>
-extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
-
 #include <sys/kbd.h>
 #include <sys/kbio.h>
 
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index a4fe01346..a45716cf4 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -59,4 +59,12 @@ void
 xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
 #endif
 
+#if defined(__sun)
+extern char xf86SolarisFbDev[PATH_MAX];
+
+/* these are only used inside sun-specific os-support */
+void xf86VTAcquire(int);
+void xf86VTRelease(int);
+#endif
+
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 7429f8ee8fcc327b36b4163f95ae941bc7ba7343
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Mar 14 14:40:47 2024 +0100

    xfree86: os-support: move xf86FatalError macro out of public header
    
    This macro is only used inside xfree86's os-support layer, not by any
    (known) drivers. Thus no need to have it exported in the public API.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index a83b57bd1..74b71ea34 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -87,19 +87,6 @@
 #define XF86_M_RNG		0x080   /* ring */
 #define XF86_M_DSR		0x100   /* data set ready */
 
-/*
- * This is to prevent re-entrancy to FatalError() when aborting.
- * Anything that can be called as a result of ddxGiveUp() should use this
- * instead of FatalError().
- */
-
-#define xf86FatalError(a, b) \
-	if (dispatchException & DE_TERMINATE) { \
-		ErrorF(a, b); \
-		ErrorF("\n"); \
-		return; \
-	} else FatalError(a, b)
-
 /***************************************************************************/
 /* Prototypes                                                              */
 /***************************************************************************/
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index db02ffeee..a4fe01346 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -10,6 +10,21 @@
 
 #include <X11/Xdefs.h>
 
+#include "os.h"
+
+/*
+ * This is to prevent re-entrancy to FatalError() when aborting.
+ * Anything that can be called as a result of ddxGiveUp() should use this
+ * instead of FatalError().
+ */
+
+#define xf86FatalError(a, b) \
+	if (dispatchException & DE_TERMINATE) { \
+		ErrorF(a, b); \
+		ErrorF("\n"); \
+		return; \
+	} else FatalError(a, b)
+
 typedef void (*PMClose) (void);
 
 void xf86OpenConsole(void);
commit 16a3790d607f98932508ed8028e197b3ec75eb44
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Mar 14 13:54:07 2024 +0100

    xfree86: os-support: move unexported stuff out of xf86_OSproc.h
    
    It's cleaner to have public headers only holding public stuff and
    xf86_os_support seems to be much more appropriate place for this.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index ba6f39984..eeeff2b88 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -45,6 +45,7 @@
 
 #include "loaderProcs.h"
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86_OSproc.h"
 #include "xf86Priv.h"
 #include "xf86str.h"
diff --git a/hw/xfree86/os-support/shared/drm_platform.c b/hw/xfree86/os-support/shared/drm_platform.c
index 90013573c..a404aadcc 100644
--- a/hw/xfree86/os-support/shared/drm_platform.c
+++ b/hw/xfree86/os-support/shared/drm_platform.c
@@ -14,6 +14,7 @@
 #include "xf86_OSproc.h"
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86platformBus.h"
 #include "xf86Bus.h"
 
diff --git a/hw/xfree86/os-support/shared/platform_noop.c b/hw/xfree86/os-support/shared/platform_noop.c
index 199ae5e8e..2ff1deafa 100644
--- a/hw/xfree86/os-support/shared/platform_noop.c
+++ b/hw/xfree86/os-support/shared/platform_noop.c
@@ -8,6 +8,7 @@
 #include "xf86_OSproc.h"
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86platformBus.h"
 
 Bool
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 0e3362512..a83b57bd1 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -163,14 +163,5 @@ extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum);
 extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *),
                                              void *);
 
-#ifdef XSERVER_PLATFORM_BUS
-#include "hotplug.h"
-void
-xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
-
-void
-xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
-#endif
-
 _XFUNCPROTOEND
 #endif                          /* _XF86_OSPROC_H */
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index a9c1861ac..db02ffeee 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -35,4 +35,13 @@ typedef struct {
 
 void xf86OSInitVidMem(VidMemInfoPtr);
 
+#ifdef XSERVER_PLATFORM_BUS
+#include "hotplug.h"
+void
+xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
+
+void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
+#endif
+
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 5b23578f93761f816cbe3d93ba946b3a682933b0
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Mar 14 13:14:43 2024 +0100

    xfree86: os-support: move VidMemInfo xf86_os_support.h
    
    This type is only used inside the os-support layer of xfree86, so it fits
    better into xf86_os_support.h, whose purpose is being the primary entry
    point into os-support layer.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/xf86OSpriv.h b/hw/xfree86/os-support/xf86OSpriv.h
deleted file mode 100644
index 1210bafe1..000000000
--- a/hw/xfree86/os-support/xf86OSpriv.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999-2000 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86OSPRIV_H
-#define _XF86OSPRIV_H
-
-typedef struct {
-    Bool initialised;
-} VidMemInfo, *VidMemInfoPtr;
-
-#endif                          /* _XF86OSPRIV_H */
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index ccb163005..a9c1861ac 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -10,8 +10,6 @@
 
 #include <X11/Xdefs.h>
 
-#include "xf86OSpriv.h"
-
 typedef void (*PMClose) (void);
 
 void xf86OpenConsole(void);
@@ -31,6 +29,10 @@ void xf86OSInputThreadInit(void);
 Bool xf86DeallocateGARTMemory(int screenNum, int key);
 int xf86RemoveSIGIOHandler(int fd);
 
+typedef struct {
+    Bool initialised;
+} VidMemInfo, *VidMemInfoPtr;
+
 void xf86OSInitVidMem(VidMemInfoPtr);
 
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 533c45e595a0342b04372d655a73f296fda29abb
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Mar 14 13:14:43 2024 +0100

    xfree86: os-support: move xf86OSInitVidMem() to xf86_os_support.h
    
    This function isn't exported at all, so it better fits into xf86_os_support.h,
    whose purpose is being the primary entry point into os-support layer.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index 670193c0d..279391e42 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -39,8 +39,8 @@
 #include <sys/sysctl.h>
 #endif
 
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 #if defined(__NetBSD__) && !defined(MAP_FILE)
 #define MAP_FLAGS MAP_SHARED
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 647ebf46c..15b12a86f 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -65,9 +65,9 @@
 #include <X11/X.h>
 
 #include "xf86.h"
+#include "xf86_os_support."
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 #include "compiler.h"
 
 #if defined(__NetBSD__) && !defined(MAP_FILE)
diff --git a/hw/xfree86/os-support/bsd/bsd_ev56.c b/hw/xfree86/os-support/bsd/bsd_ev56.c
index 95883491b..6a190ab4e 100644
--- a/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -4,14 +4,15 @@
 #endif
 
 #include <X11/X.h>
+
 #include "input.h"
 #include "scrnintstr.h"
 #include "compiler.h"
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 #include <machine/bwx.h>
 
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 625514e70..403aa08cc 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -32,9 +32,9 @@
 #include <X11/X.h>
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 #if defined(__NetBSD__) && !defined(MAP_FILE)
 #define MAP_FLAGS MAP_SHARED
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index bd929b208..7a64f4b83 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -32,9 +32,8 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
-
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 #include "bus/Pci.h"
 
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index 3f8cccd19..c456eaf6a 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -28,11 +28,11 @@
 #endif
 
 #include <X11/X.h>
+
 #include "xf86.h"
 #include "xf86Priv.h"
-
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 /***************************************************************************/
 /* Video Memory Mapping section                                            */
diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
index 63f3aef71..f39142293 100644
--- a/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/hw/xfree86/os-support/hurd/hurd_video.c
@@ -37,8 +37,8 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 /**************************************************************************
  * Video Memory Mapping section
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 28814c889..c1bc6fac7 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -18,7 +18,6 @@
 #include "xf86Priv.h"
 #include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 #if defined(__linux__)
 #include <asm/ioctl.h>
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 8ff0f0bc5..a74b994ab 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -36,9 +36,9 @@
 #include "scrnintstr.h"
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 static Bool ExtendedEnabled = FALSE;
 
diff --git a/hw/xfree86/os-support/shared/agp_noop.c b/hw/xfree86/os-support/shared/agp_noop.c
index 5f2a57854..284e0605f 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -35,11 +35,12 @@
 #endif
 
 #include <X11/X.h>
+
 #include "xf86.h"
 #include "xf86Priv.h"
 #include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
+#include "xf86_os_support.h"
 
 Bool
 xf86GARTCloseScreen(int screenNum)
diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index 1eb4986f8..26ae587f5 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -37,7 +37,6 @@
 #include "xf86Priv.h"
 #include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 /*
  * This file contains the common part of the video memory mapping functions
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 01a2bd89b..ac66bdf51 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -56,12 +56,12 @@
 #include <sys/psw.h>
 #endif /* defined(__i386__) || defined(__i386) || defined(__x86) */
 
+#include <sys/mman.h>
+
 #include "xf86.h"
 #include "xf86Priv.h"
 #include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
-#include <sys/mman.h>
 
 /***************************************************************************/
 /* Video Memory Mapping section 					   */
diff --git a/hw/xfree86/os-support/stub/stub_video.c b/hw/xfree86/os-support/stub/stub_video.c
index 9771fcf6e..d52285d29 100644
--- a/hw/xfree86/os-support/stub/stub_video.c
+++ b/hw/xfree86/os-support/stub/stub_video.c
@@ -2,8 +2,8 @@
 #include <xorg-config.h>
 #endif
 
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
 
 void
 xf86OSInitVidMem(VidMemInfoPtr pVidMem)
diff --git a/hw/xfree86/os-support/xf86OSpriv.h b/hw/xfree86/os-support/xf86OSpriv.h
index ce1ec33a1..1210bafe1 100644
--- a/hw/xfree86/os-support/xf86OSpriv.h
+++ b/hw/xfree86/os-support/xf86OSpriv.h
@@ -36,6 +36,4 @@ typedef struct {
     Bool initialised;
 } VidMemInfo, *VidMemInfoPtr;
 
-void xf86OSInitVidMem(VidMemInfoPtr);
-
 #endif                          /* _XF86OSPRIV_H */
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index ae0f651c3..ccb163005 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -10,6 +10,8 @@
 
 #include <X11/Xdefs.h>
 
+#include "xf86OSpriv.h"
+
 typedef void (*PMClose) (void);
 
 void xf86OpenConsole(void);
@@ -29,4 +31,6 @@ void xf86OSInputThreadInit(void);
 Bool xf86DeallocateGARTMemory(int screenNum, int key);
 int xf86RemoveSIGIOHandler(int fd);
 
+void xf86OSInitVidMem(VidMemInfoPtr);
+
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit a5cfe020f5fdd6493f0600164bb0e9e910ae483e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Mar 13 17:44:31 2024 +0100

    xfree86: os-support: unexport xf86RemoveSIGIOHandler
    
    It's not used by any driver, so no need to export it.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 05e1c2696..ea2ac7d21 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -68,6 +68,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dristruct.h"
 #include "mi.h"
 #include "mipointer.h"
+#include "xf86_os_support.h"
 #include "xf86_OSproc.h"
 #include "inputstr.h"
 #include "xf86VGAarbiter.h"
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index 67de2e925..40677ad7a 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -65,6 +65,7 @@
 #include <xserver_poll.h>
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "inputstr.h"
 
diff --git a/hw/xfree86/os-support/shared/sigiostubs.c b/hw/xfree86/os-support/shared/sigiostubs.c
index d1792e8ac..c56c42fa5 100644
--- a/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/hw/xfree86/os-support/shared/sigiostubs.c
@@ -30,8 +30,10 @@
 #endif
 
 #include <X11/X.h>
+
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 int
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 9fbcf5d01..0e3362512 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -162,7 +162,6 @@ extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum);
    wrappers than to wrap each individual function called. */
 extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *),
                                              void *);
-extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd);
 
 #ifdef XSERVER_PLATFORM_BUS
 #include "hotplug.h"
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index ccb4d648d..ae0f651c3 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -27,5 +27,6 @@ void xf86InitVidMem(void);
 void xf86OSRingBell(int volume, int pitch, int duration);
 void xf86OSInputThreadInit(void);
 Bool xf86DeallocateGARTMemory(int screenNum, int key);
+int xf86RemoveSIGIOHandler(int fd);
 
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 3e4fc3e5885f12e8f2e3a9fdadee2519cdc59606
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Mar 13 17:29:17 2024 +0100

    xfree86: os-support: unexport xf86DeallocateGARTMemory
    
    It's not used in any drivers, so no need to export it.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 9bf1d2424..28814c889 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -16,6 +16,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
diff --git a/hw/xfree86/os-support/shared/agp_noop.c b/hw/xfree86/os-support/shared/agp_noop.c
index 6f793353d..5f2a57854 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -37,6 +37,7 @@
 #include <X11/X.h>
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
diff --git a/hw/xfree86/os-support/solaris/sun_agp.c b/hw/xfree86/os-support/solaris/sun_agp.c
index 02a6e1806..0e5bdb1c5 100644
--- a/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/hw/xfree86/os-support/solaris/sun_agp.c
@@ -37,6 +37,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86_OSproc.h"
 #include <unistd.h>
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index ecf11cb29..9fbcf5d01 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -151,7 +151,6 @@ extern _X_EXPORT Bool xf86AcquireGART(int screenNum);
 extern _X_EXPORT Bool xf86ReleaseGART(int screenNum);
 extern _X_EXPORT int xf86AllocateGARTMemory(int screenNum, unsigned long size,
                                             int type, unsigned long *physical);
-extern _X_EXPORT Bool xf86DeallocateGARTMemory(int screenNum, int key);
 extern _X_EXPORT Bool xf86BindGARTMemory(int screenNum, int key,
                                          unsigned long offset);
 extern _X_EXPORT Bool xf86UnbindGARTMemory(int screenNum, int key);
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index a711d3d21..ccb4d648d 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -26,5 +26,6 @@ void xf86InitVidMem(void);
 
 void xf86OSRingBell(int volume, int pitch, int duration);
 void xf86OSInputThreadInit(void);
+Bool xf86DeallocateGARTMemory(int screenNum, int key);
 
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 38030fce539131ac6cb1d90e9dcf2b13549384a0
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Mar 13 17:01:21 2024 +0100

    xfree86: os-support: unexport xf86OSInputThreadInit()
    
    This is just called by xfree86 core, not by any drivers, thus no need
    to export it.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index fa7c2a82e..01a2bd89b 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -58,6 +58,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 #include <sys/mman.h>
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 26f452d44..ecf11cb29 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -132,7 +132,6 @@ extern _X_EXPORT int xf86GetSerialModemState(int fd);
 extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits);
 extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits);
 extern _X_EXPORT int xf86LoadKernelModule(const char *pathname);
-extern _X_EXPORT void xf86OSInputThreadInit(void);
 
 /* AGP GART interface */
 
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index 30098a804..a711d3d21 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -25,5 +25,6 @@ PMClose xf86OSPMOpen(void);
 void xf86InitVidMem(void);
 
 void xf86OSRingBell(int volume, int pitch, int duration);
+void xf86OSInputThreadInit(void);
 
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit b9569f1eb310566f1a4ebe851b264b174b5b0fa1
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Mar 13 16:27:10 2024 +0100

    xfree86: os-support: unexport xf86OSRingBell()
    
    This function is only internal to xfree86 DDX, not used by any drivers,
    thus no need to export it.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/os-support/bsd/bsd_bell.c b/hw/xfree86/os-support/bsd/bsd_bell.c
index 19d1f4882..2b0bba2f6 100644
--- a/hw/xfree86/os-support/bsd/bsd_bell.c
+++ b/hw/xfree86/os-support/bsd/bsd_bell.c
@@ -35,6 +35,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 void
diff --git a/hw/xfree86/os-support/hurd/hurd_bell.c b/hw/xfree86/os-support/hurd/hurd_bell.c
index 33965a44c..0c155dd68 100644
--- a/hw/xfree86/os-support/hurd/hurd_bell.c
+++ b/hw/xfree86/os-support/hurd/hurd_bell.c
@@ -28,6 +28,7 @@
 #endif
 
 #include "xf86.h"
+#include "xf86_os_support.h"
 #include "xf86Priv.h"
 
 void
diff --git a/hw/xfree86/os-support/linux/lnx_bell.c b/hw/xfree86/os-support/linux/lnx_bell.c
index e1d3cbf17..e58b9ec80 100644
--- a/hw/xfree86/os-support/linux/lnx_bell.c
+++ b/hw/xfree86/os-support/linux/lnx_bell.c
@@ -30,9 +30,8 @@
 #include <sys/ioctl.h>
 #include <linux/kd.h>
 
-#include "xf86.h"
 #include "xf86Priv.h"
-#include "xf86_OSproc.h"
+#include "xf86_os_support.h"
 
 void
 xf86OSRingBell(int loudness, int pitch, int duration)
diff --git a/hw/xfree86/os-support/solaris/sun_bell.c b/hw/xfree86/os-support/solaris/sun_bell.c
index 6aa0a37a3..d08474516 100644
--- a/hw/xfree86/os-support/solaris/sun_bell.c
+++ b/hw/xfree86/os-support/solaris/sun_bell.c
@@ -33,6 +33,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 #define BELL_RATE       48000   /* Samples per second */
diff --git a/hw/xfree86/os-support/stub/stub_bell.c b/hw/xfree86/os-support/stub/stub_bell.c
index 48625928f..a06aed659 100644
--- a/hw/xfree86/os-support/stub/stub_bell.c
+++ b/hw/xfree86/os-support/stub/stub_bell.c
@@ -2,7 +2,7 @@
 #include <xorg-config.h>
 #endif
 
-#include "xf86_OSlib.h"
+#include "xf86_os_support.h"
 
 void
 xf86OSRingBell(int loudness, int pitch, int duration)
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 19ebbde48..26f452d44 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -118,7 +118,6 @@ extern _X_EXPORT void xf86DisableIO(void);
 extern _X_EXPORT void xf86SetTVOut(int);
 extern _X_EXPORT void xf86SetRGBOut(void);
 #endif
-extern _X_EXPORT void xf86OSRingBell(int, int, int);
 extern _X_EXPORT void xf86SlowBcopy(unsigned char *, unsigned char *, int);
 extern _X_EXPORT int xf86OpenSerial(XF86OptionPtr options);
 extern _X_EXPORT int xf86SetSerial(int fd, XF86OptionPtr options);
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
index a21aa9bf5..30098a804 100644
--- a/hw/xfree86/os-support/xf86_os_support.h
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -24,4 +24,6 @@ void xf86UseMsg(void);
 PMClose xf86OSPMOpen(void);
 void xf86InitVidMem(void);
 
+void xf86OSRingBell(int volume, int pitch, int duration);
+
 #endif /* _XSERVER_XF86_OS_SUPPORT */
commit 7aa3fa54d46ef99588060e6cc6467f1dfcf6150d
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Mar 13 14:24:49 2024 +0100

    xfree86: unexport os-support functions
    
    These aren't called by drivers/modules, so no need to export them.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index fd144dbe7..6c5c730a1 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -45,7 +45,6 @@
 
 #include "xf86Bus.h"
 
-#define XF86_OS_PRIVS
 #include "xf86_OSproc.h"
 #ifdef XSERVER_LIBPCIACCESS
 #include "xf86VGAarbiter.h"
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 6a349f4c6..23c492915 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -61,7 +61,7 @@
 #include "misc.h"
 #include "xf86.h"
 #include "xf86Priv.h"
-#define XF86_OS_PRIVS
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include <X11/keysym.h>
 
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 2f25272a5..54f8dd76e 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -62,10 +62,10 @@
 #include "systemd-logind.h"
 #include "loaderProcs.h"
 
-#define XF86_OS_PRIVS
 #include "xf86.h"
 #include "xf86Priv.h"
 #include "xf86Config.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86cmap.h"
 #include "xorgVersion.h"
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index 303b9c2f5..9027e5594 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -42,8 +42,6 @@
 #include "xf86Priv.h"
 
 #include "xf86Bus.h"
-
-#define XF86_OS_PRIVS
 #include "xf86_OSproc.h"
 
 Bool fbSlotClaimed = FALSE;
diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c
index 4f55def7b..e10d2fe09 100644
--- a/hw/xfree86/common/xf86noBus.c
+++ b/hw/xfree86/common/xf86noBus.c
@@ -42,8 +42,6 @@
 #include "xf86Priv.h"
 
 #include "xf86Bus.h"
-
-#define XF86_OS_PRIVS
 #include "xf86_OSproc.h"
 
 int
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index aeeed8be6..68e3f35fc 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -46,7 +46,6 @@
 /* Bus-specific headers */
 #include "xf86Bus.h"
 
-#define XF86_OS_PRIVS
 #include "xf86_OSproc.h"
 
 #define PCI_VENDOR_GENERIC		0x00FF
diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c
index b9afb9889..ed06d944a 100644
--- a/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -30,6 +30,7 @@
 #include <X11/X.h>
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 /*
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index dcbb7b91e..79247ef92 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -35,6 +35,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 #include <sys/utsname.h>
diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c
index 7a5dbbb01..91b80aab9 100644
--- a/hw/xfree86/os-support/bus/bsd_pci.c
+++ b/hw/xfree86/os-support/bus/bsd_pci.c
@@ -40,9 +40,11 @@
 #endif
 
 #include <stdio.h>
+
 #include "compiler.h"
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "Pci.h"
 
diff --git a/hw/xfree86/os-support/hurd/hurd_init.c b/hw/xfree86/os-support/hurd/hurd_init.c
index c1b632f19..e99c3fff4 100644
--- a/hw/xfree86/os-support/hurd/hurd_init.c
+++ b/hw/xfree86/os-support/hurd/hurd_init.c
@@ -34,6 +34,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 #include <stdio.h>
diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c
index dbd5afe90..50825cdfa 100644
--- a/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -2,11 +2,6 @@
 #include "xorg-config.h"
 #endif
 
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#define XF86_OS_PRIVS
-#include "xf86_OSproc.h"
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -15,6 +10,12 @@
 #include <fcntl.h>
 #include <errno.h>
 
+#include "os.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_os_support.h"
+#include "xf86_OSproc.h"
+
 #define ACPI_SOCKET  "/var/run/acpid.socket"
 
 #define ACPI_VIDEO_NOTIFY_SWITCH	0x80
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index b928febf6..4377caa20 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -7,7 +7,7 @@
 #include "os.h"
 #include "xf86.h"
 #include "xf86Priv.h"
-#define XF86_OS_PRIVS
+#include "xf86_os_support.h"
 #include "xf86_OSproc.h"
 
 #ifdef HAVE_ACPI
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index f623ca0b9..16c3dc535 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -38,6 +38,7 @@
 #include "linux.h"
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 #include <sys/stat.h>
diff --git a/hw/xfree86/os-support/shared/VTsw_noop.c b/hw/xfree86/os-support/shared/VTsw_noop.c
index a75d134b4..f543a5bfa 100644
--- a/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -29,6 +29,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 /*
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index e9b3c3ae0..a905cce24 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -31,6 +31,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 /*
diff --git a/hw/xfree86/os-support/shared/pm_noop.c b/hw/xfree86/os-support/shared/pm_noop.c
index 1d6f0789d..b0ed64e33 100644
--- a/hw/xfree86/os-support/shared/pm_noop.c
+++ b/hw/xfree86/os-support/shared/pm_noop.c
@@ -32,10 +32,11 @@
 #endif
 
 #include <X11/X.h>
+
 #include "os.h"
 #include "xf86.h"
 #include "xf86Priv.h"
-#define XF86_OS_PRIVS
+#include "xf86_os_support.h"
 #include "xf86_OSproc.h"
 
 PMClose
diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index a6bf677f5..1eb4986f8 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -35,6 +35,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
diff --git a/hw/xfree86/os-support/solaris/sun_VTsw.c b/hw/xfree86/os-support/solaris/sun_VTsw.c
index d4c383496..d4e076fb3 100644
--- a/hw/xfree86/os-support/solaris/sun_VTsw.c
+++ b/hw/xfree86/os-support/solaris/sun_VTsw.c
@@ -29,6 +29,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 #include <door.h>
diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c
index 6516372d7..24a743f17 100644
--- a/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/hw/xfree86/os-support/solaris/sun_apm.c
@@ -59,7 +59,7 @@
 #include "os.h"
 #include "xf86.h"
 #include "xf86Priv.h"
-#define XF86_OS_PRIVS
+#include "xf86_os_support.h"
 #include "xf86_OSproc.h"
 #include "xf86_OSlib.h"
 
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index 99fd9fdf7..a86c814cb 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -33,6 +33,7 @@
 
 #include "xf86.h"
 #include "xf86Priv.h"
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 #ifdef HAVE_SYS_KD_H
 #include <sys/kd.h>
diff --git a/hw/xfree86/os-support/stub/stub_init.c b/hw/xfree86/os-support/stub/stub_init.c
index f0d9039b9..677401bfa 100644
--- a/hw/xfree86/os-support/stub/stub_init.c
+++ b/hw/xfree86/os-support/stub/stub_init.c
@@ -2,6 +2,7 @@
 #include <xorg-config.h>
 #endif
 
+#include "xf86_os_support.h"
 #include "xf86_OSlib.h"
 
 void
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 90d560eef..b33501a5e 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -302,7 +302,6 @@ struct pcvtid {
 
 #define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
 
-#define XF86_OS_PRIVS
 #include "xf86_OSproc.h"
 
 #endif                          /* _XF86_OSLIB_H */
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index ecffd9a75..19ebbde48 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -167,23 +167,6 @@ extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *),
                                              void *);
 extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd);
 
-#ifdef XF86_OS_PRIVS
-typedef void (*PMClose) (void);
-extern _X_EXPORT void xf86OpenConsole(void);
-extern _X_EXPORT void xf86CloseConsole(void);
-extern _X_HIDDEN Bool xf86VTActivate(int vtno);
-extern _X_EXPORT Bool xf86VTSwitchPending(void);
-extern _X_EXPORT Bool xf86VTSwitchAway(void);
-extern _X_EXPORT Bool xf86VTSwitchTo(void);
-extern _X_EXPORT void xf86VTRequest(int sig);
-extern _X_EXPORT int xf86ProcessArgument(int, char **, int);
-extern _X_EXPORT void xf86UseMsg(void);
-extern _X_EXPORT PMClose xf86OSPMOpen(void);
-
-extern _X_EXPORT void xf86InitVidMem(void);
-
-#endif                          /* XF86_OS_PRIVS */
-
 #ifdef XSERVER_PLATFORM_BUS
 #include "hotplug.h"
 void
diff --git a/hw/xfree86/os-support/xf86_os_support.h b/hw/xfree86/os-support/xf86_os_support.h
new file mode 100644
index 000000000..a21aa9bf5
--- /dev/null
+++ b/hw/xfree86/os-support/xf86_os_support.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+
+/* prototypes for the os-support layer of xfree86 DDX */
+
+#ifndef _XSERVER_XF86_OS_SUPPORT
+#define _XSERVER_XF86_OS_SUPPORT
+
+#include <X11/Xdefs.h>
+
+typedef void (*PMClose) (void);
+
+void xf86OpenConsole(void);
+void xf86CloseConsole(void);
+Bool xf86VTActivate(int vtno);
+Bool xf86VTSwitchPending(void);
+Bool xf86VTSwitchAway(void);
+Bool xf86VTSwitchTo(void);
+void xf86VTRequest(int sig);
+int xf86ProcessArgument(int argc, char **argv, int i);
+void xf86UseMsg(void);
+PMClose xf86OSPMOpen(void);
+void xf86InitVidMem(void);
+
+#endif /* _XSERVER_XF86_OS_SUPPORT */


More information about the xorg-commit mailing list