dix: unexport and move maxBigRequestSize

* this symbol is a server configuration flag (can be passed via cmdline)
  for limiting the max size of big-requests. there shouldn't be any need
  to use it outside the core X server (in server modules like drivers
  or external extension) - therefore unexport it
* in order to reduce namespace pollution of public (server module API)
  headers, create a new internal header for those tings (more to come)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1275>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-06 16:22:04 +01:00 committed by Marge Bot
parent eed0697ec9
commit fe1e2b7b3d
9 changed files with 24 additions and 8 deletions

View File

@ -35,6 +35,7 @@ from The Open Group.
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
#include "dix_priv.h"
#include "extnsionst.h"
#include <X11/extensions/bigreqsproto.h>
#include "opaque.h"

View File

@ -105,12 +105,12 @@ Equipment Corporation.
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/libxfont2.h>
#include "dixfontstr.h"
#include "dix_priv.h"
#include "gcstruct.h"
#include "selection.h"
#include "colormapst.h"
#include "cursorstr.h"
#include "scrnintstr.h"
#include "opaque.h"
#include "input.h"
#include "servermd.h"
#include "extnsionst.h"

18
dix/dix_priv.h Normal file
View File

@ -0,0 +1,18 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_DIX_PRIV_H
#define _XSERVER_DIX_PRIV_H
/* This file holds global DIX settings to be used inside the Xserver,
* but NOT supposed to be accessed directly by external server modules like
* drivers or extension modules. Thus the definitions here are not part of the
* Xserver's module API/ABI.
*/
/* server setting: maximum size for big requests */
#define MAX_BIG_REQUEST_SIZE 4194303
extern long maxBigRequestSize;
#endif /* _XSERVER_DIX_PRIV_H */

View File

@ -56,6 +56,7 @@ SOFTWARE.
#include "input.h"
#include "dixfont.h"
#include "dixstruct.h"
#include "dix_priv.h"
#include "os.h"
ScreenInfo screenInfo;

View File

@ -66,7 +66,6 @@ extern _X_EXPORT int limitStackSpace;
extern _X_EXPORT int limitNoFile;
#endif
extern _X_EXPORT Bool defeatAccessControl;
extern _X_EXPORT long maxBigRequestSize;
extern _X_EXPORT Bool whiteRoot;
extern _X_EXPORT Bool bgNoneRoot;

View File

@ -66,9 +66,6 @@ SOFTWARE.
#ifndef MAX_REQUEST_SIZE
#define MAX_REQUEST_SIZE 65535
#endif
#ifndef MAX_BIG_REQUEST_SIZE
#define MAX_BIG_REQUEST_SIZE 4194303
#endif
typedef struct _FontPathRec *FontPathPtr;
typedef struct _NewClientRec *NewClientPtr;

View File

@ -655,6 +655,7 @@ inc = include_directories(
'miext/shadow',
'miext/sync',
'dbe',
'dix',
'dri3',
'include',
'present',

View File

@ -76,6 +76,7 @@ SOFTWARE.
#include "osdep.h"
#include "opaque.h"
#include "dixstruct.h"
#include "dix_priv.h"
#include "misc.h"
CallbackListPtr ReplyCallback;

View File

@ -103,10 +103,8 @@ __stdcall unsigned long GetTickCount(void);
#endif
#endif
#include "opaque.h"
#include "dixstruct.h"
#include "dix_priv.h"
#include "xkbsrv.h"
#include "picture.h"