Enrico Weigelt, metux IT consult
f1aebe0a3e
miext: move over extinit_priv.h from include
...
Since most of the extension init logic (and on/off switches for them)
is driven from miext, this seems the appropriate place for the header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-24 14:55:06 +01: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
6c88eb0cc4
misc.h: unexport compare_version()
...
Not used by any external modules, so no need to keep it in public header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1807 >
2025-02-18 11:17:40 +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
346d5f5c35
os: move BUG_*() macros to own private header
...
These macros aren't used by any external modules, so no need
to keep them public. Moving them into private header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1804 >
2025-02-17 19:32:48 +00:00
Enrico Weigelt, metux IT consult
6c24e53a89
os: drop upstart specific SIGSTOP signaling logic
...
Upstart is long dead, discontinued a decade ago, so there's no
need to keep around a special signaling logic just for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1791 >
2025-02-14 14:25:28 +01:00
Enrico Weigelt, metux IT consult
5b6f2292a3
os: drop win32-only System() function
...
Not used anymore, so it can be dropped.
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
Randy Palamar
5677de586f
os/osinit: fix build when execinfo.h is missing
...
HAVE_BACKTRACE gets set on systems with libunwind however
execinfo.h may be missing (on *BSD or musl for example).
HAVE_EXECINFO_H has been defined by the build system for a long
time but previously not used.
Signed-off-by: Randy Palamar <randy@rnpnr.xyz >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1207 >
2025-02-08 15:22:29 +00:00
Enrico Weigelt, metux IT consult
8e8bf63908
os: move AbortServer() to os/utils.c
...
This function doesn't much to do with logging, except for being
called once by FatalError(). It's better placed in utils.c
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1678 >
2025-02-07 18:45:35 +01:00
Doug Johnson
e0588d2110
os: backtrace: Fix -Wincompatible-pointer-types compiler error on 32-bit targets
...
```
../os/backtrace.c: In function ‘print_registers’:
../os/backtrace.c:94:52: error: passing argument 3 of ‘_ULarm_get_reg’ from incompatible pointer type [-Wincompatible-pointer-types]
94 | ret = unw_get_reg(&cursor, regs[i].regnum, &val);
| ^~~~
| |
| uint64_t * {aka long long unsigned int *}
```
Switched to libunwind's un_word_t type and PRIxPTR fprintf fmt specification
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1763 >
2025-02-07 16:58:02 +02:00
Enrico Weigelt, metux IT consult
e3cbde9914
include: unexport no*Extension flags
...
Most of these flags aren't used by any drivers, so no need to keep them
exported. Only three exceptions: composite, Panoramix/Xinerama and Xv.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1519 >
2025-02-07 12:00:58 +01:00
Enrico Weigelt, metux IT consult
356e18dcc6
os: move out extension disable flags to corresponing extensions
...
The OS abstraction isn't really the right place for those flags,
they are're probably better off in their corresponding extensions.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1519 >
2025-02-07 12:00:53 +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
9652bc73e2
xwin: drop duplicate OsVendorVErrorF()
...
It really doesn't seem to be necessary to protect a LogVMessageVerb()
call by extra mutex on windows only, while obviously not needed on
any other platform.
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
71b8953597
os: log: consolidate log formatting functions
...
Simplify log formatting functions and remove redundancies, e.g.:
* common function for line termination
* copy prefix directly instead of *printf'ing it
* now just exactly one LogSWrite() call per message
(good for other log targets like syslog)
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
f5fe8a6379
os: log: drop unused variables
...
Drop some unneeded variabes, whose values can be computed at compile-time.
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:26 +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
fb696a7d7b
rename old symbol PANORAMIX to XINERAMA
...
PANORAMIX was the original working title of the extension, before it became
official standard. Just nobody cared about fixing the symbols to the official
naming.
For backwards compatibility with drivers, the old PANORAMIX symbol will
still be set.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1258 >
2025-02-06 15:51:27 +00:00
Alan Coopersmith
6cc358dfb4
os: if inet_ntop() is available, use it for IPv4 addresses as well
...
Support for using inet_ntop() was originally added to support IPv6,
and only used for IPv6 addresses in AuthAudit(). Two decades later,
support for inet_ntop() is ubiquitous and OS'es have marked inet_ntoa()
as deprecated, so use the modern interface for IPv4 as well now.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1760 >
2025-01-27 22:34:51 +00:00
Alan Coopersmith
2ffe0f8a35
os: if getaddrinfo() is available, use it, even if IPv6 support is disabled
...
Support for using getaddrinfo() was originally added to support IPv6,
and only used if IPv6 support was enabled. Two decades later, support
for getaddrinfo() is ubiquitous and OS'es have marked gethostbyname()
as deprecated, so use the modern interface whenever we can now.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1760 >
2025-01-27 22:34:51 +00:00
Olivier Fourdan
080fb49eff
os/connection: Make sure partial is initialized
...
Following the change in Xtrans 1.5 that allows for partial connections
to succeed, we need to make sure partial is properly initialized at
first, otherwise we rely on an uninitialized variable.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Suggested-by: Twaik Yont <twaikyont@gmail.com >
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1783
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1765 >
2025-01-17 08:24:19 +00:00
Alan Coopersmith
45c485bfdf
dix: Use __builtin_popcountl if available to replace Ones()
...
If the compiler knows of a better algorithm for counting the number of
bits set in a word for the target CPU, let it use that, instead of the
classic algorithm optimized for PDP-6.
Based on xorg/lib/libxext@490a25e6f8a4d2482af4364c700b68ad11a4d10b
v2: make old version static inline, stop exporting after !1695
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1674 >
2024-10-26 10:04:13 -07:00
Enrico Weigelt, metux IT consult
1642adec3b
dix: unexport Ones()
...
It's not used by any module/driver, 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/1695 >
2024-10-26 16:35:57 +00:00
Alan Coopersmith
b306df5a60
os: NextDPMSTimeout: mark intentional fallthroughs in switch
...
The comment at the top of the function tells humans the fallthroughs
are intentional, but gcc doesn't parse that.
Clears 3 -Wimplicit-fallthrough warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1716 >
2024-10-11 22:20:16 +00:00
Enrico Weigelt, metux IT consult
27a5c59180
os: drop redefining getpid() on mingw32
...
mingw32 does does have getpid() function, so conditionally redefining
it to _getpid() isn't necessary.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1686 >
2024-10-10 17:55:56 +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
d43d346541
os: log: use localtime_r() on mingw builds
...
MingW also provides localtime_r(), but needs _POSIX_THREAD_SAFE_FUNCTIONS
symbol before including anything, in order for the prototype being defined.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1685 >
2024-10-10 16:58:01 +00:00
Enrico Weigelt, metux IT consult
bb9953db3f
os: utils: fix char signess mismatch
...
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../include/misc.h:174,
from ../os/utils.c:75:
../os/utils.c: In function ‘VerifyDisplayName’:
../os/utils.c:624:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
624 | if (!isdigit(d[i])) {
| ^
../os/utils.c: In function ‘ProcessCommandLine’:
../os/utils.c:942:44: warning: array subscript has type ‘char’ [-Wchar-subscripts]
942 | if ((i + 1 < argc) && (isdigit(*argv[i + 1])))
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455 >
2024-10-10 13:56:05 +00:00
Enrico Weigelt, metux IT consult
9446ae487c
os: access: fix char signess mismatch
...
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../include/misc.h:174,
from ../os/access.c:96:
../os/access.c: In function ‘ResetHosts’:
../os/access.c:981:49: warning: array subscript has type ‘char’ [-Wchar-subscripts]
981 | lhostname[i] = tolower(ohostname[i]);
| ^
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455 >
2024-10-10 13:56:05 +00:00