26 Commits

Author SHA1 Message Date
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
449327f68f os: xtrans: drop own struct iovec definition on win32
We don't need our own `struct iovec` definition on win32/mingw anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
e46f51cee9 os: xtrans: drop now obsolete _XSERVTransWritev()
_XSERVTransWritev() isn't used anymore, so no need to keep it.

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
d5dda483cb os: xtrans: replace _XSERVTransGetHostname() by xhostname()
Now that we have the OS layer xhostname() wrapper, we don't need the
_XSERVTransGetHostname() function anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
fe795fa7b8 os: generic socket layer init function
Reduce the ifdef-zoo a bit by moving win32 specific socket layer init
into a separate function (that's no-op on non-win32).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:40:35 +02:00
Enrico Weigelt, metux IT consult
2353d7a710 os: xtrans: replace _XSERVTransSetOption() by _XSERVTransNonBlock()
The only option left is TRANS_NONBLOCKING, and we only enable and
never disable it. Thus trim down the code into one function for
exactly that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:30:52 +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
90d0c2d4a0 os: xtrans: drop unused TRANS_CLOSEONEXEC
Not used anywhere, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:23:27 +02:00
Enrico Weigelt, metux IT consult
4ee55d09b0 os: xtrans: fix _XSERVTransWSAStartup() prototype
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 09:56:31 +02:00
Enrico Weigelt, metux IT consult
f5062223ec os: xtrans: fix calloc overflow warning
The size of `int` is machine specific and may be 64 bits wide, which could
overflow the calloc'able size. Practically cannot happen here, since the
ListenTransCount can't go above MAX_CONNECTIONS, but compiler can't know
that and so spitting out a warning.

Using uint32_t really is sufficient here.

> ../os/connection.c: In function ‘CreateWellKnownSockets’:
> ../os/connection.c:274:22: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
>   274 |     ListenTransFds = calloc(ListenTransCount, sizeof(int));
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +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
689351067c os: xtrans: drop GetReopenInfo()
Not used anywhere, so no need to keep it around 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
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
4ca4c167ff os: xtrans: drop XIM_t
Not defined 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
882d4d440a os: xtrans: drop FS_t
Not defined anywhere, so no need to keep it around 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
18a459340c os: xtrans: drop FONT_t
Not used anywhere, so no need to keep it around 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
8df9d118a0 os: xtrans: drop ICE_t
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
a9973073c0 os: xtrans: drop GetMyNetworkId()
Not used anywhere, so lets drop it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
9156f28be1 os: xtrans: drop unused GetPeerNetworkId()
Not used anywhere, so let's drop it.

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