xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 17 00:47:53 UTC 2024


 Xext/shm.c                               |    1 +
 composite/compwindow.c                   |    1 +
 dix/main.c                               |    1 +
 hw/kdrive/ephyr/ephyr.c                  |    3 ++-
 hw/kdrive/ephyr/ephyrinit.c              |    1 +
 hw/kdrive/src/kdrive.c                   |    2 ++
 hw/vfb/InitOutput.c                      |    1 +
 hw/xfree86/common/xf86Configure.c        |    2 ++
 hw/xfree86/common/xf86Init.c             |    2 +-
 hw/xfree86/ddc/ddc.c                     |    2 ++
 hw/xfree86/int10/helper_exec.c           |    4 +++-
 hw/xfree86/os-support/bsd/bsd_init.c     |    2 ++
 hw/xfree86/os-support/linux/lnx_init.c   |    1 +
 hw/xfree86/os-support/shared/VTsw_usl.c  |    2 ++
 hw/xfree86/os-support/solaris/sun_init.c |    2 ++
 hw/xnest/Display.c                       |    3 +++
 hw/xnest/Init.c                          |    1 +
 hw/xquartz/darwin.c                      |    3 +++
 hw/xwayland/xwayland-screen.c            |    3 +++
 hw/xwayland/xwayland.c                   |    1 +
 hw/xwin/InitOutput.c                     |    1 +
 hw/xwin/winerror.c                       |    2 ++
 include/os.h                             |   29 -----------------------------
 miext/damage/damage.c                    |    2 ++
 os/busfault.h                            |    2 ++
 os/connection.c                          |    4 +---
 os/log.c                                 |   11 ++++++-----
 os/osdep.h                               |   14 ++++++++++++++
 os/osinit.c                              |   11 ++++++-----
 os/utils.c                               |    1 +
 30 files changed, 70 insertions(+), 45 deletions(-)

New commits:
commit be4c8444eb0cc9c96682e2650d45f028b9a13b6c
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Feb 23 17:26:57 2024 +0100

    os: unexport Os*() functions
    
    These aren't called (and suited for being called) by drivers,
    thus drop them from the public module API.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>

diff --git a/Xext/shm.c b/Xext/shm.c
index 3a5a4c7f2..b3ab676ea 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group.
 
 #include "os/auth.h"
 #include "os/busfault.h"
+#include "os/osdep.h"
 
 #include "misc.h"
 #include "os.h"
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 54afbdda0..3d62358b9 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -46,6 +46,7 @@
 #endif
 
 #include "dix/dix_priv.h"
+#include "os/osdep.h"
 
 #include "compint.h"
 #include "compositeext_priv.h"
diff --git a/dix/main.c b/dix/main.c
index ac189a367..09341f34e 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -90,6 +90,7 @@ Equipment Corporation.
 #include "os/audit.h"
 #include "os/auth.h"
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "scrnintstr.h"
 #include "misc.h"
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index c28f67a62..3d0dd872b 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -30,8 +30,9 @@
 #include <xcb/xcb_keysyms.h>
 #include <X11/keysym.h>
 
-#include "ephyr.h"
+#include "os/osdep.h"
 
+#include "ephyr.h"
 #include "inputstr.h"
 #include "scrnintstr.h"
 #include "ephyrlog.h"
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 6cae1ea7e..eb31b55a2 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -28,6 +28,7 @@
 #endif
 
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "ephyr.h"
 #include "ephyrlog.h"
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 247a6f4a2..2145f64cb 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -27,6 +27,8 @@
 #include "dix/screenint_priv.h"
 #include "os/cmdline.h"
 
+#include "os/osdep.h"
+
 #include "kdrive.h"
 #include <mivalidate.h>
 #include <dixstruct.h>
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 2d3f131af..e4b75a796 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -40,6 +40,7 @@ from The Open Group.
 
 #include "dix/screenint_priv.h"
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "scrnintstr.h"
 #include "servermd.h"
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 52594c692..a29c5460e 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -29,6 +29,8 @@
 
 #include <errno.h>
 
+#include "os/osdep.h"
+
 #include "xf86.h"
 #include "xf86Config.h"
 #include "xf86_OSlib.h"
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index b96f46cfa..3308329a1 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -50,6 +50,7 @@
 
 #include "dix/screenint_priv.h"
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "input.h"
 #include "servermd.h"
@@ -58,7 +59,6 @@
 #include "mi.h"
 #include "dbus-core.h"
 #include "systemd-logind.h"
-
 #include "loaderProcs.h"
 
 #define XF86_OS_PRIVS
diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c
index b82dfc185..621ef5336 100644
--- a/hw/xfree86/ddc/ddc.c
+++ b/hw/xfree86/ddc/ddc.c
@@ -14,6 +14,8 @@
 #include <xorg-config.h>
 #endif
 
+#include "os/osdep.h"
+
 #include "misc.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 12000bf96..c7c8478e6 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -21,8 +21,10 @@
 #define PRINT_PORT 0
 
 #include <unistd.h>
-
 #include <X11/Xos.h>
+
+#include "os/osdep.h"
+
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index e87f11d4d..91ffccdb0 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -42,6 +42,8 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#include "os/osdep.h"
+
 static Bool KeepTty = FALSE;
 
 #ifdef PCCONS_SUPPORT
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 62e2b6862..f623ca0b9 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -32,6 +32,7 @@
 #include <X11/Xmd.h>
 
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "compiler.h"
 #include "linux.h"
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index 64402616e..e9b3c3ae0 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -27,6 +27,8 @@
 
 #include <X11/X.h>
 
+#include "os/osdep.h"
+
 #include "xf86.h"
 #include "xf86Priv.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 c5ce9e068..aac212707 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -37,6 +37,8 @@
 #include <sys/kd.h>
 #endif
 
+#include "os/osdep.h"
+
 /*
  * Applications see VT number as consecutive integers starting from 1.
  * VT number			VT device
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index a014aa40d..0735de772 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -21,6 +21,9 @@ is" without express or implied warranty.
 
 #include <X11/X.h>
 #include <X11/Xproto.h>
+
+#include "os/osdep.h"
+
 #include "screenint.h"
 #include "input.h"
 #include "misc.h"
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 8bf779621..58255c22b 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -22,6 +22,7 @@ is" without express or implied warranty.
 #include <X11/fonts/fontstruct.h>
 
 #include "dix/screenint_priv.h"
+#include "os/osdep.h"
 
 #include "screenint.h"
 #include "input.h"
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index e34994673..167973845 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -34,6 +34,9 @@
 
 #include <X11/X.h>
 #include <X11/Xproto.h>
+
+#include "os/osdep.h"
+
 #include "os.h"
 #include "servermd.h"
 #include "inputstr.h"
diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
index 284189912..a8db081eb 100644
--- a/hw/xwayland/xwayland-screen.c
+++ b/hw/xwayland/xwayland-screen.c
@@ -35,6 +35,9 @@
 #endif
 
 #include <X11/Xatom.h>
+
+#include "os/osdep.h"
+
 #include <micmap.h>
 #include <misyncshm.h>
 #include <os.h>
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 5cc88b245..499c2cc1f 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -37,6 +37,7 @@
 #include "dix/dix_priv.h"
 #include "dix/screenint_priv.h"
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include <selection.h>
 #include <micmap.h>
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index ca4b6bf0a..bc4293d0f 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -60,6 +60,7 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner,
 #endif
 
 #include "dix/screenint_priv.h"
+#include "os/osdep.h"
 
 #include "winmonitors.h"
 #include "nonsdk_extinit.h"
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c
index c8ad9c969..ed505e47d 100644
--- a/hw/xwin/winerror.c
+++ b/hw/xwin/winerror.c
@@ -32,6 +32,8 @@
 #include <xwin-config.h>
 #endif
 
+#include "os/osdep.h"
+
 #include <../xfree86/common/xorgVersion.h>
 #include "win.h"
 
diff --git a/include/os.h b/include/os.h
index e0b9afd38..396d4205a 100644
--- a/include/os.h
+++ b/include/os.h
@@ -266,11 +266,8 @@ XNFvprintf(const char *fmt, va_list va)
 _X_ATTRIBUTE_PRINTF(1, 0)
     _X_DEPRECATED;
 
-typedef void (*OsSigHandlerPtr) (int /* sig */ );
 typedef int (*OsSigWrapperPtr) (int /* sig */ );
 
-extern _X_EXPORT OsSigHandlerPtr
-OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
 extern _X_EXPORT OsSigWrapperPtr
 OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
 
@@ -279,32 +276,6 @@ LockServer(void);
 extern _X_EXPORT void
 UnlockServer(void);
 
-extern _X_EXPORT void
-OsInit(void);
-
-extern _X_EXPORT void
-OsCleanup(Bool);
-
-extern _X_EXPORT void
-OsVendorFatalError(const char *f, va_list args)
-_X_ATTRIBUTE_PRINTF(1, 0);
-
-extern _X_EXPORT void
-OsVendorInit(void);
-
-extern _X_EXPORT void
-OsBlockSignals(void);
-
-extern _X_EXPORT void
-OsReleaseSignals(void);
-
-extern void
-OsResetSignals(void);
-
-extern _X_EXPORT void
-OsAbort(void)
-    _X_NORETURN;
-
 extern _X_EXPORT Bool
 PrivsElevated(void);
 
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 344d90d34..0ed392ca2 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -26,6 +26,8 @@
 
 #include <stdlib.h>
 
+#include "os/osdep.h"
+
 #include    <X11/X.h>
 #include    "scrnintstr.h"
 #include    "windowstr.h"
diff --git a/os/connection.c b/os/connection.c
index 9a4a16847..bd46ae68b 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -93,17 +93,15 @@ SOFTWARE.
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 #endif
-
 #include <sys/uio.h>
-
 #endif                          /* WIN32 */
 
 #include "dix/dix_priv.h"
 #include "os/audit.h"
 #include "os/auth.h"
+#include "os/osdep.h"
 
 #include "misc.h"               /* for typedef of pointer */
-#include "osdep.h"
 #include "opaque.h"
 #include "dixstruct.h"
 #include "xace.h"
diff --git a/os/log.c b/os/log.c
index 7e71ff8af..c6869bdbb 100644
--- a/os/log.c
+++ b/os/log.c
@@ -79,20 +79,21 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/Xos.h>
+#include <errno.h>
 #include <stdio.h>
-#include <time.h>
-#include <sys/stat.h>
 #include <stdarg.h>
 #include <stdlib.h>             /* for malloc() */
-#include <errno.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <X11/Xos.h>
+
+#include "os/osdep.h"
 
 #include "os/audit.h"
 #include "os/fmt.h"
 
 #include "input.h"
 #include "opaque.h"
-#include "osdep.h"
 
 #ifdef WIN32
 #include <process.h>
diff --git a/os/osdep.h b/os/osdep.h
index 97e227cfa..7221d112f 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -174,4 +174,18 @@ int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldest);
 extern void (*OsVendorVErrorFProc) (const char *, va_list args)
     _X_ATTRIBUTE_PRINTF(1, 0);
 
+typedef void (*OsSigHandlerPtr) (int sig);
+
+/* install signal handler */
+OsSigHandlerPtr OsSignal(int sig, OsSigHandlerPtr handler);
+
+void OsInit(void);
+void OsCleanup(Bool);
+void OsVendorFatalError(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0);
+void OsVendorInit(void);
+void OsBlockSignals(void);
+void OsReleaseSignals(void);
+void OsResetSignals(void);
+void OsAbort(void) _X_NORETURN;
+
 #endif                          /* _OSDEP_H_ */
diff --git a/os/osinit.c b/os/osinit.c
index 9d4e5bbc2..465b3df14 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -48,14 +48,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
+#include <errno.h>
 #include <stdio.h>
+#include <signal.h>
 #include <X11/X.h>
-#include "os.h"
-#include "osdep.h"
-#include "opaque.h"
 #include <X11/Xos.h>
-#include <signal.h>
-#include <errno.h>
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
 #endif
@@ -64,9 +61,13 @@ SOFTWARE.
 #endif
 
 #include "os/busfault.h"
+#include "os/osdep.h"
 
 #include "misc.h"
 
+#include "os.h"
+#include "opaque.h"
+#include "misc.h"
 #include "dixstruct.h"
 
 #if !defined(SYSV) && !defined(WIN32)
diff --git a/os/utils.c b/os/utils.c
index 9ba84be28..4c5c9e987 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -109,6 +109,7 @@ __stdcall unsigned long GetTickCount(void);
 #include "dix/dix_priv.h"
 #include "os/auth.h"
 #include "os/cmdline.h"
+#include "os/osdep.h"
 
 #include "dixstruct.h"
 #include "xkbsrv.h"
commit 3aa62ca6f0a204e910cbccea4552282d58724d8e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Apr 16 13:47:18 2024 +0200

    os: fix missing include of misc.h in busfault.h
    
    busfault.h is using FALSE, but didn't include misc.h, so it really
    depends on include order whether it works.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>

diff --git a/os/busfault.h b/os/busfault.h
index d31d046fc..0cc5a6d80 100644
--- a/os/busfault.h
+++ b/os/busfault.h
@@ -27,6 +27,8 @@
 
 #include <X11/Xdefs.h>
 
+#include "misc.h"                         /* for TRUE/FALSE */
+
 #ifdef HAVE_SIGACTION
 
 #include <sys/types.h>


More information about the xorg-commit mailing list