Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/libexplain/files: libexplain-1.1-yacc.patch libexplain-1.1-v4l2.patch
Date: Thu, 31 Jan 2013 12:57:05
Message-Id: 20130131125701.DC0D62171E@flycatcher.gentoo.org
1 jlec 13/01/31 12:57:01
2
3 Added: libexplain-1.1-yacc.patch libexplain-1.1-v4l2.patch
4 Log:
5 dev-libs/libexplain: Version BUmp; add fix for bison-2.6, #429552; backport fix for recent changes in linux-header regarding v4l2, #438486
6
7 (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
8
9 Revision Changes Path
10 1.1 dev-libs/libexplain/files/libexplain-1.1-yacc.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libexplain/files/libexplain-1.1-yacc.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libexplain/files/libexplain-1.1-yacc.patch?rev=1.1&content-type=text/plain
14
15 Index: libexplain-1.1-yacc.patch
16 ===================================================================
17 codegen/gram.y | 1 -
18 1 file changed, 1 deletion(-)
19
20 diff --git a/codegen/gram.y b/codegen/gram.y
21 index f0294ae..0934643 100644
22 --- a/codegen/gram.y
23 +++ b/codegen/gram.y
24 @@ -258,7 +258,6 @@ yyerror(const char *s)
25 }
26
27
28 -static int yyparse(void);
29 static node_t *result;
30 #if YYDEBUG
31 extern int yydebug;
32
33
34
35 1.1 dev-libs/libexplain/files/libexplain-1.1-v4l2.patch
36
37 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libexplain/files/libexplain-1.1-v4l2.patch?rev=1.1&view=markup
38 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libexplain/files/libexplain-1.1-v4l2.patch?rev=1.1&content-type=text/plain
39
40 Index: libexplain-1.1-v4l2.patch
41 ===================================================================
42 etc/configure.ac | 15 +++++++++++++++
43 libexplain/buffer/v4l2_buf_flags.c | 4 +++-
44 libexplain/buffer/v4l2_buffer.c | 4 +++-
45 libexplain/config.h.in | 4 ++++
46 test/05/t0570a.sh | 18 +++++++++++++++---
47 test_config/configured.h | 7 +++++++
48 6 files changed, 47 insertions(+), 5 deletions(-)
49
50 diff --git a/etc/configure.ac b/etc/configure.ac
51 index 54b7dd3..ddf3683 100644
52 --- a/etc/configure.ac
53 +++ b/etc/configure.ac
54 @@ -1326,6 +1326,21 @@ AC_MSG_RESULT([yes]),
55 AC_MSG_RESULT([no]),
56 AC_MSG_RESULT(cross))
57
58 +AC_MSG_CHECKING([whether <linux/videodev2.h> defines struct v4l2_buffer::input])
59 +AC_TRY_RUN([
60 +#include <linux/videodev2.h>
61 +int main(argc, argv)int argc; char **argv;{
62 +struct v4l2_buffer x;
63 +printf("%d\n", (int)x.input);
64 +return 0;
65 +}]
66 +, AC_DEFINE(LINUX_VIDEODEV2_H_struct_v4l2_buffer_input,1,
67 +[Define this symbol if your system has <linux/videodev2.h> AND it
68 +defines struct v4l2_buffer AND it has an 'input' member.])
69 +AC_MSG_RESULT([yes]),
70 +AC_MSG_RESULT([no]),
71 +AC_MSG_RESULT(cross))
72 +
73 dnl!
74 dnl! Look for the NAME_MAX symbol. This is the maximum length of a
75 dnl! pathname component (between th slashes) in a path.
76 diff --git a/libexplain/buffer/v4l2_buf_flags.c b/libexplain/buffer/v4l2_buf_flags.c
77 index 4888040..eec4cb0 100644
78 --- a/libexplain/buffer/v4l2_buf_flags.c
79 +++ b/libexplain/buffer/v4l2_buf_flags.c
80 @@ -1,6 +1,6 @@
81 /*
82 * libexplain - a library of system-call-specific strerror replacements
83 - * Copyright (C) 2011 Peter Miller
84 + * Copyright (C) 2011, 2012 Peter Miller
85 *
86 * This program is free software; you can redistribute it and/or modify
87 * it under the terms of the GNU Lesser General Public License as
88 @@ -40,7 +40,9 @@ explain_buffer_v4l2_buf_flags(explain_string_buffer_t *sb, int value)
89 { "V4L2_BUF_FLAG_ERROR", V4L2_BUF_FLAG_ERROR },
90 #endif
91 { "V4L2_BUF_FLAG_TIMECODE", V4L2_BUF_FLAG_TIMECODE },
92 +#ifdef V4L2_BUF_FLAG_INPUT
93 { "V4L2_BUF_FLAG_INPUT", V4L2_BUF_FLAG_INPUT },
94 +#endif
95 };
96
97 explain_parse_bits_print(sb, value, table, SIZEOF(table));
98 diff --git a/libexplain/buffer/v4l2_buffer.c b/libexplain/buffer/v4l2_buffer.c
99 index d38d074..e5f82b3 100644
100 --- a/libexplain/buffer/v4l2_buffer.c
101 +++ b/libexplain/buffer/v4l2_buffer.c
102 @@ -1,6 +1,6 @@
103 /*
104 * libexplain - a library of system-call-specific strerror replacements
105 - * Copyright (C) 2011 Peter Miller
106 + * Copyright (C) 2011, 2012 Peter Miller
107 *
108 * This program is free software; you can redistribute it and/or modify
109 * it under the terms of the GNU Lesser General Public License as
110 @@ -87,8 +87,10 @@ explain_buffer_v4l2_buffer(explain_string_buffer_t *sb,
111 }
112 explain_string_buffer_puts(sb, ", length = ");
113 explain_buffer_uint32_t(sb, data->length);
114 +#ifdef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input
115 explain_string_buffer_puts(sb, ", input = ");
116 explain_buffer_uint32_t(sb, data->input);
117 +#endif
118 if (data->reserved)
119 {
120 explain_string_buffer_puts(sb, ", reserved = ");
121 diff --git a/libexplain/config.h.in b/libexplain/config.h.in
122 index 56ec796..ae83dbd 100644
123 --- a/libexplain/config.h.in
124 +++ b/libexplain/config.h.in
125 @@ -1041,6 +1041,10 @@
126 ustat. */
127 #undef LINUX_TYPES_H_STRUCT_USTAT
128
129 +/* Define this symbol if your system has <linux/videodev2.h> AND it defines
130 + struct v4l2_buffer AND it has an 'input' member. */
131 +#undef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input
132 +
133 /* Define this symbol if your system is able to include <net/if.h> and
134 <linux/if.h> in the compilation unit. */
135 #undef NET_IF_LINUX_IF_PLAY_NICE
136 diff --git a/test/05/t0570a.sh b/test/05/t0570a.sh
137 index ba1f79e..e653eed 100644
138 --- a/test/05/t0570a.sh
139 +++ b/test/05/t0570a.sh
140 @@ -1,7 +1,7 @@
141 #!/bin/sh
142 #
143 # libexplain - a library of system-call-specific strerror replacements
144 -# Copyright (C) 2011 Peter Miller
145 +# Copyright (C) 2011, 2012 Peter Miller
146 # Written by Peter Miller <pmiller@××××××××××××××.au>
147 #
148 # This program is free software; you can redistribute it and/or modify it
149 @@ -23,7 +23,7 @@ TEST_SUBJECT="ioctl VIDIOC_QBUF"
150
151 test_config HAVE_LINUX_VIDEODEV2_H || pass
152
153 -cat > test.ok << 'fubar'
154 +cat > test.ok.1 << 'fubar'
155 ioctl(fildes = 42, request = VIDIOC_QBUF, struct v4l2_buffer *data = {
156 index = 0, type = 0, bytesused = 0, flags = 0, field = V4L2_FIELD_ANY,
157 timestamp = { 0 seconds }, timecode = { type = 0, flags = 0, frames = 0,
158 @@ -33,10 +33,22 @@ argument was incorrectly specified
159 fubar
160 test $? -eq 0 || no_result
161
162 +cat > test.ok.2 << 'fubar'
163 +ioctl(fildes = 42, request = VIDIOC_QBUF, struct v4l2_buffer *data = {
164 +index = 0, type = 0, bytesused = 0, flags = 0, field = V4L2_FIELD_ANY,
165 +timestamp = { 0 seconds }, timecode = { type = 0, flags = 0, frames = 0,
166 +seconds = 0, minutes = 0, hours = 0 }, sequence = 0, memory = 0, length = 0
167 +}) failed, Invalid argument (EINVAL) because the data->type argument was
168 +incorrectly specified
169 +fubar
170 +test $? -eq 0 || no_result
171 +
172 explain -e EINVAL ioctl 42 VIDIOC_QBUF > test.out
173 test $? -eq 0 || fail
174
175 -diff test.ok test.out
176 +diff test.ok.2 test.out > /dev/null 2>&1 && pass
177 +
178 +diff test.ok.1 test.out
179 test $? -eq 0 || fail
180
181 #
182 diff --git a/test_config/configured.h b/test_config/configured.h
183 index e29cb55..7fc6a77 100644
184 --- a/test_config/configured.h
185 +++ b/test_config/configured.h
186 @@ -2329,6 +2329,13 @@
187 0
188 #endif
189 },
190 +{ "LINUX_VIDEODEV2_H_struct_v4l2_buffer_input",
191 +#ifdef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input
192 +1
193 +#else
194 +0
195 +#endif
196 +},
197 { "NET_IF_LINUX_IF_PLAY_NICE",
198 #ifdef NET_IF_LINUX_IF_PLAY_NICE
199 1