merge libxcb 1.13.diff -r1.1.1.1 -r0 xsrc/external/mit/libxcb/dist/compile
(mrg)
--- xsrc/external/mit/libxcb/dist/src/xcb_in.c 2016/10/04 22:01:49 1.5
+++ xsrc/external/mit/libxcb/dist/src/xcb_in.c 2018/03/14 06:43:45 1.6
@@ -651,43 +651,47 @@ void xcb_discard_reply64(xcb_connection_ | @@ -651,43 +651,47 @@ void xcb_discard_reply64(xcb_connection_ | |||
651 | int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error) | 651 | int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error) | |
652 | { | 652 | { | |
653 | int ret; | 653 | int ret; | |
654 | if(c->has_error) | 654 | if(c->has_error) | |
655 | { | 655 | { | |
656 | *reply = 0; | 656 | *reply = 0; | |
657 | if(error) | 657 | if(error) | |
658 | *error = 0; | 658 | *error = 0; | |
659 | return 1; /* would not block */ | 659 | return 1; /* would not block */ | |
660 | } | 660 | } | |
661 | assert(reply != 0); | 661 | assert(reply != 0); | |
662 | pthread_mutex_lock(&c->iolock); | 662 | pthread_mutex_lock(&c->iolock); | |
663 | ret = poll_for_reply(c, widen(c, request), reply, error); | 663 | ret = poll_for_reply(c, widen(c, request), reply, error); | |
664 | if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ | |||
665 | ret = poll_for_reply(c, widen(c, request), reply, error); | |||
664 | pthread_mutex_unlock(&c->iolock); | 666 | pthread_mutex_unlock(&c->iolock); | |
665 | return ret; | 667 | return ret; | |
666 | } | 668 | } | |
667 | 669 | |||
668 | int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error) | 670 | int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error) | |
669 | { | 671 | { | |
670 | int ret; | 672 | int ret; | |
671 | if(c->has_error) | 673 | if(c->has_error) | |
672 | { | 674 | { | |
673 | *reply = 0; | 675 | *reply = 0; | |
674 | if(error) | 676 | if(error) | |
675 | *error = 0; | 677 | *error = 0; | |
676 | return 1; /* would not block */ | 678 | return 1; /* would not block */ | |
677 | } | 679 | } | |
678 | assert(reply != 0); | 680 | assert(reply != 0); | |
679 | pthread_mutex_lock(&c->iolock); | 681 | pthread_mutex_lock(&c->iolock); | |
680 | ret = poll_for_reply(c, request, reply, error); | 682 | ret = poll_for_reply(c, request, reply, error); | |
683 | if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ | |||
684 | ret = poll_for_reply(c, request, reply, error); | |||
681 | pthread_mutex_unlock(&c->iolock); | 685 | pthread_mutex_unlock(&c->iolock); | |
682 | return ret; | 686 | return ret; | |
683 | } | 687 | } | |
684 | 688 | |||
685 | xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c) | 689 | xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c) | |
686 | { | 690 | { | |
687 | xcb_generic_event_t *ret; | 691 | xcb_generic_event_t *ret; | |
688 | if(c->has_error) | 692 | if(c->has_error) | |
689 | return 0; | 693 | return 0; | |
690 | pthread_mutex_lock(&c->iolock); | 694 | pthread_mutex_lock(&c->iolock); | |
691 | /* get_event returns 0 on empty list. */ | 695 | /* get_event returns 0 on empty list. */ | |
692 | while(!(ret = get_event(c))) | 696 | while(!(ret = get_event(c))) | |
693 | if(!_xcb_conn_wait(c, &c->in.event_cond, 0, 0)) | 697 | if(!_xcb_conn_wait(c, &c->in.event_cond, 0, 0)) | |
@@ -758,26 +762,28 @@ static xcb_generic_event_t *get_special_ | @@ -758,26 +762,28 @@ static xcb_generic_event_t *get_special_ | |||
758 | } | 762 | } | |
759 | return event; | 763 | return event; | |
760 | } | 764 | } | |
761 | 765 | |||
762 | xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, | 766 | xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, | |
763 | xcb_special_event_t *se) | 767 | xcb_special_event_t *se) | |
764 | { | 768 | { | |
765 | xcb_generic_event_t *event; | 769 | xcb_generic_event_t *event; | |
766 | 770 | |||
767 | if(c->has_error) | 771 | if(c->has_error) | |
768 | return 0; | 772 | return 0; | |
769 | pthread_mutex_lock(&c->iolock); | 773 | pthread_mutex_lock(&c->iolock); | |
770 | event = get_special_event(c, se); | 774 | event = get_special_event(c, se); | |
775 | if(!event && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ | |||
776 | event = get_special_event(c, se); | |||
771 | pthread_mutex_unlock(&c->iolock); | 777 | pthread_mutex_unlock(&c->iolock); | |
772 | return event; | 778 | return event; | |
773 | } | 779 | } | |
774 | 780 | |||
775 | xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c, | 781 | xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c, | |
776 | xcb_special_event_t *se) | 782 | xcb_special_event_t *se) | |
777 | { | 783 | { | |
778 | special_list special; | 784 | special_list special; | |
779 | xcb_generic_event_t *event; | 785 | xcb_generic_event_t *event; | |
780 | 786 | |||
781 | if(c->has_error) | 787 | if(c->has_error) | |
782 | return 0; | 788 | return 0; | |
783 | pthread_mutex_lock(&c->iolock); | 789 | pthread_mutex_lock(&c->iolock); |
--- xsrc/external/mit/libxcb/include/config.h 2017/03/05 08:58:25 1.7
+++ xsrc/external/mit/libxcb/include/config.h 2018/03/14 06:43:45 1.8
@@ -65,42 +65,42 @@ | @@ -65,42 +65,42 @@ | |||
65 | */ | 65 | */ | |
66 | #define LT_OBJDIR ".libs/" | 66 | #define LT_OBJDIR ".libs/" | |
67 | 67 | |||
68 | /* Name of package */ | 68 | /* Name of package */ | |
69 | #define PACKAGE "libxcb" | 69 | #define PACKAGE "libxcb" | |
70 | 70 | |||
71 | /* Define to the address where bug reports for this package should be sent. */ | 71 | /* Define to the address where bug reports for this package should be sent. */ | |
72 | #define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=xcb" | 72 | #define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=xcb" | |
73 | 73 | |||
74 | /* Define to the full name of this package. */ | 74 | /* Define to the full name of this package. */ | |
75 | #define PACKAGE_NAME "libxcb" | 75 | #define PACKAGE_NAME "libxcb" | |
76 | 76 | |||
77 | /* Define to the full name and version of this package. */ | 77 | /* Define to the full name and version of this package. */ | |
78 | #define PACKAGE_STRING "libxcb 1.12" | 78 | #define PACKAGE_STRING "libxcb 1.13" | |
79 | 79 | |||
80 | /* Define to the one symbol short name of this package. */ | 80 | /* Define to the one symbol short name of this package. */ | |
81 | #define PACKAGE_TARNAME "libxcb" | 81 | #define PACKAGE_TARNAME "libxcb" | |
82 | 82 | |||
83 | /* Define to the home page for this package. */ | 83 | /* Define to the home page for this package. */ | |
84 | #define PACKAGE_URL "" | 84 | #define PACKAGE_URL "" | |
85 | 85 | |||
86 | /* Define to the version of this package. */ | 86 | /* Define to the version of this package. */ | |
87 | #define PACKAGE_VERSION "1.12" | 87 | #define PACKAGE_VERSION "1.13" | |
88 | 88 | |||
89 | /* Major version of this package */ | 89 | /* Major version of this package */ | |
90 | #define PACKAGE_VERSION_MAJOR 1 | 90 | #define PACKAGE_VERSION_MAJOR 1 | |
91 | 91 | |||
92 | /* Minor version of this package */ | 92 | /* Minor version of this package */ | |
93 | #define PACKAGE_VERSION_MINOR 12 | 93 | #define PACKAGE_VERSION_MINOR 13 | |
94 | 94 | |||
95 | /* Patch version of this package */ | 95 | /* Patch version of this package */ | |
96 | #define PACKAGE_VERSION_PATCHLEVEL 0 | 96 | #define PACKAGE_VERSION_PATCHLEVEL 0 | |
97 | 97 | |||
98 | /* Define to 1 if you have the ANSI C header files. */ | 98 | /* Define to 1 if you have the ANSI C header files. */ | |
99 | #define STDC_HEADERS 1 | 99 | #define STDC_HEADERS 1 | |
100 | 100 | |||
101 | /* poll() function is available */ | 101 | /* poll() function is available */ | |
102 | #define USE_POLL 1 | 102 | #define USE_POLL 1 | |
103 | 103 | |||
104 | /* Enable extensions on AIX 3, Interix. */ | 104 | /* Enable extensions on AIX 3, Interix. */ | |
105 | #ifndef _ALL_SOURCE | 105 | #ifndef _ALL_SOURCE | |
106 | # define _ALL_SOURCE 1 | 106 | # define _ALL_SOURCE 1 | |
@@ -114,27 +114,27 @@ | @@ -114,27 +114,27 @@ | |||
114 | # define _POSIX_PTHREAD_SEMANTICS 1 | 114 | # define _POSIX_PTHREAD_SEMANTICS 1 | |
115 | #endif | 115 | #endif | |
116 | /* Enable extensions on HP NonStop. */ | 116 | /* Enable extensions on HP NonStop. */ | |
117 | #ifndef _TANDEM_SOURCE | 117 | #ifndef _TANDEM_SOURCE | |
118 | # define _TANDEM_SOURCE 1 | 118 | # define _TANDEM_SOURCE 1 | |
119 | #endif | 119 | #endif | |
120 | /* Enable general extensions on Solaris. */ | 120 | /* Enable general extensions on Solaris. */ | |
121 | #ifndef __EXTENSIONS__ | 121 | #ifndef __EXTENSIONS__ | |
122 | # define __EXTENSIONS__ 1 | 122 | # define __EXTENSIONS__ 1 | |
123 | #endif | 123 | #endif | |
124 | 124 | |||
125 | 125 | |||
126 | /* Version number of package */ | 126 | /* Version number of package */ | |
127 | #define VERSION "1.12" | 127 | #define VERSION "1.13" | |
128 | 128 | |||
129 | /* XCB buffer queue size */ | 129 | /* XCB buffer queue size */ | |
130 | #define XCB_QUEUE_BUFFER_SIZE 16384 | 130 | #define XCB_QUEUE_BUFFER_SIZE 16384 | |
131 | 131 | |||
132 | /* Define to 1 if on MINIX. */ | 132 | /* Define to 1 if on MINIX. */ | |
133 | /* #undef _MINIX */ | 133 | /* #undef _MINIX */ | |
134 | 134 | |||
135 | /* Define to 2 if the system does not provide POSIX.1 features except with | 135 | /* Define to 2 if the system does not provide POSIX.1 features except with | |
136 | this defined. */ | 136 | this defined. */ | |
137 | /* #undef _POSIX_1_SOURCE */ | 137 | /* #undef _POSIX_1_SOURCE */ | |
138 | 138 | |||
139 | /* Define to 1 if you need to in order for `stat' and other things to work. */ | 139 | /* Define to 1 if you need to in order for `stat' and other things to work. */ | |
140 | /* #undef _POSIX_SOURCE */ | 140 | /* #undef _POSIX_SOURCE */ |