summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-03-13 14:24:49 +0100
committerMarge Bot <emma+marge@anholt.net>2024-04-18 00:40:39 +0000
commit7aa3fa54d46ef99588060e6cc6467f1dfcf6150d (patch)
tree4d6fff2736ef72b297ea250120f85ad543286080
parente2fa0d2ae0d96bac694e6249f77745071fa5ebfe (diff)
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@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
-rw-r--r--hw/xfree86/common/xf86Bus.c1
-rw-r--r--hw/xfree86/common/xf86Events.c2
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xfree86/common/xf86fbBus.c2
-rw-r--r--hw/xfree86/common/xf86noBus.c2
-rw-r--r--hw/xfree86/common/xf86pciBus.c1
-rw-r--r--hw/xfree86/os-support/bsd/bsd_VTsw.c1
-rw-r--r--hw/xfree86/os-support/bsd/bsd_init.c1
-rw-r--r--hw/xfree86/os-support/bus/bsd_pci.c2
-rw-r--r--hw/xfree86/os-support/hurd/hurd_init.c1
-rw-r--r--hw/xfree86/os-support/linux/lnx_acpi.c11
-rw-r--r--hw/xfree86/os-support/linux/lnx_apm.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c1
-rw-r--r--hw/xfree86/os-support/shared/VTsw_noop.c1
-rw-r--r--hw/xfree86/os-support/shared/VTsw_usl.c1
-rw-r--r--hw/xfree86/os-support/shared/pm_noop.c3
-rw-r--r--hw/xfree86/os-support/shared/vidmem.c1
-rw-r--r--hw/xfree86/os-support/solaris/sun_VTsw.c1
-rw-r--r--hw/xfree86/os-support/solaris/sun_apm.c2
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c1
-rw-r--r--hw/xfree86/os-support/stub/stub_init.c1
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h1
-rw-r--r--hw/xfree86/os-support/xf86_OSproc.h17
-rw-r--r--hw/xfree86/os-support/xf86_os_support.h27
24 files changed, 51 insertions, 34 deletions
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@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 */