22 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
7ba4f6a2b6 os: xtrans: define trans_mkdir() when UNIXCONN is enabled
trans_mkdir() is needed for unix sockets, so the correct switch is
UNIXCONN, instead of WIN32.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-13 15:46:11 +01:00
Enrico Weigelt, metux IT consult
3d742db3a9 os: xtrans: declare trans_mkdir() static function only if needed
Win32/mingw32 doesn't need it, so compiler warns on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 13:47:24 +01:00
Enrico Weigelt, metux IT consult
7389686d6d os: xtrans: drop status pointer from *Accept() functions
Nobody's ever looking at this value, so no need to keep it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 13:47:15 +01:00
Enrico Weigelt, metux IT consult
e1d372db70 os: xtrans: drop unused _XSERVTransBytesReadable()
Not used anywhere, so no need to keep it around anymore.
Also dropping the BytesReadable vector, which is unused now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 15:53:57 +02:00
Enrico Weigelt, metux IT consult
c9ac063793 os: xtrans: rename Writev() methods to Write()
The Writev() methods essentially became Write() now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
3c5caa1ba0 os: xtrans: drop old Write() methods
Since everything's running via Writev() methods now, the now unused Write()
methods can all be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
a52ac4fb26 os: xtrans: replace _XSERVTransWriteV()
Now that all WriteV() methods are operating on single buffer instead ofiovec's,
we don't need the complicated _XSERVTransWriteV() anymore, but instead can
write directly to the socket/fd.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
c079ad54fb os: xtrans: let Writev() methods accept just one buffer instead of iovec
Since they're only called with a one-element iovec, we can use a single
buffer pointer straight away, thus making it quite the same as the old
Write() methods.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
b738a28098 os: xtrans: simplify _XSERVTransWriteV()
Refactor _XSERVTransWriteV() to call write() on Unix and instead drop
the WRITEV() macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
26c2df04e9 os: use size_t as iov length parameter xtrans writev{,v}
struct msghdr is using size_t as for iov_length, so match up with it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:14:04 +02:00
stefan11111
81770d7315 os: use ssize_t in xtrans write{,v}
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-11 20:14:04 +02:00
Enrico Weigelt, metux IT consult
399c51bb6d os: xtrans: drop _XSERVTransReadv() et al
It's not used anywhere, so no need to keep it around anymore.
We can also dispose the corresponding connection driver's procs here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:09:37 +02:00
Enrico Weigelt, metux IT consult
d1bb5dc457 os: xtrans: expand TRANS() macro to _XSERVTrans
Since TRANS() now will always expand the same, it's better for
maintenance, having the function names written explicitly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
03653eb403 os: xtrans: drop TRANS_CLIENT code pathes
Not needed in server-only code base.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
a830e4eff5 os: xtrans: drop XSERV_t and x11_t defines
These are always enablde (x11_t is defined when XSERV_t is defined),
so no need for the #ifdef's anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
499751751d os: xtrans: drop ifdef TRANS_REOPEN
It's always defined, so the guards aren't necessary.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
b17fe4128b os: xtrans: drop ifdef TRANS_SERVER
it's always defined, no extra guards needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
1f49e6ae8f os: xtrans: drop NEED_UTSNAME
All our supported platforms have this utsname.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
fb5f76f856 os: xtrans: drop _WILLWINSOCK_
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
214e1c0ca1 os: xtrans: drop own VErrorF() and ErrorF()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
d5d19ac6f0 os: use internal xtrans instead of external library
Now that we've got xtrans bundled in our source tree, use this one and
drop the external dependency.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/691
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
cd81370e9d os: incorporate xtrans xtrans-1.6.0
Copy over from xtrans package, tag xtrans-1.6.0

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00