aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
Commit message (Collapse)AuthorAgeFilesLines
* xtrans: silence compiler warning regarding is_numericUlrich Sibiller2016-11-032-1/+4
| | | | | | is_numeric is only needed if X11_t is defined. Silences "warning: ‘is_numeric’ defined but not used [-Wunused-function]"
* libX11 + Xserver: fix missing define warningUlrich Sibiller2016-11-031-1/+1
| | | | | | warning: "XTRANS_SEND_FDS" is not defined [-Wundef] This define came in via the recent xtrans update.
* xtrans: Fix compile warningUlrich Sibiller2016-11-023-20/+20
| | | | warning: format ‘%p’ expects argument of type ‘void *’
* xtrans: fix compilation warnings because of missing XTRANS_SEND_FDSUlrich Sibiller2016-11-022-2/+2
|
* Whitespace fixesUlrich Sibiller2016-11-023-4/+4
|
* Xtrans: update to Xorg/xtrans upstream (1.3.5+)Ulrich Sibiller2016-11-027-912/+1352
| | | | | | | | | | | | | | | 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>
* Remove __UNIXOS2__ referencesUlrich Sibiller2016-11-023-8/+8
|
* remove CLTS codeAdam Jackson2016-11-025-491/+1
| | | | | | | | | | Remove CLTS code Never been used, as far as I can tell. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* use %p in format stringsUlrich Sibiller2016-11-022-5/+5
|
* replace PRMSG by prmsgUlrich Sibiller2016-11-026-524/+499
|
* align license headers with Xorg/xtrans upstreamUlrich Sibiller2016-11-027-22/+29
|
* move helper functions to file endUlrich Sibiller2016-11-021-142/+148
| | | | this simplyfies updating to Xorg/xtrans upstream
* Fixed #ifdef checks that were using i386 to use __i386__Jeremy Huddleston2016-11-023-11/+11
| | | | | | | | | | | | | | | | | """ It's simply obsolete, sloppy, compiler namespace pollution. The compiler is not allowed to predefine symbols that might conflict with ordinary identifiers. For backwards compatibility gcc currently predefines i386 when compiling for x86 32-bit (but not 64-bit), but that will go away. It is also not defined if you specify -ansi when invoking the compiler, because then it is seriously standards compliant. Other compilers shouldn't define it either. Correct code shouldn't rely on it being defined. However __i386__ is safe and proper. """ Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* whitespace cleanupUlrich Sibiller2016-11-026-107/+108
| | | | empty lines and trailing whitespace
* Drastically simplify TRANS_OPEN_MAX.Adam Jackson2016-11-022-54/+3
| | | | | | If your OS doesn't have sysconf(3), then life is already hard for you. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* undef __QNX__Ulrich Sibiller2016-11-022-5/+5
|
* undef LynxUlrich Sibiller2016-11-024-21/+5
|
* undef AIXV3Ulrich Sibiller2016-11-022-4/+4
|
* undef hpuxUlrich Sibiller2016-11-023-91/+4
|
* undef __UNIXOS2__Ulrich Sibiller2016-11-024-49/+0
|
* Remove OS2PIPECONN transportUlrich Sibiller2016-11-026-901/+8
|
* Remove unused TLI ("STREAMSCONN") codeUlrich Sibiller2016-11-026-1446/+10
|
* remove DECnet supportUlrich Sibiller2016-11-027-764/+16
| | | | just as Xorg upstream did
* remove unused mkks.shUlrich Sibiller2016-11-021-11/+0
| | | | although upstream still includes it.
* remove unused jump_* files from libX11Ulrich Sibiller2016-11-023-1618/+0
|
* remove *-def.cppUlrich Sibiller2016-11-021-2011/+0
| | | | never used
* libX11/Imakefile: handle libX11 linksUlrich Sibiller2016-11-021-0/+27
| | | | | | | | | | Create libX11* link in exports/lib. This simplifies running nxagent from the build directory. This also adds a clean rule to remove the libX11 links as well as the libNX_X11 links which was not done before. Fixes ArcticaProject/nx-libs#234
* libX11/Imakefile: add missing dependencies on ks_tables.hUlrich Sibiller2016-11-021-0/+3
|
* Imakefile cleanup: Delete all ancient Vcs comments stemming from SVN times ↵Mike Gabriel2016-10-319-17/+0
| | | | | | of X.org and XFree86. Fixes ArcticaProject/nx-libs#250.
* Plug a memory leakEmilio Pozuelo Monfort2016-10-271-0/+2
| | | | | | | | This was introduced in 8ea762f. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* LRGB.c: Fix label defined but not usedUlrich Sibiller2016-10-201-3/+0
| | | | | | | LRGB.c: In function ‘LINEAR_RGB_InitSCCData’: LRGB.c:798:1: warning: label ‘FreeBlueTblElements’ defined but not used [-Wunused-label] FreeBlueTblElements: ^
* Fixes: warning: variable 'req' set but not,usedwalter harms2016-10-2017-18/+18
| | | | | | | | | | Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable] by marking req _X_UNUSED Solution was discussed on xorg-devel ML Peter Hutter, Alan Coopersmith Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign] Signed-off-by: harms wharms@bfs.de
* fix: warning: pointer targets in passing argument 2 of '_XSend' differ in ↵walter harms2016-10-201-2/+2
| | | | | | | signedness [-Wpointer-sign] fix signess warning by casting Signed-off-by: walter harms <wharms@bfs.de>
* no need to check args for Xfree()walter harms2016-10-201-41/+33
| | | | | | simplify code Signed-off-by: walter harms <wharms@bfs.de>
* remove stray externwalter harms2016-10-201-1/+1
| | | | | | remove stray extern Signed-off-by: walter harms <wharms@bfs.de>
* Fix warnings in XlibInt.cUlrich Sibiller2016-10-202-0/+7
| | | | | | | | | | | | XlibInt.c: In function ‘_XIOError’: XlibInt.c:3750:1: warning: ‘noreturn’ function does return [enabled by default] } After fixing the above a new warning came up, which is also fixed now: XlibInt.c: In function ‘_XIOError’: XlibInt.c:3750:1: warning: control reaches end of non-void function [-Wreturn-type] }
* imLcIm.c: Fix unused variablesUlrich Sibiller2016-10-201-3/+4
| | | | | | | | | imLcIm.c: In function ‘_XimCreateDefaultTree’: imLcIm.c:525:11: warning: unused variable ‘cachedir’ [-Wunused-variable] char *cachedir = NULL; ^ imLcIm.c:521:35: warning: variable ‘intname’ set but not used [-Wunused-but-set-variable] char *name, *tmpname = NULL, *intname;
* Pending.c: Fix compilation warningUlrich Sibiller2016-10-201-2/+2
| | | | | | | Pending.c: In function ‘XEventsQueued’: Pending.c:44:5: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘struct Display *’ [-Wformat=] fprintf(stderr, "\nXEventsQueued: Called with a display at [%p].\n", dpy); ^
* Fix libX11 implicit declaration warningsUlrich Sibiller2016-10-201-2/+2
| | | | | | | | all _X11Trans* functions lead to a warnign like this: implicit declaration of function ‘_X11TransOpenCOTSClient’ [-Wimplicit-function-declaration] Fix it by partly reverting d3ae0b2c9559e70448746240caaf5634c78d0eef (which removed too much)
* Drop nx-X11/lib/X11/libX11.elist. Not needed for anything nowadays. Probably ↵Mike Gabriel2016-10-201-41/+0
| | | | never was needed in nx-X11.
* Validation of server responses in XGetImage()Tobias Stoeckmann2016-10-191-9/+20
| | | | | | | | | | Check if enough bytes were received for specified image type and geometry. Otherwise GetPixel and other functions could trigger an out of boundary read later on. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* The validation of server responses avoids out of boundary accesses.Tobias Stoeckmann2016-10-193-11/+27
| | | | | | | | | v2: FontNames.c return a NULL list whenever a single length field from the server is incohent. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xcms: use size_t for pointer offsets passed to strncmpAlan Coopersmith2016-10-195-10/+10
| | | | | | | | | | | | | instead of converting to int and back Fixes clang warnings of the form: HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) { ~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xcms: use unsigned indexes when looping through unsigned valuesAlan Coopersmith2016-10-196-11/+11
| | | | | | | | | | | | | Clears many gcc warnings of the form: uvY.c: In function ‘XcmsCIEuvYToCIEXYZ’: uvY.c:263:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < nColors; i++, pColor++) { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xcms: use size_t for strlen/sizeof values instead of converting to int & backAlan Coopersmith2016-10-192-2/+2
| | | | | | | | | | | | | | | | | | | | | Fixes gcc warnings of the form: IdOfPr.c: In function ‘XcmsFormatOfPrefix’: IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((len = strlen(prefix)) >= sizeof(string_buf)) { ^ IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Xlib.h: Fix macros imitating C functions.Dominik Muth2016-10-191-17/+17
| | | | | | | | | | | | | | | | | | The basic rule "put parantheses around macro parameters" should be observed where possible. Otherwise code like ConnectionNumber(foo = bar); fails to compile. (It obviously passes if ConnectionNumber is a C function.) There are several other macros amended for the same reason. This bug appeared while building http://ioccc.org/1993/cmills.c, so historically it was not present. Signed-off-by: Dominik Muth <muth@nxdomain.no-ip.biz> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XKB: fix XkbGetKeyboardByName with Xming serverOlivier Fourdan2016-10-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | XkbGetKeyboardByName relies on flags to read the data from the server. If the X server sends us the wrong flags or if a subreply is smaller than it should be, XkbGetKeyboardByName will not read all the available data and leave data in the buffer, which will cause the next _XReply() to fail with: [xcb] Extra reply data still left in queue [xcb] This is most likely caused by a broken X extension library [xcb] Aborting, sorry about that. xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed. Aborted Check if there is some extra data left at the end of XkbGetKeyboardByName() and discard that data if any is found. Many thanks to Peter Hutterer <peter.hutterer@who-t.net> for finding the root cause of the issue and Adam Jackson <ajax@redhat.com> for helping with the analysis! Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* lcPubWrap: replace malloc(strlen) + strcpy with strdupAlan Coopersmith2016-10-191-2/+1
| | | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XlcDL.c: reduce code duplicationAlan Coopersmith2016-10-191-12/+10
| | | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XlcDL.c: replace strcpy+strcat sequences with snprintfAlan Coopersmith2016-10-191-6/+8
| | | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>