From 5cdfe6e5abf88d7b3f12e70ac553aea5f4b02ef9 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 23 Sep 2025 12:55:34 +0200 Subject: [PATCH] os: move `enum ExitCode` into private header Not used by any external drivers, so no need to keep it public. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/common/xf86_priv.h | 1 + include/os.h | 7 ------- os/ddx_priv.h | 3 ++- os/log_priv.h | 2 +- os/osdep.h | 7 +++++++ 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/common/xf86_priv.h b/hw/xfree86/common/xf86_priv.h index be01c40f99..c51407d5a3 100644 --- a/hw/xfree86/common/xf86_priv.h +++ b/hw/xfree86/common/xf86_priv.h @@ -5,6 +5,7 @@ #ifndef _XSERVER_XF86_PRIV_H #define _XSERVER_XF86_PRIV_H +#include "os/osdep.h" #include "xf86.h" extern Bool xf86DoConfigure; diff --git a/include/os.h b/include/os.h index d63ac190e4..13febb3320 100644 --- a/include/os.h +++ b/include/os.h @@ -215,13 +215,6 @@ typedef struct { /* stuff for FlushCallback */ extern _X_EXPORT CallbackListPtr FlushCallback; -enum ExitCode { - EXIT_NO_ERROR = 0, - EXIT_ERR_ABORT = 1, - EXIT_ERR_CONFIGURE = 2, - EXIT_ERR_DRIVERS = 3, -}; - extern _X_EXPORT int TimeSinceLastInputEvent(void); diff --git a/os/ddx_priv.h b/os/ddx_priv.h index 5fd584c39e..9ef4d64687 100644 --- a/os/ddx_priv.h +++ b/os/ddx_priv.h @@ -5,7 +5,8 @@ #ifndef _XSERVER_OS_DDX_PRIV_H #define _XSERVER_OS_DDX_PRIV_H -#include "os.h" +#include "include/os.h" +#include "os/osdep.h" /* callbacks of the DDX, which are called by DIX or OS layer. DDX's need to implement these in order to handle DDX specific things. diff --git a/os/log_priv.h b/os/log_priv.h index b86555a77e..562ea9defc 100644 --- a/os/log_priv.h +++ b/os/log_priv.h @@ -5,7 +5,7 @@ #ifndef __XORG_OS_LOGGING_H #define __XORG_OS_LOGGING_H -#include "include/os.h" +#include "os/osdep.h" /** * @brief initialize logging and open log files diff --git a/os/osdep.h b/os/osdep.h index 30224a7409..b4a393e055 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -234,4 +234,11 @@ static inline size_t x_safe_strlen(const char *str) { return (str ? strlen(str) : 0); } +enum ExitCode { + EXIT_NO_ERROR = 0, + EXIT_ERR_ABORT = 1, + EXIT_ERR_CONFIGURE = 2, + EXIT_ERR_DRIVERS = 3, +}; + #endif /* _OSDEP_H_ */