os: macro for marking struct fields xserver-internal
Several drivers still accessing internal struct field they shouldn't, eg. directly calling or manipulating low level proc vectors, while there are higher level functions for that. Introducing a macro for marking struct fields internal, so the compiler spits out a deprecation warning when those are accessed by drivers directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
3562298068
commit
b4502bb6ff
|
@ -84,6 +84,12 @@ typedef struct _NewClientRec *NewClientPtr;
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef _INSIDE_XSERVER
|
||||||
|
#define _X_XSERVER_INTERNAL(msg)
|
||||||
|
#else
|
||||||
|
#define _X_XSERVER_INTERNAL(msg) _X_DEPRECATED_MSG(msg)
|
||||||
|
#endif
|
||||||
|
|
||||||
extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ );
|
extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ );
|
||||||
|
|
||||||
extern _X_EXPORT int ReadFdFromClient(ClientPtr client);
|
extern _X_EXPORT int ReadFdFromClient(ClientPtr client);
|
||||||
|
|
|
@ -9,6 +9,8 @@ project('xserver', 'c',
|
||||||
release_date = '2021-07-05'
|
release_date = '2021-07-05'
|
||||||
|
|
||||||
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
|
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
|
||||||
|
add_project_arguments('-D_INSIDE_XSERVER', language: ['c', 'objc'])
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
add_project_arguments('-fno-strict-aliasing', language : 'c')
|
add_project_arguments('-fno-strict-aliasing', language : 'c')
|
||||||
|
|
Loading…
Reference in New Issue