From c0dd33aee2204ea36e33225debbea6f98e8c9d91 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 17 Feb 2025 15:44:51 +0100 Subject: [PATCH] os: unexport xstrtokenize() Not used by any external drivers/modules, so no need to keep it public. Since modesetting is using it, still needs _X_EXPORT, as long as it's a module. Signed-off-by: Enrico Weigelt, metux IT consult --- config/hal.c | 2 +- config/udev.c | 1 + hw/xfree86/drivers/modesetting/drmmode_display.c | 3 +++ hw/xfree86/parser/InputClass.c | 3 +++ hw/xfree86/parser/OutputClass.c | 2 ++ include/misc.h | 2 -- os/fmt.h | 4 ++++ os/string.c | 2 ++ test/input.c | 1 + 9 files changed, 17 insertions(+), 3 deletions(-) diff --git a/config/hal.c b/config/hal.c index e9fda38e8..9a838766e 100644 --- a/config/hal.c +++ b/config/hal.c @@ -32,8 +32,8 @@ #include #include "config/hotplug_priv.h" - #include "config/dbus-core.h" +#include "os/fmt.h" #include "input.h" #include "inputstr.h" diff --git a/config/udev.c b/config/udev.c index be317ee99..eef06342c 100644 --- a/config/udev.c +++ b/config/udev.c @@ -30,6 +30,7 @@ #include #include "config/hotplug_priv.h" +#include "os/fmt.h" #include "input.h" #include "inputstr.h" diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 5a5b099ea..80b578b1e 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -33,6 +33,9 @@ #include #include #include + +#include "os/fmt.h" + #include "dumb_bo.h" #include "inputstr.h" #include "xf86str.h" diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c index 004b91a1d..77afbbf19 100644 --- a/hw/xfree86/parser/InputClass.c +++ b/hw/xfree86/parser/InputClass.c @@ -28,6 +28,9 @@ #endif #include + +#include "os/fmt.h" + #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" diff --git a/hw/xfree86/parser/OutputClass.c b/hw/xfree86/parser/OutputClass.c index 4420d7f11..81ff4d6dd 100644 --- a/hw/xfree86/parser/OutputClass.c +++ b/hw/xfree86/parser/OutputClass.c @@ -27,6 +27,8 @@ #include #endif +#include "os/fmt.h" + #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" diff --git a/include/misc.h b/include/misc.h index d5effb4b1..f5784fa18 100644 --- a/include/misc.h +++ b/include/misc.h @@ -224,8 +224,6 @@ padding_for_int32(const int bytes) return ((-bytes) & 3); } -extern _X_EXPORT char **xstrtokenize(const char *str, const char *separators); - /* some macros to help swap requests, replies, and events */ #define LengthRestS(stuff) \ diff --git a/os/fmt.h b/os/fmt.h index 6edf1a5af..876c24e0c 100644 --- a/os/fmt.h +++ b/os/fmt.h @@ -6,6 +6,7 @@ #define _XSERVER_OS_FMT_H #include +#include void FormatInt64(int64_t num, char *string); void FormatUInt64(uint64_t num, char *string); @@ -34,4 +35,7 @@ version_compare(uint32_t a_major, uint32_t a_minor, return 0; } +/* still needed as long as modesetting is a module */ +_X_EXPORT char **xstrtokenize(const char *str, const char *separators); + #endif /* _XSERVER_OS_FMT_H */ diff --git a/os/string.c b/os/string.c index f0e34e40b..fa083d20b 100644 --- a/os/string.c +++ b/os/string.c @@ -8,6 +8,8 @@ #include #include +#include "os/fmt.h" + #include "os.h" char * diff --git a/test/input.c b/test/input.c index 39057c828..063db31e1 100644 --- a/test/input.c +++ b/test/input.c @@ -38,6 +38,7 @@ #include "dix/exevents_priv.h" #include "dix/input_priv.h" #include "mi/mi_priv.h" +#include "os/fmt.h" #include "misc.h" #include "resource.h"