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>
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]);
| ^
On NetBSD gives warning:
../hw/xfree86/common/xf86Configure.c: In function ‘xf86AddBusDeviceToConfigure’:
../hw/xfree86/common/xf86Configure.c:125:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
125 | for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/common/xf86pciBus.c:35:
../hw/xfree86/common/xf86pciBus.c: In function ‘xf86ParsePciBusString’:
../hw/xfree86/common/xf86pciBus.c:286:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
286 | if (!isdigit(d[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:293:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
293 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:307:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
307 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:320:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
320 | if (!isdigit(p[i])) {
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/common/xf86Option.c:39:
../hw/xfree86/common/xf86Option.c: In function ‘xf86NormalizeName’:
../hw/xfree86/common/xf86Option.c:915:25: warning: array subscript has type ‘char’ [-Wchar-subscripts]
915 | if (isupper(*p))
| ^
../hw/xfree86/common/xf86Option.c:916:32: warning: array subscript has type ‘char’ [-Wchar-subscripts]
916 | *q++ = tolower(*p);
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/common/xf86Bus.c:36:
../hw/xfree86/common/xf86Bus.c: In function ‘StringToBusType’:
../hw/xfree86/common/xf86Bus.c:270:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
270 | if (isdigit(busID[0])) {
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These are only used inside xkb.c, nowhere else, so no need to
keep them in public header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
systemd is linux specific and the actual implementation is under the
os-support layer of xfree86 ddx. Thus no need to keep it in global
include directory, putting it onto the linux specific os-support instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
DEV_MEM define isn't used by any drivers, and BSD seems to be the only
platform using /dev/pmem instead of /dev/mem - as well as the DEV_MEM
define from xf86_OSlib.h (Linux uses the symbol, but defines on its own)
Therefore, just define it where actually used and drop it from the global
xf86OSlib.h file.
Note that /dev/pmem refers to physical memory, not to be mixed up with
Linux's persistent memory subsys, which uses /dev/pmem[N] device nodes.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Public server module API shouldn't be clobbered with private definitions,
thus move them out to private header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Doing so that struct OdevAttributes doesn't need to be exposed to
drivers anymore. It really doesn't seem to be a hot path, so not
inlining anymore shouldn't have any practical performance impact.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Resolve conflicts with OS headers definining IOBASE by renaming the
IOBASE enum value to XF86_TOKEN_IOBASE.
This way, don't need the special #undef hack anymore.
Resolve name conflict with Sun's <sys/kbd.h> by renaming STRING enum
value to XF86_TOKEN_STRING.
This way, don't need the special #undef hack anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These have been forgotten on some major cleanup back almost two decades ago.
(Daniel dropped a lot of dead code, which already had been removed earlier
but merged back accidentially).
Didn't look further back on where exactly they had become obsolete - being
unused for decades should be enough justification for dropping.
Fixes: 81913a1291
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The only consumer seems to be one BSD specific file, the few drivers using
the *_iopl seem to include it on their own. Thus, no need to keep it in
public headers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These only had been used by xf86-video-chips, but meanwhile this
defines them on it's own, so we can drop them from here now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The symbol controls whether to include dix-config.h, and it's always set,
thus we don't need it (and dozens of ifdef's) anymore.
This commit only removes them from our own source files, where we can
guarantee that dix-config.h is present - leaving the (potentially exported)
headers untouched.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's not good having the public server api headers clobbered with private
definitions, so cleaning them up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
There's no need to include client.h anymore. But still leaving it, in case
some external consumer relying on it's presence.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The client.h file is part of the public module API, but it also contains
definitions that aren't useful for being used in modules. Splitting them
out into their own client_priv.h file, which isn't part of the API.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xorg-server.pc missed a few dependencies, so consumers might not
get them and break build.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On SunOS, the BSD socket API as well as hostname lookups isn't
implemented in libc, but separate libraries. We need to link them
explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Several feature defines need to be set before including system headers,
otherwise build breaks:
> /usr/include/X11/Xtrans/Xtranssock.c: In function '_XSERVTransSocketRead':
> /usr/include/X11/Xtrans/Xtranssock.c:2161:14: error: 'struct msghdr' has no member named 'msg_control'
> 2161 | .msg_control = cmsgbuf.buf,
> | ^~~~~~~~~~~
> /usr/include/X11/Xtrans/Xtranssock.c:2162:14: error: 'struct msghdr' has no member named 'msg_controllen'
> 2162 | .msg_controllen = CMSG_LEN(MAX_FDS * sizeof(int))
> | ^~~~~~~~~~~~~~
>
> ../os/access.c:339:14: error: implicit declaration of function 'asprintf'; did you mean 'Xasprintf'? [-Werror=implicit-function-declaration]
> 339 | length = asprintf(addr, "%s%c%s", type, delimiter, value);
> | ^~~~~~~~
> | Xasprintf
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This file isn't included by any driver - not even indirectly, and hard
to imagine any driver ever needs it, so no need to keep it installed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>
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>
This isn't needed by any external module, so no need to export it.
And those flags are better off in the corresponding extension,
instead of the OS layer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This isn't needed by any external module, so no need to export it.
And those flags are better off in the corresponding extension,
instead of the OS layer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>