FlushClient() does drops the output buffer, when it becomes empty.
This previously wasn't any problem and actually intented, because we've
returned from the write path directly after FlushClient() was called.
But now we've changed the call order, so it's called from within
OutputBufferMakeRoom(), so we need to make sure we always got valid
output buffer before trying to access it.
For the future, we should think about whether dropping output buffers
really makes sense at all. Instead we could leave them as they are
(over the client's lifetime) and maybe just trim when they've went
too big.
Fixes: 1c13cfa6ca
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Reducing the ifdef-zoo a bit by moving the platform specific socket
close calls into separate function. On win32, this also checks the
retval and potentially query for error. On Unix, just calling close().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Reducing the ifdef-zoo a bit by moving the platform specific socket
ioctl calls into separate function. On win32, this also checks the
retval and potentially query for error. On Unix, just calling ioctl().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>
This will be needed by Xfbdev's keyboard driver, which cannot work
with input threads yet.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Both types are already binary equal: both are enums using the same bit values,
but from compiler's perspective they're still different types, so it's warning.
> ../glamor/glamor_trapezoid.c:123:47: warning: implicit conversion from
> enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different
> enumeration type 'pixman_format_code_t' [-Wenum-conversion]
> 123 | image = pixman_image_create_bits(picture->format,
> | ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~^~~~~~
> 1 warning generated.
The PICT_* fields, values and macros are relics from pre-pixman days (pixman,
historically, essentially is the PICT_* stuff moved out to separate library)
This has been a practical way for doing the transition from the old internal
PICT_* code to pixman. Now it's time to finish it all up and drop the extra
glue layer.
In order to make it smooth, and also providing backwards compatibility for
drivers (until they all keep up), just aliasing the types and adding #define's
for the enum values.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
All source files need to include it anyways, so no need to include it here,
and neither having an extra check for HAVE_DIX_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The authProto field always is assigned to dynamically allocated buffer
(strdup()'ed) and needs to be freed sometimes, so cannot be const.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The epoll-shim dependency did not get detected on FreeBSD,
because of missing prefix and dependency arguments in has_function()
call in include/meson.build.
Also added the path of epoll-shim headers include directory
(/usr/local/include/libepoll-shim/) to the compiler include search
paths for proper detection and build.
Signed-off-by: b-aaz <b-aazbsd@proton.me>
A socket() call either returns a valid socket fd or -1, there's no need for
trying to check whether the returned fd is out of the OS's allowed range
of fd's, because if it would, the kernel would return error anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
some bit better naming for config symbols.
Yet leaving the old one defined, until all drivers have kept up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
../glx/indirect_table.c
In file included from ../glx/indirect_table.c:28:
In file included from ../glx/glxserver.h:66:
../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition]
33 | typedef struct __GLXscreen __GLXscreen;
| ^
../glx/glxscreens.h:113:28: note: previous definition is here
113 | typedef struct __GLXscreen __GLXscreen;
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On FreeBSD the ALIGN macro already exists in the standard headers,
so we sholdn't redefine it here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>