diff options
Diffstat (limited to 'xorg-server/include')
-rw-r--r-- | xorg-server/include/Makefile.am | 1 | ||||
-rw-r--r-- | xorg-server/include/busfault.h | 48 | ||||
-rw-r--r-- | xorg-server/include/dix-config.h.in | 14 | ||||
-rw-r--r-- | xorg-server/include/dixstruct.h | 4 | ||||
-rw-r--r-- | xorg-server/include/os.h | 2 | ||||
-rw-r--r-- | xorg-server/include/protocol-versions.h | 4 | ||||
-rw-r--r-- | xorg-server/include/xorg-config.h.in | 3 | ||||
-rw-r--r-- | xorg-server/include/xorg-server.h.in | 3 |
8 files changed, 76 insertions, 3 deletions
diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am index 5cdea1d15..13d91e22c 100644 --- a/xorg-server/include/Makefile.am +++ b/xorg-server/include/Makefile.am @@ -2,6 +2,7 @@ if XORG sdk_HEADERS = \ XIstubs.h \ Xprintf.h \ + busfault.h \ callback.h \ client.h \ closestr.h \ diff --git a/xorg-server/include/busfault.h b/xorg-server/include/busfault.h new file mode 100644 index 000000000..3b668818d --- /dev/null +++ b/xorg-server/include/busfault.h @@ -0,0 +1,48 @@ +/* + * Copyright © 2013 Keith Packard + * + * 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, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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 _BUSFAULT_H_ +#define _BUSFAULT_H_ + +#include <dix-config.h> + +#ifdef BUSFAULT + +#include <sys/types.h> + +typedef void (*busfault_notify_ptr) (void *context); + +struct busfault * +busfault_register_mmap(void *addr, size_t size, busfault_notify_ptr notify, void *context); + +void +busfault_unregister(struct busfault *busfault); + +void +busfault_check(void); + +Bool +busfault_init(void); + +#endif + +#endif /* _BUSFAULT_H_ */ diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in index 156383bf8..d4fbe99fa 100644 --- a/xorg-server/include/dix-config.h.in +++ b/xorg-server/include/dix-config.h.in @@ -449,7 +449,21 @@ #include "dix-config-apple-verbatim.h" #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + +/* Defined if needed to expose struct msghdr.msg_control */ +#undef _XOPEN_SOURCE + /* Have support for X shared memory fence library (xshmfence) */ #undef HAVE_XSHMFENCE +/* Use XTrans FD passing support */ +#undef XTRANS_SEND_FDS + +/* Wrap SIGBUS to catch MIT-SHM faults */ +#undef BUSFAULT + #endif /* _DIX_CONFIG_H_ */ diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h index 456e63360..6f5667fcb 100644 --- a/xorg-server/include/dixstruct.h +++ b/xorg-server/include/dixstruct.h @@ -110,15 +110,19 @@ typedef struct _Client { DeviceIntPtr clientPtr; ClientIdPtr clientIds; +#if XTRANS_SEND_FDS int req_fds; +#endif } ClientRec; +#if XTRANS_SEND_FDS static inline void SetReqFds(ClientPtr client, int req_fds) { if (client->req_fds != 0 && req_fds != client->req_fds) LogMessage(X_ERROR, "Mismatching number of request fds %d != %d\n", req_fds, client->req_fds); client->req_fds = req_fds; } +#endif /* * Scheduling interface diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index 11b219845..450e1a8e8 100644 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -98,9 +98,11 @@ extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */ extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ ); +#if XTRANS_SEND_FDS extern _X_EXPORT int ReadFdFromClient(ClientPtr client); extern _X_EXPORT int WriteFdToClient(ClientPtr client, int fd, Bool do_close); +#endif extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ , char * /*data */ , diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h index 5ceaeb012..95df8ce1a 100644 --- a/xorg-server/include/protocol-versions.h +++ b/xorg-server/include/protocol-versions.h @@ -93,7 +93,11 @@ /* SHM */ #define SERVER_SHM_MAJOR_VERSION 1 +#if XTRANS_SEND_FDS +#define SERVER_SHM_MINOR_VERSION 2 +#else #define SERVER_SHM_MINOR_VERSION 1 +#endif /* Sync */ #define SERVER_SYNC_MAJOR_VERSION 3 diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in index e3444da91..487d7addb 100644 --- a/xorg-server/include/xorg-config.h.in +++ b/xorg-server/include/xorg-config.h.in @@ -145,7 +145,4 @@ /* Support APM/ACPI power management in the server */ #undef XF86PM -/* Have support for X shared memory fence library (xshmfence) */ -#undef HAVE_XSHMFENCE - #endif /* _XORG_CONFIG_H_ */ diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in index 960817e68..0c651bfab 100644 --- a/xorg-server/include/xorg-server.h.in +++ b/xorg-server/include/xorg-server.h.in @@ -221,4 +221,7 @@ /* Have support for X shared memory fence library (xshmfence) */ #undef HAVE_XSHMFENCE +/* Use XTrans FD passing support */ +#undef XTRANS_SEND_FDS + #endif /* _XORG_SERVER_H_ */ |