Commit Graph

18911 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult dc3ffbb510 wip 2024-06-29 17:10:42 +02:00
Enrico Weigelt, metux IT consult 68f1039aab wip 2024-06-29 16:20:58 +02:00
Enrico Weigelt, metux IT consult 29fc049907 xnest: move screen saver window list into XnestScreenRec
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 15:05:57 +02:00
Enrico Weigelt, metux IT consult a2c656c968 xnest: record ScreenPtr in XnestScreenRec structure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 15:00:47 +02:00
Enrico Weigelt, metux IT consult 4e81519e99 xnest: introduce Xnest screen private structure
Since we've got lots of per-screen information spread across several arrays,
and for future features (eg. mult-upstream support) yet more to come, it's
time to consolidate into a per-screen private structure.

Initially just moving the upstream root window ID into it - others follwing
by subsequent patches. Leaving it as a global array and not assigning
private data to Screen structure yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 15:00:44 +02:00
Enrico Weigelt, metux IT consult 44f33ec12c bsd: drop PCCONS support
The old PCCONS driver only seems to be used on minimal install disks and
cannot coexist with newer ones, so there's probably no practical use case for
supporting it in Xorg anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 8e8e4e5efe os: replace GenerateRandomData() by custom arc4random_buf() on platforms that missing it
arc4random_buf() is a pretty standard libc function on Unix'oid platforms,
but not all our targets have it, thus we need a fallback there. Currently we
have GenerateRandomData(), which either just wraps arc4random_buf() or provides
some fallback implementation.

For those cases it's easier to just implement missing functions directly
instead of having custom wrapper functions. So, drop GenerateRandomData()
in favor of arc4random_buf() and provide fallback implementation for where
it is missing.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult da2ab7cef5 Xnest: drop hackish Xnest.h
Now that Xserver's GC struct has been renamed not to conflict with Xlib
anymore, we can drop the ridiculous include hacks and drop Xnest.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 0c87d592ef Xnest: drop xnest-config.h
Xnest now is the only consumer of xnest-config.h, but here
dix-config is enough (doesn't use anything from xkb-config.h),
so this file can be dropped now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult c8c01b037e Xnest: tidy up extension blacklisting in miinitext.c
The DDX'es sometimes need to disable certain extensions. Instead of complex
include cascades with ifdef'ed ddx-specific include from dix code, it's
more clean to add some clear and explicit knobs set by the DDX'es individual
meson.build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 70d08b2909 os: don't include client.h anymore
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult fd4673b91a (submit/os-screensaver) os: unexport screen saver timer functions
These functions aren't supposed to be used by drivers, so move them
out of the public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult d6a144694c (submit/rename-panoramix-sym) 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.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 6402d03746 (submit/dix_typedef_fixes) dix: fix duplicate typedef of CallbackListPtr
fix warning on duplicated typedef:

> In file included from ../dix/main.c:86:
> ../dix/callback_priv.h:10:31: warning: redefinition of typedef 'CallbackListPtr' is a C11 feature [-Wtypedef-redefinition]
> typedef struct _CallbackList *CallbackListPtr;
>                               ^
> ../include/callback.h:60:31: note: previous definition is here
> typedef struct _CallbackList *CallbackListPtr;  /* also in misc.h */
>                               ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult babd40a157 (submit/dix_typedef_fixes) dix: fix duplicate typedef of MotionTracker and *MotionTrackerPtr
fix warning on duplicate typedef:

> In file included from ../hw/xfree86/common/xf86Xinput.c:59:
> ../dix/ptrveloc_priv.h:33:3: warning: redefinition of typedef 'MotionTracker' is a C11 feature [-Wtypedef-redefinition]
> } MotionTracker, *MotionTrackerPtr;
>   ^
> ../include/ptrveloc.h:54:31: note: previous definition is here
> typedef struct _MotionTracker MotionTracker, *MotionTrackerPtr;
>                               ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 8a8baad185 (submit/dix_typedef_fixes) dix: fix duplicate typedef of PointerAccelerationProfileFunc
fix warning:

> ../dix/ptrveloc_priv.h:20:18: warning: redefinition of typedef 'PointerAccelerationProfileFunc' is a C11 feature [-Wtypedef-redefinition]
> typedef double (*PointerAccelerationProfileFunc)
>                  ^
> ../include/ptrveloc.h:50:18: note: previous definition is here
> typedef double (*PointerAccelerationProfileFunc)
>                  ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult b085cab306 (submit/dix_typedef_fixes) dix: fix duplicate typedef of *ScreenPtr
fix warning:

> In file included from ../hw/xfree86/common/xf86Init.c:53:
> In file included from ../include/input.h:51:
> ../include/screenint.h:55:25: warning: redefinition of typedef 'ScreenPtr' is a C11 feature [-Wtypedef-redefinition]
> typedef struct _Screen *ScreenPtr;
>                         ^
> ../dix/screenint_priv.h:11:25: note: previous definition is here
> typedef struct _Screen *ScreenPtr;
>                         ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 0e9dfc52b6 (submit/extDevReason) xkb: drop unused variable extDevReason
fix warning on unused variable:

> ../xkb/xkb.c:3576:18: warning: variable 'extDevReason' set but not used [-Wunused-but-set-variable]
>     unsigned int extDevReason;
                 ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 851b10a917 (submit/drop-cygwin) drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult e0d55b9117 (submit/xnest-gcrec) fix name clash on 'GC' between Xlib and Xserver
Both xlib as well as the Xserver use the same identifier "GC" for
different types. While on xlib it's just the numerical ID of a GC,
the xserver defines a struct for it by the same name. This is this
ugly and needs ridiculous hacks for Xserver code that needs xlib.

Easy to solve by just renaming the GC typedef to GCRec (consistent
with how we're naming other structs) and replacing GC* by GCPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult d5e35c91da (submit/unexport-xistub) include: unexport XIstubs.h
The functions declared here aren't used by any driver, so no need to keep
them in the public driver API. Since the whole file isn't included by anybody
outside the xserver tree itself, it doesn't need to be installed at all,
so making it internal and move it to Xi directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult a52304f250 (submit/bsd-defines) xfree86: os-support: move including machine/sysarch.h out of public header
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult f61464a794 (submit/xnest-expose-events) Xnest: fix resending expose events
Based on bug report by François Ouellet:
https://gitlab.freedesktop.org/xorg/xserver/-/issues/132

> Expose Events are sent with bad coordinates.  Using xtrace, I see lines like this one :
>
>   000:>:0436: Event Expose(12) window=0x00200023 x=65535 y=65533 width=1 height=3 count=0x0000
>
> and the application in the Xnest ignores it.
>
> If I apply the attached patch, it seems to work fine (for me).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 6d84f596e2 (submit/unexport-CloseDownConnection) os: unexport CloseDownConnection()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 3ba3a3ef9e (submit/unexport-ddx-callbacks) os: rename ddx.h to ddx_priv.h
Make it clear that stuff from this file really isn't supposed to be used
by dynamically loaded modules like drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 3cd8b1bcfb (submit/unexport-ddx-callbacks) os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 1f2c8b15d7 (submit/cmdline-funcs) os: unexport command line args handling functions
These functions shouldn't be called by drivers or extensions, thus
shouldn't be exported. Also moving it to separate header, so the
already huge ones aren't cluttered with even more things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult bedb2e0775 (submit/xnest-64bit-hack) Xnest: drop hack for building 32bit server against 64bit libs
Xnest.h contains a weird historical hack for building 32bit server with 64bit
libraries. It redeclares a bunch of stanard X types (eg. from Xdefs.h) to
32 bit size. Those hacks are ugly to maintain and can easily cause trouble
(eg. if include order gets mixed up). And it's not at all needed anyways.

Those kind of situations are easily solved, in a much more robust way:
just run build the build it in a chroot or container, or do a pretty
boring usual crosscompile.

No need to carry special hacks for things that already done out-of-the-box
by proper tooling / build environment.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult c9c21a771d (submit/xnest-HAVE_XNEST_CONFIG_H) Xnest: drop obsolete ifdef HAVE_XNEST_CONFIG_H
These files are always compiled w/ HAVE_XNEST_CONFIG_H and always
need to include this file, so the ifdef can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult db9c57609f (submit/fix-char-signedness) xkb: xkbInit: fix char signess mismatch
On NetBSD gives warning:

../xkb/xkbInit.c: In function ‘XkbProcessArguments’:
../xkb/xkbInit.c:778:57: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  778 |             if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
      |                                                         ^
../xkb/xkbInit.c:782:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  782 |                 if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
      |                                                             ^
../xkb/xkbInit.c:792:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  792 |                 if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
      |                                                             ^
../xkb/xkbInit.c:799:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  799 |                 if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
      |                                                             ^
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 7b0d66279a (submit/fix-char-signedness) xkb: xkbtext: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../xkb/xkbtext.c:32:
../xkb/xkbtext.c: In function ‘XkbAtomText’:
../xkb/xkbtext.c:94:44: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   94 |             if ((tmp == rtrn) && (!isalpha(*tmp)))
      |                                            ^
../xkb/xkbtext.c:96:31: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   96 |             else if (!isalnum(*tmp))
      |                               ^
../xkb/xkbtext.c: In function ‘XkbIMWhichStateMaskText’:
../xkb/xkbtext.c:470:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  470 |                 buf[len + 9] = toupper(buf[len + 9]);
      |                                           ^
../xkb/xkbtext.c: In function ‘XkbControlsMaskText’:
../xkb/xkbtext.c:532:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  532 |                 buf[len + 3] = toupper(buf[len + 3]);
      |                                           ^
../xkb/xkbtext.c: In function ‘XkbStringText’:
../xkb/xkbtext.c:563:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  563 |         if (!isprint(*in)) {
      |                      ^
../xkb/xkbtext.c:584:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  584 |         if (isprint(*in))
      |                     ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 0fba2895dd (submit/fix-char-signedness) 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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 15ee3cc61f (submit/fix-char-signedness) 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]);
      |                                                 ^
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult c2389c32db (submit/fix-char-signedness) xfree86: parser: scan: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/parser/scan.c:58:
../hw/xfree86/parser/scan.c: In function ‘xf86getToken’:
../hw/xfree86/parser/scan.c:343:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  343 |         else if ((c == ',') && !isalpha(configBuf[configPos])) {
      |                                                  ^
../hw/xfree86/parser/scan.c:346:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  346 |         else if ((c == '-') && !isalpha(configBuf[configPos])) {
      |                                                  ^
../hw/xfree86/parser/scan.c: In function ‘xf86nameCompare’:
../hw/xfree86/parser/scan.c:1031:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1031 |     c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                   ^
../hw/xfree86/parser/scan.c:1031:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1031 |     c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                                  ^
../hw/xfree86/parser/scan.c:1032:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1032 |     c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                   ^
../hw/xfree86/parser/scan.c:1032:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1032 |     c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                                  ^
../hw/xfree86/parser/scan.c:1042:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1042 |         c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                       ^
../hw/xfree86/parser/scan.c:1042:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1042 |         c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                                      ^
../hw/xfree86/parser/scan.c:1043:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1043 |         c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                       ^
../hw/xfree86/parser/scan.c:1043:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1043 |         c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 2c0013f869 (submit/fix-char-signedness) xfree86: common: xf86Configure: fix char signess mismatch
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 77c5c76fae (submit/fix-char-signedness) xfree86: common: xf86pciBus: fix char signess mismatch
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 4adbe5c698 (submit/fix-char-signedness) xfree86: common: xf86Option: fix char signess mismatch
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 55e7efa907 (submit/fix-char-signedness) xfree86: common: xf86Bus: fix char signess mismatch
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 64ae92e7d3 (submit/xkb-errmacro) xkb: move _XkbErrCode3() and _XkbErrCode4()
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 6bbbae0b7b (submit/xkb-devkey) xkb: drop xkbDevicePrivateKey define
It's only used exactly once, where we can easily write &xkbDevicePrivateKeyRec.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 7e9c306da9 (submit/move-systemd-logind.h) move systemd-logind.h to hw/xfree86/os-support/linux
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult c2b0692e30 (submit/bsd-DEV_MEM) xfree86: os-support: bsd: consolidate duplicate defines
Consolidate defines duplicated across several sources into one header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult e73eb5fe4c (submit/bsd-DEV_MEM) xfree86: os-support: unexport DEV_MEM defines
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 6e10fe3472 (submit/hotplug.h) config: unexport config_pre_init()
This function isn't used by any drivers/modules, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult b763a2d701 (submit/hotplug.h) include: move out private definitions from hotplug.h
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult f2471952cd (submit/hotplug.h) xfree86: common: make _xf86_get_platform_device_attrib() a real function
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>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 2d58af0711 (submit/unexport-lockserver) os: move -nolock help message printing to serverlock.h
Reduce #ifdef cluttering in os/utils.c a little bit my moving the (built-time-)
conditional printing of the help message into serverlock.c

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 30553cb633 (submit/unexport-lockserver) os: move out LockServer logic from util.c to serverlock.c
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 0dcc6d805f (submit/unexport-lockserver) os: unexport LockServer() and UnlockServer() from public module API
These functions work on server process level, and shouldn't be touched
by drivers at all, thus shouldn't be exported to them.

(couldn't find any driver/module using these symbols)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00
Enrico Weigelt, metux IT consult 67c00350e1 (submit/unexport-lockserver) os: move defining LOCK_SERVER into meson
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-29 12:43:29 +02:00