aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/xtrans/Xtrans.h
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-10-31 02:29:18 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-11-02 19:46:36 +0100
commite65b106a8989bf5d71de613f5f8b9dcbd559d382 (patch)
treebdd95de44084c0460bef9c90bcfb82736e3ff834 /nx-X11/lib/xtrans/Xtrans.h
parent793d587b46a7ec47ea62d99920de4dc607514604 (diff)
downloadnx-libs-e65b106a8989bf5d71de613f5f8b9dcbd559d382.tar.gz
nx-libs-e65b106a8989bf5d71de613f5f8b9dcbd559d382.tar.bz2
nx-libs-e65b106a8989bf5d71de613f5f8b9dcbd559d382.zip
Xtrans: update to Xorg/xtrans upstream (1.3.5+)
This lifts xtrans to the state of this commit: commit 560d7550e23e9b14056b4a9b2569c2f256015f8a Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Date: Sat Sep 10 22:09:51 2016 -0700 Update strlcpy macro check to also check HAVE_STRLCPY xorg-server moved from HAS_STRLCPY to HAVE_STRLCPY in 2011 cf-xserver: d829a7c5cb42c979b58f3547136df5b05d906423 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Diffstat (limited to 'nx-X11/lib/xtrans/Xtrans.h')
-rw-r--r--nx-X11/lib/xtrans/Xtrans.h117
1 files changed, 47 insertions, 70 deletions
diff --git a/nx-X11/lib/xtrans/Xtrans.h b/nx-X11/lib/xtrans/Xtrans.h
index 2ab5ac3fe..54b2a1425 100644
--- a/nx-X11/lib/xtrans/Xtrans.h
+++ b/nx-X11/lib/xtrans/Xtrans.h
@@ -52,117 +52,75 @@ from The Open Group.
#include <nx-X11/Xfuncproto.h>
#include <nx-X11/Xos.h>
+#include <nx-X11/Xmd.h>
#ifndef WIN32
#include <sys/socket.h>
#endif
+#ifdef __clang__
+/* Not all clients make use of all provided statics */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
/*
* Set the functions names according to where this code is being compiled.
*/
#ifdef X11_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _X11Trans##func
-#else
-#define TRANS(func) _X11Trans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_X11Trans";
+static const char *__xtransname = "_X11Trans";
#endif
#endif /* X11_t */
#ifdef XSERV_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XSERVTrans##func
-#else
-#define TRANS(func) _XSERVTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_XSERVTrans";
+static const char *__xtransname = "_XSERVTrans";
#endif
#define X11_t
#endif /* XSERV_t */
#ifdef XIM_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XimXTrans##func
-#else
-#define TRANS(func) _XimXTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_XimTrans";
+static const char *__xtransname = "_XimTrans";
#endif
#endif /* XIM_t */
#ifdef FS_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _FSTrans##func
-#else
-#define TRANS(func) _FSTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_FSTrans";
+static const char *__xtransname = "_FSTrans";
#endif
#endif /* FS_t */
#ifdef FONT_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _FontTrans##func
-#else
-#define TRANS(func) _FontTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_FontTrans";
+static const char *__xtransname = "_FontTrans";
#endif
#endif /* FONT_t */
#ifdef ICE_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _IceTrans##func
-#else
-#define TRANS(func) _IceTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_IceTrans";
+static const char *__xtransname = "_IceTrans";
#endif
#endif /* ICE_t */
-#ifdef TEST_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define TRANS(func) _TESTTrans##func
-#else
-#define TRANS(func) _TESTTrans/**/func
-#endif
-#ifdef XTRANSDEBUG
-static char* __xtransname = "_TESTTrans";
-#endif
-#endif /* TEST_t */
-
-#ifdef LBXPROXY_t
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define TRANS(func) _LBXPROXYTrans##func
-#else
-#define TRANS(func) _LBXPROXYTrans/**/func
-#endif
-#define X11_t /* The server defines this - so should the LBX proxy */
-#ifdef XTRANSDEBUG
-static char* __xtransname = "_LBXPROXYTrans";
-#endif
-#endif /* LBXPROXY_t */
-
#if !defined(TRANS)
-#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XTrans##func
-#else
-#define TRANS(func) _XTrans/**/func
-#endif
#ifdef XTRANSDEBUG
-static char* __xtransname = "_XTrans";
+static const char *__xtransname = "_XTrans";
#endif
#endif /* !TRANS */
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
/*
* Create a single address structure that can be used wherever
@@ -190,7 +148,7 @@ typedef long BytesReadable_t;
#endif
-#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__))
+#if defined(WIN32) || defined(USG)
/*
* TRANS(Readv) and TRANS(Writev) use struct iovec, normally found
@@ -264,7 +222,7 @@ void TRANS(FreeConnInfo) (
#ifdef TRANS_CLIENT
XtransConnInfo TRANS(OpenCOTSClient)(
- char * /* address */
+ const char * /* address */
);
#endif /* TRANS_CLIENT */
@@ -272,7 +230,7 @@ XtransConnInfo TRANS(OpenCOTSClient)(
#ifdef TRANS_SERVER
XtransConnInfo TRANS(OpenCOTSServer)(
- char * /* address */
+ const char * /* address */
);
#endif /* TRANS_SERVER */
@@ -282,7 +240,7 @@ XtransConnInfo TRANS(OpenCOTSServer)(
XtransConnInfo TRANS(ReopenCOTSServer)(
int, /* trans_id */
int, /* fd */
- char * /* port */
+ const char * /* port */
);
int TRANS(GetReopenInfo)(
@@ -305,12 +263,24 @@ int TRANS(SetOption)(
int TRANS(CreateListener)(
XtransConnInfo, /* ciptr */
- char *, /* port */
+ const char *, /* port */
unsigned int /* flags */
);
+int TRANS(Received) (
+ const char* /* protocol*/
+);
+
int TRANS(NoListen) (
- char* /* protocol*/
+ const char* /* protocol*/
+);
+
+int TRANS(Listen) (
+ const char* /* protocol*/
+);
+
+int TRANS(IsListening) (
+ const char* /* protocol*/
);
int TRANS(ResetListener)(
@@ -328,7 +298,7 @@ XtransConnInfo TRANS(Accept)(
int TRANS(Connect)(
XtransConnInfo, /* ciptr */
- char * /* address */
+ const char * /* address */
);
#endif /* TRANS_CLIENT */
@@ -362,6 +332,10 @@ int TRANS(Writev)(
int /* size */
);
+int TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close);
+
+int TRANS(RecvFd) (XtransConnInfo ciptr);
+
int TRANS(Disconnect)(
XtransConnInfo /* ciptr */
);
@@ -378,12 +352,15 @@ int TRANS(IsLocal)(
XtransConnInfo /* ciptr */
);
+#ifdef NX_TRANS_SOCKET
+/* needed for pre-xcb libX11 as we have in NX */
int TRANS(GetMyAddr)(
- XtransConnInfo, /* ciptr */
- int *, /* familyp */
- int *, /* addrlenp */
- Xtransaddr ** /* addrp */
+ XtransConnInfo, /* ciptr */
+ int *, /* familyp */
+ int *, /* addrlenp */
+ Xtransaddr ** /* addrp */
);
+#endif
int TRANS(GetPeerAddr)(
XtransConnInfo, /* ciptr */
@@ -399,7 +376,7 @@ int TRANS(GetConnectionNumber)(
#ifdef TRANS_SERVER
int TRANS(MakeAllCOTSServerListeners)(
- char *, /* port */
+ const char *, /* port */
int *, /* partial */
int *, /* count_ret */
XtransConnInfo ** /* ciptrs_ret */