Commit Graph

208 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 5c0cbd0f92 os: drop own implementation of strcasecmp() and strncasecmp()
These are POSIX standard since 2001, so shouldn't be needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 7c51bcb093 os: unexport internal logging functions
Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 9a82f5c30b drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 917d8dc207 os: log: drop now meaningless XLOG_FLUSH option
Since we're not indirectly writing via FILE anymore, this option has
become meaningless: it meant flushing out our in-process buffer to
the kernel, but we're now doing direct write() calls anyways.

xf86 still accepts the "flush" config file flag for backwards compatibility,
but it hasn't any practical meaning anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:45 +02:00
Enrico Weigelt, metux IT consult 0180cf39f3 os.h: drop obsolete xallocarray()
This macro isn't used anywhere (also not in drivers), so no need
to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:44 +02:00
Enrico Weigelt, metux IT consult 1cf7b33ab4 os: drop deprecated Xprintf()
Not used anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:54:27 +02:00
Enrico Weigelt, metux IT consult b63b1e60c7 os: drop deprecated XNFvprintf()
Nobody using it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:54:24 +02:00
Enrico Weigelt, metux IT consult 6ddaa0afe9 os: drop deprecated XNFprintf()
Nobody using it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:54:21 +02:00
Enrico Weigelt, metux IT consult 25de3f61a1 os: drop deprecated Xvprintf()
Nobody using it anymore, so no need for keeping it around.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:54:17 +02:00
Enrico Weigelt, metux IT consult c2090c8e04 include: os: add returns_nonnull attribute to XNFalloc/XNFcallocarray
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:20:41 +02:00
Enrico Weigelt, metux IT consult 802a581f51 sdk: add _X_ATTRIBUTE_NONNULL_ARGS() macro
Adding a macro for specifying nonnull attributes, for easier future
transition to new C23 attributes or supporting strange compilers that
don't understand this attribute.

The purpose of using those attributes is aiding compiler warnings and
potential optimizations.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:37 +02:00
Enrico Weigelt, metux IT consult 1dc648b1b7 os: drop unused TimerCheck()
This isn't used anywhere, so can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1789>
2025-02-23 17:46:13 +00:00
Enrico Weigelt, metux IT consult d973c43810 os: unexport SetCriticalOutputPending()
Not used by any drivers/modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1814>
2025-02-23 17:39:18 +00:00
Enrico Weigelt, metux IT consult 804b2c081b os: unexport CloseWellKnownConnections()
Not used by any modules, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult 0d95b53a20 os: unexport ResetWellKnownSockets()
Not used by any modules (and not supposed to be), so should not
be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult dd05532b38 os: unexport CreateWellKnownSockets()
Not used by any modules (and not supposed to be), so should not
be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult 59b39ee6ee os: unexport NotifyParentProcess()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult c9ee4245a2 os: unexport ResetOsBuffers()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult 583dbe832d os: unexport FlushIfCriticalOutputPending()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult be16616715 os: unexport FlushAllOutput()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult c6b223459c os: unexport ResetCurrentRequest()
Not used by any external modules, so no need to keep it in public API.

Since it's used by DRI, still needs the _X_EXPORT flag, as long as DRI
is a dynamically loaded module.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:45 +00:00
Enrico Weigelt, metux IT consult 189a70dfb2 os: unexport InsertFakeRequest()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult ba665948f6 os: unexport WriteFdToClient()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult effe8d66bd os: unexport ReadRequestFromClient()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult 9b0c3c62f2 os: unexport ListenOnOpenFD()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult d637e1d284 os: unexport AddClientOnOpenFD()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult a84ae08526 os: unexport ClientAuthorized()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult c6b8207342 os: unexport AuthorizationIDOfClient()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult 1f27d3d653 os: unexport ClientIsLocal()
Not used by any modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1790>
2025-02-18 10:53:44 +00:00
Enrico Weigelt, metux IT consult 9b3b938ede os: re-add System() function for backwards compat
This function had been unexported long ago, but the Intel driver
still needs it. Adding a tiny temporary compat wrapper, so Intel
team has time to keep up with us.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1778>
2025-02-11 09:53:59 +01:00
Enrico Weigelt, metux IT consult f4eb217f11 os: log: replace VErrorF() by LogVMessageVerb()
Since LogVMessageVerb() is now signal safe, we can use this one instead.
Leaving VErrorF() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult da22bc9ae0 os: log: replace VErrorFSigSafe() by VErrorF()
Since VErrorF() is now signal safe, we can use this one instead.
Leaving VErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult 2d18c353b4 os: log: replace ErrorFSigSafe() by ErrorF()
Since ErrorF() is now signal safe, we can use this one instead.
Leaving ErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult dd37cc4855 os: log: replace LogMessageVerbSigSafe() by LogMessageVerb()
Since LogMessageVerb() is now signal safe, we can use this one instead.
Leaving LogMessageVerbSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult 5962211612 os: log: make LogVMessageVerb() signal safe
We already have our own signal safe vnsprintf() implementation, which is used
for formatting log messages while being in a signal handler, there's no need
to have two separate implementations of all the logging functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult 161c3c8398 os: drop obsolete LogHdrMessage()
This function isn't used anywhere, so no need to keep it around.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1677>
2025-02-06 19:57:52 +00:00
Enrico Weigelt, metux IT consult e5b5b302d3 os: replace LogVWrite() by LogVMessageVerb()
It's just a wrapper around LogVMessageVerb() and no external module
using it, so can easily be optimized-away.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1683>
2024-10-10 17:34:12 +00:00
Enrico Weigelt, metux IT consult c26023a009 os: replace LogWrite() by LogMessageVerb()
It's nothing but a wrapper, doing the same as LogMessageVerb(X_NONE, ...),
and no external module / driver needs it, so can be easily optimized away.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1683>
2024-10-10 17:34:12 +00:00
Enrico Weigelt, metux IT consult 37446b70de os.h: drop unnecessary guard on stdlib.h include
It's a standard C header, that's always present, so no extra guard needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1684>
2024-10-10 17:16:00 +00:00
Enrico Weigelt, metux IT consult 1d7cb4b2c3 os: unexport CloseDownConnection()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1582>
2024-09-02 16:02:39 +00:00
Enrico Weigelt, metux IT consult 811977228b os: unexport screen saver timer functions
These functions aren't supposed to be used by drivers, so move them
out of the public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1583>
2024-09-01 20:23:10 +00:00
Enrico Weigelt, metux IT consult 3d3d148039 os: unexport WaitForSomething()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1584>
2024-09-01 19:53:43 +00:00
Enrico Weigelt, metux IT consult 61233adbca treewide: replace xnfreallocarray macro call by XNFreallocarray()
The xnfreallocarray was added along (and just as an alias to) XNFreallocarray
back a decade ago. It's just used in a few places and it's only saves us from
passing the first parameter (NULL), so the actual benefit isn't really huge.

No (known) driver is using it, so the macro can be dropped entirely.

Fixes: ae75d50395
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1529>
2024-07-26 23:41:33 +00:00
Enrico Weigelt, metux IT consult 6b3c916030 treewide: replace xnfallocarray() calls by XNFreallocarray
The xnfallocarray was added along (and just as an alias to) XNFreallocarray
back a decade ago.

No (known) driver is using it, so the macro can be dropped entirely.

Fixes: ae75d50395
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1529>
2024-07-26 23:41:33 +00:00
Enrico Weigelt, metux IT consult 4773182c72 os: unexport LockServer() and UnlockServer() from public module API
These functions work on server process level, and shouldn't be touched
by drivers at all, thus shouldn't be exported to them.

(couldn't find any driver/module using these symbols)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1320>
2024-07-26 22:26:07 +00:00
Enrico Weigelt, metux IT consult b30edf326b fix missing includes of <X11/Xfuncproto.h>
Several places using _X_ATTRIBUTE_PRINTF macro from X11/Xfuncproto.h
but missing to include it, so it depends on other headers whether it's
included by mere accident, which quickly causes trouble if include order
changes. Cleaning that up by adding explicit include statements.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1580>
2024-07-20 17:18:38 +00:00
Enrico Weigelt, metux IT consult e5c8b664d3 os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1332>
2024-05-08 09:37:35 +02:00
Enrico Weigelt, metux IT consult c17c527b9a os: unexport ForceClockId()
This function is only intended for DDX'es (currently just Xwayland) that
need to force using another clock. Really shouldn't be called by drivers
or extensions.

Fixes: a779fda224
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1333>
2024-04-17 16:20:54 -07:00
Enrico Weigelt, metux IT consult a0b69624f7 os: unexport ListenToAllClients()
It's just called by DIX, not by any drivers/modules, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1387>
2024-04-16 18:23:27 -07:00
Enrico Weigelt, metux IT consult d18ef33099 os: unexport OnlyListenToOneClient()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1385>
2024-04-16 18:13:11 -07:00