2003-11-14 15:54:54 +00:00
|
|
|
/***********************************************************
|
|
|
|
|
|
|
|
|
|
Copyright 1987, 1998 The Open Group
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
Except as contained in this notice, the name of The Open Group shall not be
|
|
|
|
|
used in advertising or otherwise to promote the sale, use or other dealings
|
|
|
|
|
in this Software without prior written authorization from The Open Group.
|
|
|
|
|
|
|
|
|
|
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
|
|
|
|
|
|
|
|
All Rights Reserved
|
|
|
|
|
|
2014-10-31 09:45:12 +10:00
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
|
|
|
documentation for any purpose and without fee is hereby granted,
|
2003-11-14 15:54:54 +00:00
|
|
|
provided that the above copyright notice appear in all copies and that
|
2014-10-31 09:45:12 +10:00
|
|
|
both that copyright notice and this permission notice appear in
|
2003-11-14 15:54:54 +00:00
|
|
|
supporting documentation, and that the name of Digital not be
|
|
|
|
|
used in advertising or publicity pertaining to distribution of the
|
2014-10-31 09:45:12 +10:00
|
|
|
software without specific, written prior permission.
|
2003-11-14 15:54:54 +00:00
|
|
|
|
|
|
|
|
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
|
|
|
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
|
|
|
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
|
|
|
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
|
|
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
|
|
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
|
|
|
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
******************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef OS_H
|
|
|
|
|
#define OS_H
|
2003-11-25 19:29:01 +00:00
|
|
|
|
2005-07-03 08:53:54 +00:00
|
|
|
#include "misc.h"
|
2003-11-14 16:49:22 +00:00
|
|
|
#include <stdarg.h>
|
2012-04-06 08:28:40 -07:00
|
|
|
#include <stdint.h>
|
2023-08-02 12:33:19 +01:00
|
|
|
#if defined(HAVE_REALLOCARRAY)
|
|
|
|
|
#include <stdlib.h> /* for reallocarray */
|
|
|
|
|
#endif
|
2010-11-11 11:35:47 +01:00
|
|
|
#include <string.h>
|
2016-05-24 18:46:42 +08:00
|
|
|
#ifdef MONOTONIC_CLOCK
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#endif
|
2003-11-14 15:54:54 +00:00
|
|
|
|
|
|
|
|
#define SCREEN_SAVER_ON 0
|
|
|
|
|
#define SCREEN_SAVER_OFF 1
|
|
|
|
|
#define SCREEN_SAVER_FORCER 2
|
|
|
|
|
#define SCREEN_SAVER_CYCLE 3
|
|
|
|
|
|
|
|
|
|
#ifndef MAX_REQUEST_SIZE
|
|
|
|
|
#define MAX_REQUEST_SIZE 65535
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
typedef struct _FontPathRec *FontPathPtr;
|
|
|
|
|
typedef struct _NewClientRec *NewClientPtr;
|
|
|
|
|
|
2014-07-08 13:24:25 -04:00
|
|
|
#ifndef xnfalloc
|
2003-11-14 15:54:54 +00:00
|
|
|
#define xnfalloc(size) XNFalloc((unsigned long)(size))
|
2015-03-21 15:21:14 -07:00
|
|
|
#define xnfcalloc(_num, _size) XNFcallocarray((_num), (_size))
|
2013-12-15 01:05:51 -08:00
|
|
|
#define xnfrealloc(ptr, size) XNFrealloc((void *)(ptr), (unsigned long)(size))
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
#define xstrdup(s) Xstrdup(s)
|
|
|
|
|
#define xnfstrdup(s) XNFstrdup(s)
|
2015-03-21 08:58:04 -07:00
|
|
|
|
|
|
|
|
#define xallocarray(num, size) reallocarray(NULL, (num), (size))
|
2015-03-21 09:28:07 -07:00
|
|
|
#define xnfallocarray(num, size) XNFreallocarray(NULL, (num), (size))
|
|
|
|
|
#define xnfreallocarray(ptr, num, size) XNFreallocarray((ptr), (num), (size))
|
2003-11-14 16:49:22 +00:00
|
|
|
#endif
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
#include <stdio.h>
|
2006-07-18 18:16:12 -04:00
|
|
|
#include <stdarg.h>
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2009-10-15 01:53:43 -05:00
|
|
|
#ifdef DDXBEFORERESET
|
2012-03-21 12:55:09 -07:00
|
|
|
extern void ddxBeforeReset(void);
|
2009-10-15 01:53:43 -05:00
|
|
|
#endif
|
|
|
|
|
|
2016-05-19 13:59:54 -07:00
|
|
|
extern _X_EXPORT Bool WaitForSomething(Bool clients_are_ready);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2013-01-17 13:43:02 -08:00
|
|
|
extern _X_EXPORT int ReadFdFromClient(ClientPtr client);
|
|
|
|
|
|
2013-01-17 13:46:55 -08:00
|
|
|
extern _X_EXPORT int WriteFdToClient(ClientPtr client, int fd, Bool do_close);
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ ,
|
|
|
|
|
char * /*data */ ,
|
|
|
|
|
int /*count */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void FlushAllOutput(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void FlushIfCriticalOutputPending(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void SetCriticalOutputPending(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ ,
|
|
|
|
|
const void * /*buf */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void ResetOsBuffers(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void NotifyParentProcess(void);
|
2007-11-01 15:41:11 -04:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void CreateWellKnownSockets(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void ResetWellKnownSockets(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void CloseWellKnownConnections(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ ,
|
|
|
|
|
unsigned int /*proto_n */ ,
|
|
|
|
|
char * /*auth_proto */ ,
|
|
|
|
|
unsigned int /*string_n */ ,
|
|
|
|
|
char * /*auth_string */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2015-11-11 22:02:02 -08:00
|
|
|
typedef void (*NotifyFdProcPtr)(int fd, int ready, void *data);
|
|
|
|
|
|
2016-05-29 15:06:36 -07:00
|
|
|
#define X_NOTIFY_NONE 0x0
|
|
|
|
|
#define X_NOTIFY_READ 0x1
|
|
|
|
|
#define X_NOTIFY_WRITE 0x2
|
|
|
|
|
#define X_NOTIFY_ERROR 0x4 /* don't need to select for, always reported */
|
2015-11-11 22:02:02 -08:00
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data);
|
|
|
|
|
|
|
|
|
|
static inline void RemoveNotifyFd(int fd)
|
|
|
|
|
{
|
|
|
|
|
(void) SetNotifyFd(fd, NULL, X_NOTIFY_NONE, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void ListenToAllClients(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void IgnoreClient(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void AttendClient(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2014-03-18 22:05:58 -07:00
|
|
|
extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
|
2008-05-17 14:56:53 -07:00
|
|
|
|
2014-03-19 20:46:41 -07:00
|
|
|
extern _X_EXPORT Bool AddClientOnOpenFD(int /* fd */ );
|
|
|
|
|
|
2016-05-24 18:46:42 +08:00
|
|
|
#ifdef MONOTONIC_CLOCK
|
|
|
|
|
extern void ForceClockId(clockid_t /* forced_clockid */);
|
|
|
|
|
#endif
|
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT CARD32 GetTimeInMillis(void);
|
2013-07-11 16:10:34 -07:00
|
|
|
extern _X_EXPORT CARD64 GetTimeInMicros(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2016-05-26 10:30:56 -07:00
|
|
|
extern _X_EXPORT void AdjustWaitForDelay(void *waitTime, int newdelay);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
typedef struct _OsTimerRec *OsTimerPtr;
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2014-03-10 18:31:33 -04:00
|
|
|
typedef CARD32 (*OsTimerCallback) (OsTimerPtr timer,
|
|
|
|
|
CARD32 time,
|
|
|
|
|
void *arg);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
|
|
|
|
#define TimerAbsolute (1<<0)
|
|
|
|
|
#define TimerForceOld (1<<1)
|
|
|
|
|
|
2014-03-10 18:31:33 -04:00
|
|
|
extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr timer,
|
|
|
|
|
int flags,
|
|
|
|
|
CARD32 millis,
|
|
|
|
|
OsTimerCallback func,
|
|
|
|
|
void *arg);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void TimerCheck(void);
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */ );
|
|
|
|
|
extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT void SetScreenSaverTimer(void);
|
|
|
|
|
extern _X_EXPORT void FreeScreenSaverTimer(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void GiveUp(int /*sig */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2010-05-06 00:27:47 +07:00
|
|
|
/*
|
|
|
|
|
* This function malloc(3)s buffer, terminating the server if there is not
|
|
|
|
|
* enough memory.
|
|
|
|
|
*/
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void *
|
|
|
|
|
XNFalloc(unsigned long /*amount */ );
|
|
|
|
|
|
2010-05-06 00:27:47 +07:00
|
|
|
/*
|
|
|
|
|
* This function calloc(3)s buffer, terminating the server if there is not
|
|
|
|
|
* enough memory.
|
|
|
|
|
*/
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void *
|
2015-03-21 15:21:14 -07:00
|
|
|
XNFcalloc(unsigned long /*amount */ ) _X_DEPRECATED;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This function calloc(3)s buffer, terminating the server if there is not
|
|
|
|
|
* enough memory or the arguments overflow when multiplied
|
|
|
|
|
*/
|
|
|
|
|
extern _X_EXPORT void *
|
|
|
|
|
XNFcallocarray(size_t nmemb, size_t size);
|
2012-03-21 12:55:09 -07:00
|
|
|
|
2010-05-06 00:27:47 +07:00
|
|
|
/*
|
|
|
|
|
* This function realloc(3)s passed buffer, terminating the server if there is
|
|
|
|
|
* not enough memory.
|
|
|
|
|
*/
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void *
|
|
|
|
|
XNFrealloc(void * /*ptr */ , unsigned long /*amount */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2015-03-21 09:28:07 -07:00
|
|
|
/*
|
|
|
|
|
* This function reallocarray(3)s passed buffer, terminating the server if
|
|
|
|
|
* there is not enough memory or the arguments overflow when multiplied.
|
|
|
|
|
*/
|
|
|
|
|
extern _X_EXPORT void *
|
|
|
|
|
XNFreallocarray(void *ptr, size_t nmemb, size_t size);
|
|
|
|
|
|
2010-05-06 00:27:47 +07:00
|
|
|
/*
|
|
|
|
|
* This function strdup(3)s passed string. The only difference from the library
|
|
|
|
|
* function that it is safe to pass NULL, as NULL will be returned.
|
|
|
|
|
*/
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
Xstrdup(const char *s);
|
2010-05-06 00:27:47 +07:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This function strdup(3)s passed string, terminating the server if there is
|
|
|
|
|
* not enough memory. If NULL is passed to this function, NULL is returned.
|
|
|
|
|
*/
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
XNFstrdup(const char *s);
|
2010-05-06 00:27:47 +07:00
|
|
|
|
2010-11-27 18:43:12 -08:00
|
|
|
/* Include new X*asprintf API */
|
|
|
|
|
#include "Xprintf.h"
|
|
|
|
|
|
|
|
|
|
/* Older api deprecated in favor of the asprintf versions */
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
Xprintf(const char *fmt, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 2)
|
|
|
|
|
_X_DEPRECATED;
|
|
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
Xvprintf(const char *fmt, va_list va)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 0)
|
|
|
|
|
_X_DEPRECATED;
|
|
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
XNFprintf(const char *fmt, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 2)
|
|
|
|
|
_X_DEPRECATED;
|
|
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
XNFvprintf(const char *fmt, va_list va)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 0)
|
|
|
|
|
_X_DEPRECATED;
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
typedef void (*OsSigHandlerPtr) (int /* sig */ );
|
|
|
|
|
typedef int (*OsSigWrapperPtr) (int /* sig */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT OsSigHandlerPtr
|
|
|
|
|
OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
|
|
|
|
|
extern _X_EXPORT OsSigWrapperPtr
|
|
|
|
|
OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LockServer(void);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
UnlockServer(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsInit(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsCleanup(Bool);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
2012-04-19 16:39:23 -07:00
|
|
|
OsVendorFatalError(const char *f, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 0);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsVendorInit(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsBlockSignals(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsReleaseSignals(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-07-09 16:34:39 -07:00
|
|
|
extern void
|
|
|
|
|
OsResetSignals(void);
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
OsAbort(void)
|
|
|
|
|
_X_NORETURN;
|
2010-01-28 11:08:33 +02:00
|
|
|
|
2018-03-13 17:46:34 -04:00
|
|
|
extern _X_EXPORT Bool
|
|
|
|
|
PrivsElevated(void);
|
|
|
|
|
|
2015-09-21 07:16:14 +01:00
|
|
|
extern _X_EXPORT int
|
|
|
|
|
GetClientFd(ClientPtr);
|
|
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
|
ClientIsLocal(ClientPtr client);
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int
|
|
|
|
|
ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ );
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
ddxUseMsg(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
/* stuff for ReplyCallback */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT CallbackListPtr ReplyCallback;
|
2003-11-14 15:54:54 +00:00
|
|
|
typedef struct {
|
|
|
|
|
ClientPtr client;
|
2008-03-11 00:51:43 -04:00
|
|
|
const void *replyData;
|
2011-10-04 12:25:26 +03:00
|
|
|
unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */
|
2003-11-14 15:54:54 +00:00
|
|
|
unsigned long bytesRemaining;
|
|
|
|
|
Bool startOfReply;
|
2011-10-04 12:25:26 +03:00
|
|
|
unsigned long padBytes; /* pad bytes from zeroed array */
|
2003-11-14 15:54:54 +00:00
|
|
|
} ReplyInfoRec;
|
|
|
|
|
|
|
|
|
|
/* stuff for FlushCallback */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
|
|
|
extern _X_EXPORT CallbackListPtr FlushCallback;
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2011-07-20 13:09:05 +10:00
|
|
|
enum ExitCode {
|
2012-03-21 12:55:09 -07:00
|
|
|
EXIT_NO_ERROR = 0,
|
|
|
|
|
EXIT_ERR_ABORT = 1,
|
|
|
|
|
EXIT_ERR_CONFIGURE = 2,
|
|
|
|
|
EXIT_ERR_DRIVERS = 3,
|
2011-07-20 13:09:05 +10:00
|
|
|
};
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
ddxGiveUp(enum ExitCode error);
|
2019-02-21 15:22:57 -08:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
ddxInputThreadInit(void);
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int
|
|
|
|
|
TimeSinceLastInputEvent(void);
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2015-03-21 08:42:19 -07:00
|
|
|
/* Function fallbacks provided by AC_REPLACE_FUNCS in configure.ac */
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_REALLOCARRAY
|
|
|
|
|
#define reallocarray xreallocarray
|
|
|
|
|
extern _X_EXPORT void *
|
|
|
|
|
reallocarray(void *optr, size_t nmemb, size_t size);
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-11-30 22:20:09 -08:00
|
|
|
#ifndef HAVE_STRCASECMP
|
2008-08-10 23:07:46 +02:00
|
|
|
#define strcasecmp xstrcasecmp
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int
|
|
|
|
|
xstrcasecmp(const char *s1, const char *s2);
|
2008-08-10 23:07:46 +02:00
|
|
|
#endif
|
|
|
|
|
|
2011-11-30 22:20:09 -08:00
|
|
|
#ifndef HAVE_STRNCASECMP
|
2008-08-10 23:07:46 +02:00
|
|
|
#define strncasecmp xstrncasecmp
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT int
|
|
|
|
|
xstrncasecmp(const char *s1, const char *s2, size_t n);
|
2008-08-10 23:07:46 +02:00
|
|
|
#endif
|
|
|
|
|
|
2011-11-30 22:20:09 -08:00
|
|
|
#ifndef HAVE_STRCASESTR
|
2008-08-10 23:07:46 +02:00
|
|
|
#define strcasestr xstrcasestr
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
xstrcasestr(const char *s, const char *find);
|
2008-08-10 23:07:46 +02:00
|
|
|
#endif
|
|
|
|
|
|
2011-11-30 22:20:09 -08:00
|
|
|
#ifndef HAVE_STRLCPY
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT size_t
|
|
|
|
|
strlcpy(char *dst, const char *src, size_t siz);
|
|
|
|
|
extern _X_EXPORT size_t
|
|
|
|
|
strlcat(char *dst, const char *src, size_t siz);
|
2008-10-26 11:37:11 +01:00
|
|
|
#endif
|
|
|
|
|
|
2011-10-24 20:28:32 -07:00
|
|
|
#ifndef HAVE_STRNDUP
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT char *
|
|
|
|
|
strndup(const char *str, size_t n);
|
2011-10-24 20:28:32 -07:00
|
|
|
#endif
|
|
|
|
|
|
2017-02-28 19:18:25 +01:00
|
|
|
#ifndef HAVE_TIMINGSAFE_MEMCMP
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
|
timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
|
|
|
|
#endif
|
|
|
|
|
|
2003-11-25 19:29:01 +00:00
|
|
|
/* Logging. */
|
|
|
|
|
typedef enum _LogParameter {
|
|
|
|
|
XLOG_FLUSH,
|
|
|
|
|
XLOG_SYNC,
|
|
|
|
|
XLOG_VERBOSITY,
|
|
|
|
|
XLOG_FILE_VERBOSITY
|
|
|
|
|
} LogParameter;
|
|
|
|
|
|
|
|
|
|
/* Flags for log messages. */
|
|
|
|
|
typedef enum {
|
2012-03-21 12:55:09 -07:00
|
|
|
X_PROBED, /* Value was probed */
|
|
|
|
|
X_CONFIG, /* Value was given in the config file */
|
|
|
|
|
X_DEFAULT, /* Value is a default */
|
|
|
|
|
X_CMDLINE, /* Value was given on the command line */
|
|
|
|
|
X_NOTICE, /* Notice */
|
|
|
|
|
X_ERROR, /* Error message */
|
|
|
|
|
X_WARNING, /* Warning message */
|
|
|
|
|
X_INFO, /* Informational message */
|
|
|
|
|
X_NONE, /* No prefix */
|
|
|
|
|
X_NOT_IMPLEMENTED, /* Not implemented */
|
2012-03-14 13:48:56 +10:00
|
|
|
X_DEBUG, /* Debug message */
|
2012-03-21 12:55:09 -07:00
|
|
|
X_UNKNOWN = -1 /* unknown -- this must always be last */
|
2003-11-25 19:29:01 +00:00
|
|
|
} MessageType;
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT const char *
|
|
|
|
|
LogInit(const char *fname, const char *backup);
|
2016-01-01 18:11:14 -08:00
|
|
|
extern void
|
|
|
|
|
LogSetDisplay(void);
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogClose(enum ExitCode error);
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
|
LogSetParameter(LogParameter param, int value);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogVWrite(int verb, const char *f, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(2, 0);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogWrite(int verb, const char *f, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(2, 3);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 0);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogMessageVerb(MessageType type, int verb, const char *format, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 4);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogMessage(MessageType type, const char *format, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(2, 3);
|
2012-04-06 08:28:40 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 4);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 0);
|
2012-03-21 12:55:09 -07:00
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogVHdrMessageVerb(MessageType type, int verb,
|
|
|
|
|
const char *msg_format, va_list msg_args,
|
|
|
|
|
const char *hdr_format, va_list hdr_args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 0)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(5, 0);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogHdrMessageVerb(MessageType type, int verb,
|
|
|
|
|
const char *msg_format, va_list msg_args,
|
|
|
|
|
const char *hdr_format, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(3, 0)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(5, 6);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
LogHdrMessage(MessageType type, const char *msg_format,
|
|
|
|
|
va_list msg_args, const char *hdr_format, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(2, 0)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(4, 5);
|
|
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
FatalError(const char *f, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 2)
|
|
|
|
|
_X_NORETURN;
|
2003-11-25 19:29:01 +00:00
|
|
|
|
2006-10-08 17:04:12 +03:00
|
|
|
#ifdef DEBUG
|
|
|
|
|
#define DebugF ErrorF
|
|
|
|
|
#else
|
2012-03-21 12:55:09 -07:00
|
|
|
#define DebugF(...) /* */
|
2006-10-08 17:04:12 +03:00
|
|
|
#endif
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
VErrorF(const char *f, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 0);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
ErrorF(const char *f, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 2);
|
|
|
|
|
extern _X_EXPORT void
|
2012-06-05 15:39:41 +10:00
|
|
|
VErrorFSigSafe(const char *f, va_list args)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 0);
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
|
ErrorFSigSafe(const char *f, ...)
|
|
|
|
|
_X_ATTRIBUTE_PRINTF(1, 2);
|
|
|
|
|
extern _X_EXPORT void
|
2012-03-21 12:55:09 -07:00
|
|
|
LogPrintMarkers(void);
|
2003-11-25 19:29:01 +00:00
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
|
xorg_backtrace(void);
|
2008-10-10 15:53:48 -04:00
|
|
|
|
2015-12-08 11:37:51 -08:00
|
|
|
#include <signal.h>
|
|
|
|
|
|
2019-04-25 22:44:49 +01:00
|
|
|
#if defined(WIN32) && !defined(__CYGWIN__)
|
|
|
|
|
typedef _sigset_t sigset_t;
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-03-21 12:55:09 -07:00
|
|
|
#endif /* OS_H */
|