upgpkg: ocaml-integers 0.5.0-1
[arch-packages.git] / xorg-luit / trunk / git_fixes.diff
blob928caca0fa83fbf323315246a5617626d9e037db
1 From 473959141641b6779e6ff3c3c5b6ef326073bcd4 Mon Sep 17 00:00:00 2001
2 From: Mike FABIAN <mfabian@redhat.com>
3 Date: Tue, 07 Jun 2011 11:42:00 +0000
4 Subject: Set up terminal before fork.
6 After the fork it is undefined wether parent or child runs
7 first. So there can be a race: if the child runs before the
8 terminal of the parent is set up correctly luit may hang.
9 This patch sets up the terminal before forking and undoes
10 the settings in the child.
12 Signed-off-by: Mike FABIAN <mfabian@redhat.com>
13 Signed-off-by: Egbert Eich <eich@freedesktop.org>
14 ---
15 diff --git a/luit.c b/luit.c
16 index 0ece7b6..5cb3b8f 100644
17 --- a/luit.c
18 +++ b/luit.c
19 @@ -577,6 +577,8 @@ condom(int argc, char **argv)
20 IGNORE_RC(pipe(c2p_waitpipe));
23 + setup_io(pty);
25 pid = fork();
26 if (pid < 0) {
27 perror("Couldn't fork");
28 @@ -584,6 +586,10 @@ condom(int argc, char **argv)
31 if (pid == 0) {
32 +#ifdef SIGWINCH
33 + installHandler(SIGWINCH, SIG_DFL);
34 +#endif
35 + installHandler(SIGCHLD, SIG_DFL);
36 close(pty);
37 if (pipe_option) {
38 close_waitpipe(1);
39 @@ -661,7 +667,6 @@ parent(int pid GCC_UNUSED, int pty)
40 if (verbose) {
41 reportIso2022(outputState);
43 - setup_io(pty);
45 if (pipe_option) {
46 write_waitpipe(p2c_waitpipe);
48 cgit v0.9.0.2-2-gbebe
50 From 09f4907e4ab4ba3654de829bf3ac2a4a02bb9ef4 Mon Sep 17 00:00:00 2001
51 From: Alan Coopersmith <alan.coopersmith@oracle.com>
52 Date: Sat, 22 Jun 2013 04:11:43 +0000
53 Subject: Fix GCC_UNUSED definition to actually work with -Wunused-parameter
55 Silences warnings of:
56 charset.c: In function ‘IdentityRecode’:
57 charset.c:42:51: warning: unused parameter ‘self’ [-Wunused-parameter]
58 charset.c: In function ‘NullReverse’:
59 charset.c:84:26: warning: unused parameter ‘n’ [-Wunused-parameter]
60 charset.c:84:59: warning: unused parameter ‘self’ [-Wunused-parameter]
61 other.c: In function ‘mapping_utf8’:
62 other.c:108:44: warning: unused parameter ‘s’ [-Wunused-parameter]
63 other.c: In function ‘reverse_utf8’:
64 other.c:114:44: warning: unused parameter ‘s’ [-Wunused-parameter]
65 luit.c: In function ‘sigwinchHandler’:
66 luit.c:463:21: warning: unused parameter ‘sig’ [-Wunused-parameter]
67 luit.c: In function ‘sigchldHandler’:
68 luit.c:470:20: warning: unused parameter ‘sig’ [-Wunused-parameter]
69 luit.c: In function ‘parent’:
70 luit.c:657:12: warning: unused parameter ‘pid’ [-Wunused-parameter]
72 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
73 ---
74 diff --git a/other.h b/other.h
75 index 9d814a3..d18b586 100644
76 --- a/other.h
77 +++ b/other.h
78 @@ -26,7 +26,11 @@ THE SOFTWARE.
79 #include "config.h" /* include this, for self-contained headers */
81 #ifndef GCC_UNUSED
82 -#define GCC_UNUSED /* ARGSUSED */
83 +# if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
84 +# define GCC_UNUSED __attribute__((__unused__))
85 +# else
86 +# define GCC_UNUSED /* ARGSUSED */
87 +# endif
88 #endif
90 #include <X11/fonts/fontenc.h>
92 cgit v0.9.0.2-2-gbebe
94 From 445863f8b5059692ac7a4df785af6920849faa82 Mon Sep 17 00:00:00 2001
95 From: Alan Coopersmith <alan.coopersmith@oracle.com>
96 Date: Sat, 13 Jul 2013 16:08:34 +0000
97 Subject: config: Add missing AC_CONFIG_SRCDIR
99 Regroup AC statements under the Autoconf initialization section.
100 Regroup AM statements under the Automake initialization section.
102 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
103 Reviewed-by: Julien Cristau <jcristau@debian.org>
104 Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
106 diff --git a/configure.ac b/configure.ac
107 index c214d85..946db23 100644
108 --- a/configure.ac
109 +++ b/configure.ac
110 @@ -20,9 +20,14 @@ dnl PERFORMANCE OF THIS SOFTWARE.
112 dnl Process this file with autoconf to create configure.
114 +# Initialize Autoconf
115 AC_PREREQ([2.60])
116 AC_INIT([luit], [1.1.1],
117 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [luit])
118 +AC_CONFIG_SRCDIR([Makefile.am])
119 +AC_CONFIG_HEADERS([config.h])
121 +# Initialize Automake
122 AM_INIT_AUTOMAKE([foreign dist-bzip2])
123 AM_MAINTAINER_MODE
125 @@ -32,8 +37,6 @@ m4_ifndef([XORG_MACROS_VERSION],
126 XORG_MACROS_VERSION(1.8)
127 XORG_DEFAULT_OPTIONS
129 -AC_CONFIG_HEADERS([config.h])
131 AC_CANONICAL_HOST
135 cgit v0.9.0.2-2-gbebe
137 From 800f55f8dcd195dd0cdfc1c4d7487d00bb7745f4 Mon Sep 17 00:00:00 2001
138 From: Alan Coopersmith <alan.coopersmith@oracle.com>
139 Date: Sat, 13 Jul 2013 16:11:20 +0000
140 Subject: Replace hardcoded _XOPEN_SOURCE=500 with AC_USE_SYSTEM_EXTENSIONS
142 -D_XOPEN_SOURCE was originally added for Linux in commit e751086392e837
143 and then updated to -D_XOPEN_SOURCE=500 in commit e1a002217cabdb to
144 expose strdup() in glibc headers.
146 As noted in bug 47792 though, the posix_openpt() function is not
147 visible unless that's raised to 600.
149 Instead of continually chasing the standards ourselves, switch to letting
150 autoconf handle that for us.
152 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
153 Reviewed-by: Julien Cristau <jcristau@debian.org>
154 Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
156 diff --git a/Makefile.am b/Makefile.am
157 index 8069670..ef042e3 100644
158 --- a/Makefile.am
159 +++ b/Makefile.am
160 @@ -25,7 +25,6 @@ bin_PROGRAMS = luit
161 AM_CFLAGS = \
162 $(CWARNFLAGS) \
163 $(LUIT_CFLAGS) \
164 - $(OS_CFLAGS) \
165 -DLOCALE_ALIAS_FILE=\"$(LOCALEALIASFILE)\"
167 luit_LDADD = $(LUIT_LIBS)
168 diff --git a/configure.ac b/configure.ac
169 index 946db23..0ec4664 100644
170 --- a/configure.ac
171 +++ b/configure.ac
172 @@ -26,6 +26,7 @@ AC_INIT([luit], [1.1.1],
173 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [luit])
174 AC_CONFIG_SRCDIR([Makefile.am])
175 AC_CONFIG_HEADERS([config.h])
176 +AC_USE_SYSTEM_EXTENSIONS
178 # Initialize Automake
179 AM_INIT_AUTOMAKE([foreign dist-bzip2])
180 @@ -37,9 +38,6 @@ m4_ifndef([XORG_MACROS_VERSION],
181 XORG_MACROS_VERSION(1.8)
182 XORG_DEFAULT_OPTIONS
184 -AC_CANONICAL_HOST
187 AC_CHECK_HEADERS([pty.h stropts.h sys/param.h sys/select.h])
188 AC_CHECK_FUNCS([select grantpt posix_openpt])
190 @@ -57,23 +55,16 @@ PKG_CHECK_MODULES(LUIT, fontenc)
191 PKG_CHECK_EXISTS(x11, [],
192 [AC_MSG_WARN([libX11 not found. luit may not be able to find locale aliases without it.])])
194 +AC_CANONICAL_HOST
195 case $host_os in
196 # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
197 darwin*)
198 - OS_CFLAGS=
199 - ;;
200 - linux*)
201 - AC_CHECK_HEADERS([poll.h])
202 - AC_CHECK_FUNCS([poll])
203 - OS_CFLAGS="-D_XOPEN_SOURCE=500"
206 AC_CHECK_HEADERS([poll.h])
207 AC_CHECK_FUNCS([poll])
208 - OS_CFLAGS=
210 esac
211 -AC_SUBST(OS_CFLAGS)
213 AC_CHECK_HEADERS([pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.h])
214 AC_CHECK_FUNCS([grantpt putenv select strdup])
216 cgit v0.9.0.2-2-gbebe
218 From e1f495359a74342352c4d6641c0002c7c79327ba Mon Sep 17 00:00:00 2001
219 From: Alan Coopersmith <alan.coopersmith@oracle.com>
220 Date: Sat, 13 Jul 2013 16:15:16 +0000
221 Subject: Merge overlapping AC_CHECK_HEADERS & AC_CHECK_FUNCS calls into one set
223 Duplication introduced when merging in changes in commit fddfe30c3ff91c
225 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
226 Reviewed-by: Julien Cristau <jcristau@debian.org>
227 Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
229 diff --git a/configure.ac b/configure.ac
230 index 0ec4664..1c6f2c9 100644
231 --- a/configure.ac
232 +++ b/configure.ac
233 @@ -38,9 +38,6 @@ m4_ifndef([XORG_MACROS_VERSION],
234 XORG_MACROS_VERSION(1.8)
235 XORG_DEFAULT_OPTIONS
237 -AC_CHECK_HEADERS([pty.h stropts.h sys/param.h sys/select.h])
238 -AC_CHECK_FUNCS([select grantpt posix_openpt])
240 AC_ARG_WITH(localealiasfile,
241 AS_HELP_STRING([--with-localealiasfile=<path>],
242 [The locale alias file (default: ${datadir}/X11/locale/locale.alias)]),
243 @@ -67,7 +64,7 @@ case $host_os in
244 esac
246 AC_CHECK_HEADERS([pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.h])
247 -AC_CHECK_FUNCS([grantpt putenv select strdup])
248 +AC_CHECK_FUNCS([grantpt posix_openpt putenv select strdup])
250 if test "x$ac_cv_func_grantpt" != "xyes" ; then
251 AC_CHECK_LIB(util, openpty, [cf_have_openpty=yes],[cf_have_openpty=no])
253 cgit v0.9.0.2-2-gbebe