summaryrefslogtreecommitdiffstats
path: root/openembedded/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-09-27 09:46:17 +0000
committerRichard Purdie <richard@openedhand.com>2005-09-27 09:46:17 +0000
commit607b12a07ca910916aa50b0d66d3852785edcd99 (patch)
tree5584ce8247de739f939d1d77765b04efe905e7ec /openembedded/packages
parent4a6c9c2ca185c81cc2617a8d7ec7f02eb8eb1a4c (diff)
downloadpoky-607b12a07ca910916aa50b0d66d3852785edcd99.tar.gz
Add strace, gdb and readline. Update meta-oh.bb to match this.
git-svn-id: https://svn.o-hand.com/repos/poky@38 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages')
-rw-r--r--openembedded/packages/gdb/files/gdbserver-cflags-last.diff13
-rw-r--r--openembedded/packages/gdb/files/libiberty-cross.patch630
-rw-r--r--openembedded/packages/gdb/files/sim-install.patch34
-rw-r--r--openembedded/packages/gdb/files/uclibc.patch194
-rw-r--r--openembedded/packages/gdb/gdb-6.3/uclibc.patch194
-rw-r--r--openembedded/packages/gdb/gdb-cross_6.3.bb36
-rw-r--r--openembedded/packages/gdb/gdb_6.3.bb48
-rw-r--r--openembedded/packages/meta/meta-oh.bb6
-rw-r--r--openembedded/packages/readline/readline-4.3/acinclude.m41815
-rw-r--r--openembedded/packages/readline/readline-4.3/shlink-termcap.patch45
-rw-r--r--openembedded/packages/readline/readline-native_4.3.bb4
-rw-r--r--openembedded/packages/readline/readline_4.3.bb46
-rw-r--r--openembedded/packages/strace/strace-4.5.12/quota.patch10
-rw-r--r--openembedded/packages/strace/strace/arm-syscallent.patch402
-rw-r--r--openembedded/packages/strace/strace_4.5.12.bb13
15 files changed, 3487 insertions, 3 deletions
diff --git a/openembedded/packages/gdb/files/gdbserver-cflags-last.diff b/openembedded/packages/gdb/files/gdbserver-cflags-last.diff
new file mode 100644
index 0000000000..42bd740a7c
--- /dev/null
+++ b/openembedded/packages/gdb/files/gdbserver-cflags-last.diff
@@ -0,0 +1,13 @@
1--- gdb/gdbserver/Makefile.in.orig 2004-10-05 18:52:56.298419032 +0200
2+++ gdb/gdbserver/Makefile.in 2004-10-05 18:53:10.442268840 +0200
3@@ -97,8 +97,8 @@
4 CFLAGS = @CFLAGS@
5
6 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
7-INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
8- ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
9+INTERNAL_CFLAGS = $(WARN_CFLAGS) ${GLOBAL_CFLAGS} \
10+ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS} ${CFLAGS}
11
12 # LDFLAGS is specifically reserved for setting from the command line
13 # when running make.
diff --git a/openembedded/packages/gdb/files/libiberty-cross.patch b/openembedded/packages/gdb/files/libiberty-cross.patch
new file mode 100644
index 0000000000..0d1897f9e0
--- /dev/null
+++ b/openembedded/packages/gdb/files/libiberty-cross.patch
@@ -0,0 +1,630 @@
1--- libiberty/configure.in.old 2004-03-31 21:25:25.000000000 +0100
2+++ libiberty/configure.in 2004-03-31 21:18:02.000000000 +0100
3@@ -100,6 +100,7 @@
4 AC_CHECK_TOOL(RANLIB, ranlib, :)
5
6 LIB_AC_PROG_CC
7+AC_PROG_CC_WORKS
8
9 AC_PROG_CC_C_O
10 # autoconf is lame and doesn't give us any substitution variable for this.
11@@ -402,7 +403,6 @@
12
13 # We haven't set the list of objects yet. Use the standard autoconf
14 # tests. This will only work if the compiler works.
15- AC_PROG_CC_WORKS
16 AC_REPLACE_FUNCS($funcs)
17 libiberty_AC_FUNC_C_ALLOCA
18 AC_FUNC_VFORK
19
20--- libiberty/configure.old 2003-06-19 21:05:35.000000000 +0100
21+++ libiberty/configure 2004-03-31 21:35:12.000000000 +0100
22@@ -1000,13 +1000,60 @@
23 fi
24
25
26+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
27+echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
28+
29+ac_ext=c
30+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
31+ac_cpp='$CPP $CPPFLAGS'
32+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
33+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
34+cross_compiling=$ac_cv_prog_cc_cross
35+
36+cat > conftest.$ac_ext << EOF
37+
38+#line 1016 "configure"
39+#include "confdefs.h"
40+
41+main(){return(0);}
42+EOF
43+if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
44+ ac_cv_prog_cc_works=yes
45+ # If we can't run a trivial program, we are probably using a cross compiler.
46+ if (./conftest; exit) 2>/dev/null; then
47+ ac_cv_prog_cc_cross=no
48+ else
49+ ac_cv_prog_cc_cross=yes
50+ fi
51+else
52+ echo "configure: failed program was:" >&5
53+ cat conftest.$ac_ext >&5
54+ ac_cv_prog_cc_works=no
55+fi
56+rm -fr conftest*
57+ac_ext=c
58+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
59+ac_cpp='$CPP $CPPFLAGS'
60+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
61+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
62+cross_compiling=$ac_cv_prog_cc_cross
63+
64+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
65+if test $ac_cv_prog_cc_works = no; then
66+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
67+fi
68+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
69+echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
70+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
71+cross_compiling=$ac_cv_prog_cc_cross
72+
73
74 if test "x$CC" != xcc; then
75 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
76-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
77+echo "configure:1054: checking whether $CC and cc understand -c and -o together" >&5
78 else
79 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
80-echo "configure:1010: checking whether cc understands -c and -o together" >&5
81+echo "configure:1057: checking whether cc understands -c and -o together" >&5
82 fi
83 set dummy $CC; ac_cc="`echo $2 |
84 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
85@@ -1018,16 +1065,16 @@
86 # We do the test twice because some compilers refuse to overwrite an
87 # existing .o file with -o, though they will create one.
88 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
89-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
90- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
91+if { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
92+ test -f conftest.o && { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
93 then
94 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
95 if test "x$CC" != xcc; then
96 # Test first that cc exists at all.
97- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
98+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
99 ac_try='cc -c conftest.c -o conftest.o 1>&5'
100- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
101- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
102+ if { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
103+ test -f conftest.o && { (eval echo configure:1078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
104 then
105 # cc works too.
106 :
107@@ -1063,7 +1110,7 @@
108
109
110 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
111-echo "configure:1067: checking for POSIXized ISC" >&5
112+echo "configure:1114: checking for POSIXized ISC" >&5
113 if test -d /etc/conf/kconfig.d &&
114 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
115 then
116@@ -1084,12 +1131,12 @@
117 fi
118
119 echo $ac_n "checking for working const""... $ac_c" 1>&6
120-echo "configure:1088: checking for working const" >&5
121+echo "configure:1135: checking for working const" >&5
122 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
123 echo $ac_n "(cached) $ac_c" 1>&6
124 else
125 cat > conftest.$ac_ext <<EOF
126-#line 1093 "configure"
127+#line 1140 "configure"
128 #include "confdefs.h"
129
130 int main() {
131@@ -1138,7 +1185,7 @@
132
133 ; return 0; }
134 EOF
135-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
136+if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
137 rm -rf conftest*
138 ac_cv_c_const=yes
139 else
140@@ -1159,21 +1206,21 @@
141 fi
142
143 echo $ac_n "checking for inline""... $ac_c" 1>&6
144-echo "configure:1163: checking for inline" >&5
145+echo "configure:1210: checking for inline" >&5
146 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
147 echo $ac_n "(cached) $ac_c" 1>&6
148 else
149 ac_cv_c_inline=no
150 for ac_kw in inline __inline__ __inline; do
151 cat > conftest.$ac_ext <<EOF
152-#line 1170 "configure"
153+#line 1217 "configure"
154 #include "confdefs.h"
155
156 int main() {
157 } $ac_kw foo() {
158 ; return 0; }
159 EOF
160-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
161+if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
162 rm -rf conftest*
163 ac_cv_c_inline=$ac_kw; break
164 else
165@@ -1199,14 +1246,14 @@
166 esac
167
168 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
169-echo "configure:1203: checking whether byte ordering is bigendian" >&5
170+echo "configure:1250: checking whether byte ordering is bigendian" >&5
171 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
172 echo $ac_n "(cached) $ac_c" 1>&6
173 else
174 ac_cv_c_bigendian=unknown
175 # See if sys/param.h defines the BYTE_ORDER macro.
176 cat > conftest.$ac_ext <<EOF
177-#line 1210 "configure"
178+#line 1257 "configure"
179 #include "confdefs.h"
180 #include <sys/types.h>
181 #include <sys/param.h>
182@@ -1217,11 +1264,11 @@
183 #endif
184 ; return 0; }
185 EOF
186-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
187+if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
188 rm -rf conftest*
189 # It does; now see whether it defined to BIG_ENDIAN or not.
190 cat > conftest.$ac_ext <<EOF
191-#line 1225 "configure"
192+#line 1272 "configure"
193 #include "confdefs.h"
194 #include <sys/types.h>
195 #include <sys/param.h>
196@@ -1232,7 +1279,7 @@
197 #endif
198 ; return 0; }
199 EOF
200-if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
201+if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
202 rm -rf conftest*
203 ac_cv_c_bigendian=yes
204 else
205@@ -1252,7 +1299,7 @@
206 echo $ac_n "cross-compiling... " 2>&6
207 else
208 cat > conftest.$ac_ext <<EOF
209-#line 1256 "configure"
210+#line 1303 "configure"
211 #include "confdefs.h"
212 main () {
213 /* Are we little or big endian? From Harbison&Steele. */
214@@ -1265,7 +1312,7 @@
215 exit (u.c[sizeof (long) - 1] == 1);
216 }
217 EOF
218-if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
219+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
220 then
221 ac_cv_c_bigendian=no
222 else
223@@ -1283,7 +1330,7 @@
224 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
225 if test $ac_cv_c_bigendian = unknown; then
226 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
227-echo "configure:1287: checking to probe for byte ordering" >&5
228+echo "configure:1334: checking to probe for byte ordering" >&5
229
230 cat >conftest.c <<EOF
231 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
232@@ -1352,7 +1399,7 @@
233 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
234 # ./install, which can be erroneously created by make from ./install.sh.
235 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
236-echo "configure:1356: checking for a BSD compatible install" >&5
237+echo "configure:1403: checking for a BSD compatible install" >&5
238 if test -z "$INSTALL"; then
239 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
240 echo $ac_n "(cached) $ac_c" 1>&6
241@@ -1413,7 +1460,7 @@
242 # able to link anything, it had better be able to at least compile
243 # something.
244 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
245-echo "configure:1417: checking how to run the C preprocessor" >&5
246+echo "configure:1464: checking how to run the C preprocessor" >&5
247 # On Suns, sometimes $CPP names a directory.
248 if test -n "$CPP" && test -d "$CPP"; then
249 CPP=
250@@ -1428,13 +1475,13 @@
251 # On the NeXT, cc -E runs the code through the compiler's parser,
252 # not just through cpp.
253 cat > conftest.$ac_ext <<EOF
254-#line 1432 "configure"
255+#line 1479 "configure"
256 #include "confdefs.h"
257 #include <assert.h>
258 Syntax Error
259 EOF
260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
261-{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
262+{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
264 if test -z "$ac_err"; then
265 :
266@@ -1445,13 +1492,13 @@
267 rm -rf conftest*
268 CPP="${CC-cc} -E -traditional-cpp"
269 cat > conftest.$ac_ext <<EOF
270-#line 1449 "configure"
271+#line 1496 "configure"
272 #include "confdefs.h"
273 #include <assert.h>
274 Syntax Error
275 EOF
276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
277-{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
278+{ (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
280 if test -z "$ac_err"; then
281 :
282@@ -1462,13 +1509,13 @@
283 rm -rf conftest*
284 CPP="${CC-cc} -nologo -E"
285 cat > conftest.$ac_ext <<EOF
286-#line 1466 "configure"
287+#line 1513 "configure"
288 #include "confdefs.h"
289 #include <assert.h>
290 Syntax Error
291 EOF
292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
293-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
294+{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
296 if test -z "$ac_err"; then
297 :
298@@ -1496,17 +1543,17 @@
299 do
300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
302-echo "configure:1500: checking for $ac_hdr" >&5
303+echo "configure:1547: checking for $ac_hdr" >&5
304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
305 echo $ac_n "(cached) $ac_c" 1>&6
306 else
307 cat > conftest.$ac_ext <<EOF
308-#line 1505 "configure"
309+#line 1552 "configure"
310 #include "confdefs.h"
311 #include <$ac_hdr>
312 EOF
313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
314-{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
315+{ (eval echo configure:1557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
317 if test -z "$ac_err"; then
318 rm -rf conftest*
319@@ -1533,12 +1580,12 @@
320 done
321
322 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
323-echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5
324+echo "configure:1584: checking for sys/wait.h that is POSIX.1 compatible" >&5
325 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
326 echo $ac_n "(cached) $ac_c" 1>&6
327 else
328 cat > conftest.$ac_ext <<EOF
329-#line 1542 "configure"
330+#line 1589 "configure"
331 #include "confdefs.h"
332 #include <sys/types.h>
333 #include <sys/wait.h>
334@@ -1554,7 +1601,7 @@
335 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
336 ; return 0; }
337 EOF
338-if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
339+if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
340 rm -rf conftest*
341 ac_cv_header_sys_wait_h=yes
342 else
343@@ -1575,12 +1622,12 @@
344 fi
345
346 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
347-echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5
348+echo "configure:1626: checking whether time.h and sys/time.h may both be included" >&5
349 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
350 echo $ac_n "(cached) $ac_c" 1>&6
351 else
352 cat > conftest.$ac_ext <<EOF
353-#line 1584 "configure"
354+#line 1631 "configure"
355 #include "confdefs.h"
356 #include <sys/types.h>
357 #include <sys/time.h>
358@@ -1589,7 +1636,7 @@
359 struct tm *tp;
360 ; return 0; }
361 EOF
362-if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
363+if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
364 rm -rf conftest*
365 ac_cv_header_time=yes
366 else
367@@ -1611,19 +1658,19 @@
368
369
370 echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
371-echo "configure:1615: checking whether errno must be declared" >&5
372+echo "configure:1662: checking whether errno must be declared" >&5
373 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
374 echo $ac_n "(cached) $ac_c" 1>&6
375 else
376 cat > conftest.$ac_ext <<EOF
377-#line 1620 "configure"
378+#line 1667 "configure"
379 #include "confdefs.h"
380 #include <errno.h>
381 int main() {
382 int x = errno;
383 ; return 0; }
384 EOF
385-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
386+if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
387 rm -rf conftest*
388 libiberty_cv_declare_errno=no
389 else
390@@ -1645,12 +1692,12 @@
391
392
393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
394-echo "configure:1649: checking for ANSI C header files" >&5
395+echo "configure:1696: checking for ANSI C header files" >&5
396 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
397 echo $ac_n "(cached) $ac_c" 1>&6
398 else
399 cat > conftest.$ac_ext <<EOF
400-#line 1654 "configure"
401+#line 1701 "configure"
402 #include "confdefs.h"
403 #include <stdlib.h>
404 #include <stdarg.h>
405@@ -1658,7 +1705,7 @@
406 #include <float.h>
407 EOF
408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
409-{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
410+{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
412 if test -z "$ac_err"; then
413 rm -rf conftest*
414@@ -1675,7 +1722,7 @@
415 if test $ac_cv_header_stdc = yes; then
416 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
417 cat > conftest.$ac_ext <<EOF
418-#line 1679 "configure"
419+#line 1726 "configure"
420 #include "confdefs.h"
421 #include <string.h>
422 EOF
423@@ -1693,7 +1740,7 @@
424 if test $ac_cv_header_stdc = yes; then
425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
426 cat > conftest.$ac_ext <<EOF
427-#line 1697 "configure"
428+#line 1744 "configure"
429 #include "confdefs.h"
430 #include <stdlib.h>
431 EOF
432@@ -1714,7 +1761,7 @@
433 :
434 else
435 cat > conftest.$ac_ext <<EOF
436-#line 1718 "configure"
437+#line 1765 "configure"
438 #include "confdefs.h"
439 #include <ctype.h>
440 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
441@@ -1725,7 +1772,7 @@
442 exit (0); }
443
444 EOF
445-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
446+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
447 then
448 :
449 else
450@@ -1749,12 +1796,12 @@
451 fi
452
453 echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
454-echo "configure:1753: checking for uintptr_t" >&5
455+echo "configure:1800: checking for uintptr_t" >&5
456 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
457 echo $ac_n "(cached) $ac_c" 1>&6
458 else
459 cat > conftest.$ac_ext <<EOF
460-#line 1758 "configure"
461+#line 1805 "configure"
462 #include "confdefs.h"
463 #include <sys/types.h>
464 #if STDC_HEADERS
465@@ -1790,12 +1837,12 @@
466
467
468 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
469-echo "configure:1794: checking for pid_t" >&5
470+echo "configure:1841: checking for pid_t" >&5
471 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
472 echo $ac_n "(cached) $ac_c" 1>&6
473 else
474 cat > conftest.$ac_ext <<EOF
475-#line 1799 "configure"
476+#line 1846 "configure"
477 #include "confdefs.h"
478 #include <sys/types.h>
479 #if STDC_HEADERS
480@@ -1895,12 +1942,12 @@
481 realpath canonicalize_file_name
482 do
483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
484-echo "configure:1899: checking for $ac_func" >&5
485+echo "configure:1946: checking for $ac_func" >&5
486 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
487 echo $ac_n "(cached) $ac_c" 1>&6
488 else
489 cat > conftest.$ac_ext <<EOF
490-#line 1904 "configure"
491+#line 1951 "configure"
492 #include "confdefs.h"
493 /* System header to define __stub macros and hopefully few prototypes,
494 which can conflict with char $ac_func(); below. */
495@@ -1923,7 +1970,7 @@
496
497 ; return 0; }
498 EOF
499-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
500+if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
501 rm -rf conftest*
502 eval "ac_cv_func_$ac_func=yes"
503 else
504@@ -2152,53 +2199,6 @@
505
506 # We haven't set the list of objects yet. Use the standard autoconf
507 # tests. This will only work if the compiler works.
508- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
509-echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
510-
511-ac_ext=c
512-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
513-ac_cpp='$CPP $CPPFLAGS'
514-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
515-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
516-cross_compiling=$ac_cv_prog_cc_cross
517-
518-cat > conftest.$ac_ext << EOF
519-
520-#line 2168 "configure"
521-#include "confdefs.h"
522-
523-main(){return(0);}
524-EOF
525-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
526- ac_cv_prog_cc_works=yes
527- # If we can't run a trivial program, we are probably using a cross compiler.
528- if (./conftest; exit) 2>/dev/null; then
529- ac_cv_prog_cc_cross=no
530- else
531- ac_cv_prog_cc_cross=yes
532- fi
533-else
534- echo "configure: failed program was:" >&5
535- cat conftest.$ac_ext >&5
536- ac_cv_prog_cc_works=no
537-fi
538-rm -fr conftest*
539-ac_ext=c
540-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
541-ac_cpp='$CPP $CPPFLAGS'
542-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
543-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
544-cross_compiling=$ac_cv_prog_cc_cross
545-
546-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
547-if test $ac_cv_prog_cc_works = no; then
548- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
549-fi
550-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
551-echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
552-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
553-cross_compiling=$ac_cv_prog_cc_cross
554-
555 for ac_func in $funcs
556 do
557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
558@@ -2900,7 +2900,7 @@
559 esac
560
561
562-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
563+for ac_hdr in unistd.h
564 do
565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
567@@ -3032,24 +3032,11 @@
568 #include <fcntl.h>
569 #include <sys/mman.h>
570
571-#if HAVE_SYS_TYPES_H
572-# include <sys/types.h>
573-#endif
574-
575-#if HAVE_STDLIB_H
576-# include <stdlib.h>
577-#endif
578-
579-#if HAVE_SYS_STAT_H
580-# include <sys/stat.h>
581-#endif
582-
583-#if HAVE_UNISTD_H
584-# include <unistd.h>
585-#endif
586-
587 /* This mess was copied from the GNU getpagesize.h. */
588 #ifndef HAVE_GETPAGESIZE
589+# ifdef HAVE_UNISTD_H
590+# include <unistd.h>
591+# endif
592
593 /* Assume that all systems that can run configure have sys/param.h. */
594 # ifndef HAVE_SYS_PARAM_H
595@@ -3157,7 +3144,7 @@
596 }
597
598 EOF
599-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
600+if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
601 then
602 ac_cv_func_mmap_fixed_mapped=yes
603 else
604@@ -3181,7 +3168,7 @@
605
606
607 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
608-echo "configure:3185: checking for working strncmp" >&5
609+echo "configure:3172: checking for working strncmp" >&5
610 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
611 echo $ac_n "(cached) $ac_c" 1>&6
612 else
613@@ -3189,7 +3176,7 @@
614 ac_cv_func_strncmp_works=no
615 else
616 cat > conftest.$ac_ext <<EOF
617-#line 3193 "configure"
618+#line 3180 "configure"
619 #include "confdefs.h"
620
621 /* Test by Jim Wilson and Kaveh Ghazi.
622@@ -3253,7 +3240,7 @@
623 }
624
625 EOF
626-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
627+if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
628 then
629 ac_cv_func_strncmp_works=yes
630 else
diff --git a/openembedded/packages/gdb/files/sim-install.patch b/openembedded/packages/gdb/files/sim-install.patch
new file mode 100644
index 0000000000..3c88c4c059
--- /dev/null
+++ b/openembedded/packages/gdb/files/sim-install.patch
@@ -0,0 +1,34 @@
1--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
2+++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
3@@ -34,7 +34,7 @@
4
5 datadir = @datadir@
6 mandir = @mandir@
7-man1dir = $(mandir)/man1
8+man1dir = $(DESTDIR)$(mandir)/man1
9 infodir = @infodir@
10 includedir = @includedir@
11
12
13--- gdb-6.1/sim/common/Make-common.in~sim-install.patch 2003-09-08 18:24:59.000000000 +0100
14+++ gdb-6.1/sim/common/Make-common.in 2004-07-22 17:56:18.947423032 +0100
15@@ -581,14 +581,14 @@
16
17 install-common: installdirs
18 n=`echo run | sed '$(program_transform_name)'`; \
19- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
20+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
21 n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
22- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
23- ( cd $(libdir) ; $(RANLIB) $$n )
24+ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
25+ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
26
27 installdirs:
28- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
29- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
30+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
31+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
32
33 check:
34 cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
diff --git a/openembedded/packages/gdb/files/uclibc.patch b/openembedded/packages/gdb/files/uclibc.patch
new file mode 100644
index 0000000000..3d6b7ba187
--- /dev/null
+++ b/openembedded/packages/gdb/files/uclibc.patch
@@ -0,0 +1,194 @@
1--- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
2+++ binutils-2.15.91.0.1/bfd/config.bfd
3@@ -128,7 +128,7 @@
4 targ_defvec=ecoffalpha_little_vec
5 targ_selvecs=bfd_elf64_alpha_vec
6 ;;
7- alpha*-*-linux-gnu* | alpha*-*-elf*)
8+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
9 targ_defvec=bfd_elf64_alpha_vec
10 targ_selvecs=ecoffalpha_little_vec
11 ;;
12@@ -138,7 +138,7 @@
13 alpha*-*-*)
14 targ_defvec=ecoffalpha_little_vec
15 ;;
16- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
17+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
18 targ_defvec=bfd_elf64_ia64_little_vec
19 targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
20 ;;
21@@ -215,7 +215,7 @@
22 targ_defvec=bfd_elf32_littlearm_vec
23 targ_selvecs=bfd_elf32_bigarm_vec
24 ;;
25- armeb-*-elf | arm*b-*-linux-gnu*)
26+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
27 targ_defvec=bfd_elf32_bigarm_vec
28 targ_selvecs=bfd_elf32_littlearm_vec
29 ;;
30@@ -223,8 +223,8 @@
31 targ_defvec=bfd_elf32_littlearm_vec
32 targ_selvecs=bfd_elf32_bigarm_vec
33 ;;
34- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
35- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
36+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
37+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
38 targ_defvec=bfd_elf32_littlearm_vec
39 targ_selvecs=bfd_elf32_bigarm_vec
40 ;;
41@@ -367,7 +367,7 @@
42 ;;
43
44 #ifdef BFD64
45- hppa*64*-*-linux-gnu*)
46+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
47 targ_defvec=bfd_elf64_hppa_linux_vec
48 targ_selvecs=bfd_elf64_hppa_vec
49 ;;
50@@ -378,7 +378,7 @@
51 ;;
52 #endif
53
54- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
55+ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
56 targ_defvec=bfd_elf32_hppa_linux_vec
57 targ_selvecs=bfd_elf32_hppa_vec
58 ;;
59@@ -501,7 +501,7 @@
60 targ_selvecs=bfd_elf32_i386_vec
61 targ_underscore=yes
62 ;;
63- i[3-7]86-*-linux-gnu*)
64+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
65 targ_defvec=bfd_elf32_i386_vec
66 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
67 targ64_selvecs=bfd_elf64_x86_64_vec
68@@ -515,7 +515,7 @@
69 targ_defvec=bfd_elf64_x86_64_vec
70 targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
71 ;;
72- x86_64-*-linux-gnu*)
73+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
74 targ_defvec=bfd_elf64_x86_64_vec
75 targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
76 ;;
77@@ -690,7 +690,7 @@
78 targ_selvecs=bfd_elf32_m68k_vec
79 targ_underscore=yes
80 ;;
81- m68*-*-linux-gnu*)
82+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
83 targ_defvec=bfd_elf32_m68k_vec
84 targ_selvecs=m68klinux_vec
85 ;;
86@@ -966,7 +966,8 @@
87 ;;
88 #endif
89 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
90- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
91+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
92+ powerpc-*-rtems* | \
93 powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
94 targ_defvec=bfd_elf32_powerpc_vec
95 targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
96@@ -1003,8 +1004,8 @@
97 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
98 ;;
99 powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
100- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
101- powerpcle-*-rtems*)
102+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
103+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
104 targ_defvec=bfd_elf32_powerpcle_vec
105 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
106 targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
107@@ -1165,7 +1166,7 @@
108 targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
109 targ_underscore=yes
110 ;;
111- sparc-*-linux-gnu*)
112+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
113 targ_defvec=bfd_elf32_sparc_vec
114 targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
115 ;;
116@@ -1212,7 +1213,7 @@
117 targ_defvec=sunos_big_vec
118 targ_underscore=yes
119 ;;
120- sparc64-*-linux-gnu*)
121+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
122 targ_defvec=bfd_elf64_sparc_vec
123 targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
124 ;;
125--- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
126+++ binutils-2.15.91.0.1/bfd/configure
127@@ -1687,6 +1687,11 @@
128 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
129 ;;
130
131+linux-uclibc*)
132+ lt_cv_deplibs_check_method=pass_all
133+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
134+ ;;
135+
136 netbsd*)
137 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
138 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
139@@ -5266,7 +5271,7 @@
140 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
141 COREFILE=''
142 ;;
143- alpha*-*-linux-gnu*)
144+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
145 COREFILE=trad-core.lo
146 TRAD_HEADER='"hosts/alphalinux.h"'
147 ;;
148@@ -5326,7 +5331,7 @@
149 COREFILE=trad-core.lo
150 TRAD_HEADER='"hosts/i386mach3.h"'
151 ;;
152- i[3-7]86-*-linux-gnu*)
153+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
154 COREFILE=trad-core.lo
155 TRAD_HEADER='"hosts/i386linux.h"'
156 ;;
157@@ -5364,7 +5369,7 @@
158 COREFILE=trad-core.lo
159 TRAD_HEADER='"hosts/hp300bsd.h"'
160 ;;
161- m68*-*-linux-gnu*)
162+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
163 COREFILE=trad-core.lo
164 TRAD_HEADER='"hosts/m68klinux.h"'
165 ;;
166--- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
167+++ binutils-2.15.91.0.1/bfd/configure.in
168@@ -164,7 +164,7 @@
169 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
170 COREFILE=''
171 ;;
172- alpha*-*-linux-gnu*)
173+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
174 COREFILE=trad-core.lo
175 TRAD_HEADER='"hosts/alphalinux.h"'
176 ;;
177@@ -245,7 +245,7 @@
178 TRAD_HEADER='"hosts/i386mach3.h"'
179 ;;
180 changequote(,)dnl
181- i[3-7]86-*-linux-gnu*)
182+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
183 changequote([,])dnl
184 COREFILE=trad-core.lo
185 TRAD_HEADER='"hosts/i386linux.h"'
186@@ -286,7 +286,7 @@
187 COREFILE=trad-core.lo
188 TRAD_HEADER='"hosts/hp300bsd.h"'
189 ;;
190- m68*-*-linux-gnu*)
191+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
192 COREFILE=trad-core.lo
193 TRAD_HEADER='"hosts/m68klinux.h"'
194 ;;
diff --git a/openembedded/packages/gdb/gdb-6.3/uclibc.patch b/openembedded/packages/gdb/gdb-6.3/uclibc.patch
new file mode 100644
index 0000000000..b3981202ff
--- /dev/null
+++ b/openembedded/packages/gdb/gdb-6.3/uclibc.patch
@@ -0,0 +1,194 @@
1--- gdb-6.3/bfd/config.bfd.orig 2004-10-15 06:47:11.000000000 +0100
2+++ gdb-6.3/bfd/config.bfd 2005-01-05 19:30:32.000000000 +0000
3@@ -129,7 +129,7 @@
4 targ_defvec=ecoffalpha_little_vec
5 targ_selvecs=bfd_elf64_alpha_vec
6 ;;
7- alpha*-*-linux-gnu* | alpha*-*-elf*)
8+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
9 targ_defvec=bfd_elf64_alpha_vec
10 targ_selvecs=ecoffalpha_little_vec
11 ;;
12@@ -139,7 +139,7 @@
13 alpha*-*-*)
14 targ_defvec=ecoffalpha_little_vec
15 ;;
16- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
17+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
18 targ_defvec=bfd_elf64_ia64_little_vec
19 targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
20 ;;
21@@ -216,7 +216,7 @@
22 targ_defvec=bfd_elf32_littlearm_vec
23 targ_selvecs=bfd_elf32_bigarm_vec
24 ;;
25- armeb-*-elf | arm*b-*-linux-gnu*)
26+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
27 targ_defvec=bfd_elf32_bigarm_vec
28 targ_selvecs=bfd_elf32_littlearm_vec
29 ;;
30@@ -224,8 +224,8 @@
31 targ_defvec=bfd_elf32_littlearm_vec
32 targ_selvecs=bfd_elf32_bigarm_vec
33 ;;
34- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
35- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
36+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
37+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
38 arm*-*-eabi* )
39 targ_defvec=bfd_elf32_littlearm_vec
40 targ_selvecs=bfd_elf32_bigarm_vec
41@@ -378,7 +378,7 @@
42 ;;
43
44 #ifdef BFD64
45- hppa*64*-*-linux-gnu*)
46+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
47 targ_defvec=bfd_elf64_hppa_linux_vec
48 targ_selvecs=bfd_elf64_hppa_vec
49 ;;
50@@ -389,7 +389,7 @@
51 ;;
52 #endif
53
54- hppa*-*-linux-gnu*)
55+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*)
56 targ_defvec=bfd_elf32_hppa_linux_vec
57 targ_selvecs=bfd_elf32_hppa_vec
58 ;;
59@@ -522,7 +522,7 @@
60 targ_selvecs=bfd_elf32_i386_vec
61 targ_underscore=yes
62 ;;
63- i[3-7]86-*-linux-gnu*)
64+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
65 targ_defvec=bfd_elf32_i386_vec
66 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
67 targ64_selvecs=bfd_elf64_x86_64_vec
68@@ -536,7 +536,7 @@
69 targ_defvec=bfd_elf64_x86_64_vec
70 targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
71 ;;
72- x86_64-*-linux-gnu*)
73+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
74 targ_defvec=bfd_elf64_x86_64_vec
75 targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
76 ;;
77@@ -711,7 +711,7 @@
78 targ_selvecs=bfd_elf32_m68k_vec
79 targ_underscore=yes
80 ;;
81- m68*-*-linux-gnu*)
82+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
83 targ_defvec=bfd_elf32_m68k_vec
84 targ_selvecs=m68klinux_vec
85 ;;
86@@ -987,7 +987,8 @@
87 ;;
88 #endif
89 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
90- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
91+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
92+ powerpc-*-rtems* | \
93 powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
94 targ_defvec=bfd_elf32_powerpc_vec
95 targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
96@@ -1024,8 +1025,8 @@
97 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
98 ;;
99 powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
100- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
101- powerpcle-*-rtems*)
102+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
103+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
104 targ_defvec=bfd_elf32_powerpcle_vec
105 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
106 targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
107@@ -1192,7 +1193,7 @@
108 targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
109 targ_underscore=yes
110 ;;
111- sparc-*-linux-gnu*)
112+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
113 targ_defvec=bfd_elf32_sparc_vec
114 targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
115 ;;
116@@ -1239,7 +1240,7 @@
117 targ_defvec=sunos_big_vec
118 targ_underscore=yes
119 ;;
120- sparc64-*-linux-gnu*)
121+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
122 targ_defvec=bfd_elf64_sparc_vec
123 targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
124 ;;
125--- gdb-6.3/bfd/configure.in.orig 2004-10-08 15:53:59.000000000 +0100
126+++ gdb-6.3/bfd/configure.in 2005-01-05 19:28:50.000000000 +0000
127@@ -163,7 +163,7 @@
128 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
129 COREFILE=''
130 ;;
131- alpha*-*-linux-gnu*)
132+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
133 COREFILE=trad-core.lo
134 TRAD_HEADER='"hosts/alphalinux.h"'
135 ;;
136@@ -248,7 +248,7 @@
137 TRAD_HEADER='"hosts/i386mach3.h"'
138 ;;
139 changequote(,)dnl
140- i[3-7]86-*-linux-gnu*)
141+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
142 changequote([,])dnl
143 COREFILE=trad-core.lo
144 TRAD_HEADER='"hosts/i386linux.h"'
145@@ -289,7 +289,7 @@
146 COREFILE=trad-core.lo
147 TRAD_HEADER='"hosts/hp300bsd.h"'
148 ;;
149- m68*-*-linux-gnu*)
150+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
151 COREFILE=trad-core.lo
152 TRAD_HEADER='"hosts/m68klinux.h"'
153 ;;
154--- gdb-6.3/bfd/configure.orig 2004-10-08 15:53:56.000000000 +0100
155+++ gdb-6.3/bfd/configure 2005-01-05 19:29:27.000000000 +0000
156@@ -3583,6 +3583,11 @@
157 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
158 ;;
159
160+linux-uclibc*)
161+ lt_cv_deplibs_check_method=pass_all
162+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
163+ ;;
164+
165 netbsd* | knetbsd*-gnu)
166 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
167 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
168@@ -9914,7 +9919,7 @@
169 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
170 COREFILE=''
171 ;;
172- alpha*-*-linux-gnu*)
173+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
174 COREFILE=trad-core.lo
175 TRAD_HEADER='"hosts/alphalinux.h"'
176 ;;
177@@ -9978,7 +9983,7 @@
178 COREFILE=trad-core.lo
179 TRAD_HEADER='"hosts/i386mach3.h"'
180 ;;
181- i[3-7]86-*-linux-gnu*)
182+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
183 COREFILE=trad-core.lo
184 TRAD_HEADER='"hosts/i386linux.h"'
185 ;;
186@@ -10016,7 +10021,7 @@
187 COREFILE=trad-core.lo
188 TRAD_HEADER='"hosts/hp300bsd.h"'
189 ;;
190- m68*-*-linux-gnu*)
191+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
192 COREFILE=trad-core.lo
193 TRAD_HEADER='"hosts/m68klinux.h"'
194 ;;
diff --git a/openembedded/packages/gdb/gdb-cross_6.3.bb b/openembedded/packages/gdb/gdb-cross_6.3.bb
new file mode 100644
index 0000000000..a6823b6373
--- /dev/null
+++ b/openembedded/packages/gdb/gdb-cross_6.3.bb
@@ -0,0 +1,36 @@
1LICENSE = "GPL"
2DESCRIPTION = "gdb - GNU debugger"
3SECTION = "base"
4PRIORITY = "optional"
5MAINTAINER = "Phil Blundell <pb@nexus.co.uk>"
6DEPENDS = "ncurses-native"
7
8inherit autotools sdk
9
10S = "${WORKDIR}/gdb-${PV}"
11SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
12 file://sim-install.patch;patch=1"
13
14FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gdb-${PV}"
15
16export CC_FOR_BUILD = "${BUILD_CC}"
17export CXX_FOR_BUILD = "${BUILD_CXX}"
18export CPP_FOR_BUILD = "${BUILD_CPP}"
19export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
20export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
21export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
22
23EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils' LDFLAGS='${BUILD_LDFLAGS}'"
24
25EXTRA_OECONF = "--with-curses --with-readline"
26
27do_configure () {
28# override this function to avoid the autoconf/automake/aclocal/autoheader
29# calls for now
30 gnu-configize
31 oe_runconf
32}
33
34do_stage() {
35 :
36}
diff --git a/openembedded/packages/gdb/gdb_6.3.bb b/openembedded/packages/gdb/gdb_6.3.bb
new file mode 100644
index 0000000000..fcabfdc5f3
--- /dev/null
+++ b/openembedded/packages/gdb/gdb_6.3.bb
@@ -0,0 +1,48 @@
1DESCRIPTION = "gdb - GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
3LICENSE="GPL"
4SECTION = "devel"
5PRIORITY = "optional"
6MAINTAINER = "Pawel Osiczko <p.osiczko@tetrapyloctomy.org>"
7DEPENDS = "ncurses readline"
8RDEPENDS_openmn = "libthread-db1"
9
10PACKAGES =+ 'gdbserver '
11FILES_gdbserver = '${bindir}/gdbserver'
12
13inherit autotools gettext
14
15SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
16 file://uclibc.patch;patch=1 \
17 file://gdbserver-cflags-last.diff;patch=1;pnum=0"
18
19LDFLAGS_append = " -s"
20export CC_FOR_BUILD = "${BUILD_CC}"
21export CXX_FOR_BUILD = "${BUILD_CXX}"
22export CPP_FOR_BUILD = "${BUILD_CPP}"
23export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
24export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
25export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
26export CFLAGS_append=" -L${STAGING_LIBDIR}"
27EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
28
29EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
30 --with-curses --disable-multilib --with-readline --disable-sim \
31 --program-prefix=''"
32
33S = "${WORKDIR}/gdb-${PV}"
34B = "${WORKDIR}/build-${TARGET_SYS}"
35
36do_configure () {
37# override this function to avoid the autoconf/automake/aclocal/autoheader
38# calls for now
39 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
40 CPPFLAGS="" oe_runconf
41}
42
43do_install () {
44 make -C bfd/doc chew LDFLAGS= CFLAGS=-O2
45 oe_runmake DESTDIR='${D}' install
46 install -d ${D}${bindir}
47 install -m 0755 gdb/gdbserver/gdbserver ${D}${bindir}
48}
diff --git a/openembedded/packages/meta/meta-oh.bb b/openembedded/packages/meta/meta-oh.bb
index 1508567a81..d61824c393 100644
--- a/openembedded/packages/meta/meta-oh.bb
+++ b/openembedded/packages/meta/meta-oh.bb
@@ -20,6 +20,8 @@ oh-task-base = "\
20 gtk+ \ 20 gtk+ \
21 rxvt \ 21 rxvt \
22 xhost \ 22 xhost \
23 gdb \
24 strace \
23 ttf-bitstream-vera \ 25 ttf-bitstream-vera \
24 xauth" 26 xauth"
25 27
@@ -35,13 +37,11 @@ RDEPENDS_oh-task-base := "${oh-task-base} \
35 gdk-pixbuf-loader-png \ 37 gdk-pixbuf-loader-png \
36 gdk-pixbuf-loader-xpm \ 38 gdk-pixbuf-loader-xpm \
37 gdk-pixbuf-loader-jpeg \ 39 gdk-pixbuf-loader-jpeg \
38 gdb \
39 strace \
40 tslib-calibrate \ 40 tslib-calibrate \
41 tslib-tests \ 41 tslib-tests \
42 pango-module-basic-x \ 42 pango-module-basic-x \
43 pango-module-basic-fc" 43 pango-module-basic-fc"
44 44
45DEPENDS += " ${oh-task-base}" 45DEPENDS += " ${oh-task-base} tslib"
46 46
47LICENSE = "MIT" 47LICENSE = "MIT"
diff --git a/openembedded/packages/readline/readline-4.3/acinclude.m4 b/openembedded/packages/readline/readline-4.3/acinclude.m4
new file mode 100644
index 0000000000..8a45f99084
--- /dev/null
+++ b/openembedded/packages/readline/readline-4.3/acinclude.m4
@@ -0,0 +1,1815 @@
1dnl
2dnl Bash specific tests
3dnl
4dnl Some derived from PDKSH 5.1.3 autoconf tests
5dnl
6
7AC_DEFUN([BASH_C_LONG_LONG],
8[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
9[if test "$GCC" = yes; then
10 ac_cv_c_long_long=yes
11else
12AC_TRY_RUN([
13int
14main()
15{
16long long foo = 0;
17exit(sizeof(long long) < sizeof(long));
18}
19], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
20fi])
21if test $ac_cv_c_long_long = yes; then
22 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
23fi
24])
25
26dnl
27dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
28dnl (< changed to <=) added.
29dnl
30AC_DEFUN([BASH_C_LONG_DOUBLE],
31[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
32[if test "$GCC" = yes; then
33 ac_cv_c_long_double=yes
34else
35AC_TRY_RUN([
36int
37main()
38{
39 /* The Stardent Vistra knows sizeof(long double), but does not
40 support it. */
41 long double foo = 0.0;
42 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
43 /* On IRIX 5.3, the compiler converts long double to double with a warning,
44 but compiles this successfully. */
45 exit(sizeof(long double) <= sizeof(double));
46}
47], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
48fi])
49if test $ac_cv_c_long_double = yes; then
50 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
51fi
52])
53
54dnl
55dnl Check for <inttypes.h>. This is separated out so that it can be
56dnl AC_REQUIREd.
57dnl
58dnl BASH_HEADER_INTTYPES
59AC_DEFUN([BASH_HEADER_INTTYPES],
60[
61 AC_CHECK_HEADERS(inttypes.h)
62])
63
64dnl
65dnl check for typedef'd symbols in header files, but allow the caller to
66dnl specify the include files to be checked in addition to the default
67dnl
68dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
69AC_DEFUN([BASH_CHECK_TYPE],
70[
71AC_REQUIRE([AC_HEADER_STDC])dnl
72AC_REQUIRE([BASH_HEADER_INTTYPES])
73AC_MSG_CHECKING(for $1)
74AC_CACHE_VAL(bash_cv_type_$1,
75[AC_EGREP_CPP($1, [#include <sys/types.h>
76#if STDC_HEADERS
77#include <stdlib.h>
78#include <stddef.h>
79#endif
80#if HAVE_INTTYPES_H
81#include <inttypes.h>
82#endif
83$2
84], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
85AC_MSG_RESULT($bash_cv_type_$1)
86ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
87 AC_DEFINE($4)
88 fi])
89if test $bash_cv_type_$1 = no; then
90 AC_DEFINE_UNQUOTED($1, $3)
91fi
92])
93
94dnl
95dnl BASH_CHECK_DECL(FUNC)
96dnl
97dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
98dnl AC_CHECK_DECL
99dnl
100AC_DEFUN([BASH_CHECK_DECL],
101[
102AC_REQUIRE([AC_HEADER_STDC])
103AC_REQUIRE([BASH_HEADER_INTTYPES])
104AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
105[AC_TRY_LINK(
106[
107#if STDC_HEADERS
108# include <stdlib.h>
109#endif
110#if HAVE_INTTYPES_H
111# include <inttypes.h>
112#endif
113],
114[return !$1;],
115bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
116bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
117if test $bash_cv_decl_$1 = yes; then
118 AC_DEFINE_UNQUOTED($bash_tr_func, 1)
119else
120 AC_DEFINE_UNQUOTED($bash_tr_func, 0)
121fi
122])
123
124AC_DEFUN([BASH_DECL_PRINTF],
125[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
126AC_CACHE_VAL(bash_cv_printf_declared,
127[AC_TRY_RUN([
128#include <stdio.h>
129#ifdef __STDC__
130typedef int (*_bashfunc)(const char *, ...);
131#else
132typedef int (*_bashfunc)();
133#endif
134main()
135{
136_bashfunc pf;
137pf = (_bashfunc) printf;
138exit(pf == 0);
139}
140], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
141 [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
142 bash_cv_printf_declared=yes]
143)])
144AC_MSG_RESULT($bash_cv_printf_declared)
145if test $bash_cv_printf_declared = yes; then
146AC_DEFINE(PRINTF_DECLARED)
147fi
148])
149
150AC_DEFUN([BASH_DECL_SBRK],
151[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
152AC_CACHE_VAL(bash_cv_sbrk_declared,
153[AC_EGREP_HEADER(sbrk, unistd.h,
154 bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
155AC_MSG_RESULT($bash_cv_sbrk_declared)
156if test $bash_cv_sbrk_declared = yes; then
157AC_DEFINE(SBRK_DECLARED)
158fi
159])
160
161dnl
162dnl Check for sys_siglist[] or _sys_siglist[]
163dnl
164AC_DEFUN([BASH_DECL_UNDER_SYS_SIGLIST],
165[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
166AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
167[AC_TRY_COMPILE([
168#include <sys/types.h>
169#include <signal.h>
170#ifdef HAVE_UNISTD_H
171#include <unistd.h>
172#endif], [ char *msg = _sys_siglist[2]; ],
173 bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
174 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
175AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
176if test $bash_cv_decl_under_sys_siglist = yes; then
177AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
178fi
179])
180
181AC_DEFUN([BASH_UNDER_SYS_SIGLIST],
182[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
183AC_MSG_CHECKING([for _sys_siglist in system C library])
184AC_CACHE_VAL(bash_cv_under_sys_siglist,
185[AC_TRY_RUN([
186#include <sys/types.h>
187#include <signal.h>
188#ifdef HAVE_UNISTD_H
189#include <unistd.h>
190#endif
191#ifndef UNDER_SYS_SIGLIST_DECLARED
192extern char *_sys_siglist[];
193#endif
194main()
195{
196char *msg = (char *)_sys_siglist[2];
197exit(msg == 0);
198}],
199 bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
200 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
201 bash_cv_under_sys_siglist=no])])
202AC_MSG_RESULT($bash_cv_under_sys_siglist)
203if test $bash_cv_under_sys_siglist = yes; then
204AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
205fi
206])
207
208AC_DEFUN([BASH_SYS_SIGLIST],
209[
210AC_CHECK_DECLS([sys_siglist])
211AC_MSG_CHECKING([for sys_siglist in system C library])
212AC_CACHE_VAL(bash_cv_sys_siglist,
213[AC_TRY_RUN([
214#include <sys/types.h>
215#include <signal.h>
216#ifdef HAVE_UNISTD_H
217#include <unistd.h>
218#endif
219#ifndef HAVE_DECL_SYS_SIGLIST
220extern char *sys_siglist[];
221#endif
222main()
223{
224char *msg = sys_siglist[2];
225exit(msg == 0);
226}],
227 bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
228 [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
229 bash_cv_sys_siglist=no])])
230AC_MSG_RESULT($bash_cv_sys_siglist)
231if test $bash_cv_sys_siglist = yes; then
232AC_DEFINE(HAVE_SYS_SIGLIST)
233fi
234])
235
236dnl Check for the various permutations of sys_siglist and make sure we
237dnl compile in siglist.o if they're not defined
238AC_DEFUN([BASH_CHECK_SYS_SIGLIST], [
239AC_REQUIRE([BASH_SYS_SIGLIST])
240AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
241AC_REQUIRE([BASH_FUNC_STRSIGNAL])
242if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
243 SIGLIST_O=siglist.o
244else
245 SIGLIST_O=
246fi
247AC_SUBST([SIGLIST_O])
248])
249
250dnl Check for sys_errlist[] and sys_nerr, check for declaration
251AC_DEFUN([BASH_SYS_ERRLIST],
252[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
253AC_CACHE_VAL(bash_cv_sys_errlist,
254[AC_TRY_LINK([#include <errno.h>],
255[extern char *sys_errlist[];
256 extern int sys_nerr;
257 char *msg = sys_errlist[sys_nerr - 1];],
258 bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
259AC_MSG_RESULT($bash_cv_sys_errlist)
260if test $bash_cv_sys_errlist = yes; then
261AC_DEFINE(HAVE_SYS_ERRLIST)
262fi
263])
264
265dnl
266dnl Check if dup2() does not clear the close on exec flag
267dnl
268AC_DEFUN([BASH_FUNC_DUP2_CLOEXEC_CHECK],
269[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
270AC_CACHE_VAL(bash_cv_dup2_broken,
271[AC_TRY_RUN([
272#include <sys/types.h>
273#include <fcntl.h>
274main()
275{
276 int fd1, fd2, fl;
277 fd1 = open("/dev/null", 2);
278 if (fcntl(fd1, 2, 1) < 0)
279 exit(1);
280 fd2 = dup2(fd1, 1);
281 if (fd2 < 0)
282 exit(2);
283 fl = fcntl(fd2, 1, 0);
284 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
285 exit(fl != 1);
286}
287], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
288 [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
289 bash_cv_dup2_broken=no])
290])
291AC_MSG_RESULT($bash_cv_dup2_broken)
292if test $bash_cv_dup2_broken = yes; then
293AC_DEFINE(DUP2_BROKEN)
294fi
295])
296
297AC_DEFUN([BASH_FUNC_STRSIGNAL],
298[AC_MSG_CHECKING([for the existence of strsignal])
299AC_CACHE_VAL(bash_cv_have_strsignal,
300[AC_TRY_LINK([#include <sys/types.h>
301#include <signal.h>],
302[char *s = (char *)strsignal(2);],
303 bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
304AC_MSG_RESULT($bash_cv_have_strsignal)
305if test $bash_cv_have_strsignal = yes; then
306AC_DEFINE(HAVE_STRSIGNAL)
307fi
308])
309
310dnl Check to see if opendir will open non-directories (not a nice thing)
311AC_DEFUN([BASH_FUNC_OPENDIR_CHECK],
312[AC_REQUIRE([AC_HEADER_DIRENT])dnl
313AC_MSG_CHECKING(if opendir() opens non-directories)
314AC_CACHE_VAL(bash_cv_opendir_not_robust,
315[AC_TRY_RUN([
316#include <stdio.h>
317#include <sys/types.h>
318#include <fcntl.h>
319#ifdef HAVE_UNISTD_H
320# include <unistd.h>
321#endif /* HAVE_UNISTD_H */
322#if defined(HAVE_DIRENT_H)
323# include <dirent.h>
324#else
325# define dirent direct
326# ifdef HAVE_SYS_NDIR_H
327# include <sys/ndir.h>
328# endif /* SYSNDIR */
329# ifdef HAVE_SYS_DIR_H
330# include <sys/dir.h>
331# endif /* SYSDIR */
332# ifdef HAVE_NDIR_H
333# include <ndir.h>
334# endif
335#endif /* HAVE_DIRENT_H */
336main()
337{
338DIR *dir;
339int fd, err;
340err = mkdir("/tmp/bash-aclocal", 0700);
341if (err < 0) {
342 perror("mkdir");
343 exit(1);
344}
345unlink("/tmp/bash-aclocal/not_a_directory");
346fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
347write(fd, "\n", 1);
348close(fd);
349dir = opendir("/tmp/bash-aclocal/not_a_directory");
350unlink("/tmp/bash-aclocal/not_a_directory");
351rmdir("/tmp/bash-aclocal");
352exit (dir == 0);
353}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
354 [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
355 bash_cv_opendir_not_robust=no]
356)])
357AC_MSG_RESULT($bash_cv_opendir_not_robust)
358if test $bash_cv_opendir_not_robust = yes; then
359AC_DEFINE(OPENDIR_NOT_ROBUST)
360fi
361])
362
363dnl
364AH_TEMPLATE([VOID_SIGHANDLER], [Define if signal handlers return type void])
365AC_DEFUN([BASH_TYPE_SIGHANDLER],
366[AC_MSG_CHECKING([whether signal handlers are of type void])
367AC_CACHE_VAL(bash_cv_void_sighandler,
368[AC_TRY_COMPILE([#include <sys/types.h>
369#include <signal.h>
370#ifdef signal
371#undef signal
372#endif
373#ifdef __cplusplus
374extern "C"
375#endif
376void (*signal ()) ();],
377[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
378AC_MSG_RESULT($bash_cv_void_sighandler)
379if test $bash_cv_void_sighandler = yes; then
380AC_DEFINE(VOID_SIGHANDLER)
381fi
382])
383
384dnl
385dnl A signed 16-bit integer quantity
386dnl
387AC_DEFUN([BASH_TYPE_BITS16_T],
388[
389if test "$ac_cv_sizeof_short" = 2; then
390 AC_CHECK_TYPE(bits16_t, short)
391elif test "$ac_cv_sizeof_char" = 2; then
392 AC_CHECK_TYPE(bits16_t, char)
393else
394 AC_CHECK_TYPE(bits16_t, short)
395fi
396])
397
398dnl
399dnl An unsigned 16-bit integer quantity
400dnl
401AC_DEFUN([BASH_TYPE_U_BITS16_T],
402[
403if test "$ac_cv_sizeof_short" = 2; then
404 AC_CHECK_TYPE(u_bits16_t, unsigned short)
405elif test "$ac_cv_sizeof_char" = 2; then
406 AC_CHECK_TYPE(u_bits16_t, unsigned char)
407else
408 AC_CHECK_TYPE(u_bits16_t, unsigned short)
409fi
410])
411
412dnl
413dnl A signed 32-bit integer quantity
414dnl
415AC_DEFUN([BASH_TYPE_BITS32_T],
416[
417if test "$ac_cv_sizeof_int" = 4; then
418 AC_CHECK_TYPE(bits32_t, int)
419elif test "$ac_cv_sizeof_long" = 4; then
420 AC_CHECK_TYPE(bits32_t, long)
421else
422 AC_CHECK_TYPE(bits32_t, int)
423fi
424])
425
426dnl
427dnl An unsigned 32-bit integer quantity
428dnl
429AC_DEFUN([BASH_TYPE_U_BITS32_T],
430[
431if test "$ac_cv_sizeof_int" = 4; then
432 AC_CHECK_TYPE(u_bits32_t, unsigned int)
433elif test "$ac_cv_sizeof_long" = 4; then
434 AC_CHECK_TYPE(u_bits32_t, unsigned long)
435else
436 AC_CHECK_TYPE(u_bits32_t, unsigned int)
437fi
438])
439
440AC_DEFUN([BASH_TYPE_PTRDIFF_T],
441[
442if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
443 AC_CHECK_TYPE(ptrdiff_t, int)
444elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
445 AC_CHECK_TYPE(ptrdiff_t, long)
446elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
447 AC_CHECK_TYPE(ptrdiff_t, [long long])
448else
449 AC_CHECK_TYPE(ptrdiff_t, int)
450fi
451])
452
453dnl
454dnl A signed 64-bit quantity
455dnl
456AC_DEFUN([BASH_TYPE_BITS64_T],
457[
458if test "$ac_cv_sizeof_char_p" = 8; then
459 AC_CHECK_TYPE(bits64_t, char *)
460elif test "$ac_cv_sizeof_double" = 8; then
461 AC_CHECK_TYPE(bits64_t, double)
462elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
463 AC_CHECK_TYPE(bits64_t, [long long])
464elif test "$ac_cv_sizeof_long" = 8; then
465 AC_CHECK_TYPE(bits64_t, long)
466else
467 AC_CHECK_TYPE(bits64_t, double)
468fi
469])
470
471AC_DEFUN([BASH_TYPE_LONG_LONG],
472[
473AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
474[AC_TRY_LINK([
475long long ll = 1; int i = 63;],
476[
477long long llm = (long long) -1;
478return ll << i | ll >> i | llm / ll | llm % ll;
479], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
480if test "$bash_cv_type_long_long" = 'long long'; then
481 AC_DEFINE(HAVE_LONG_LONG, 1)
482fi
483])
484
485AC_DEFUN([BASH_TYPE_UNSIGNED_LONG_LONG],
486[
487AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
488[AC_TRY_LINK([
489unsigned long long ull = 1; int i = 63;],
490[
491unsigned long long ullmax = (unsigned long long) -1;
492return ull << i | ull >> i | ullmax / ull | ullmax % ull;
493], bash_cv_type_unsigned_long_long='unsigned long long',
494 bash_cv_type_unsigned_long_long='unsigned long')])
495if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
496 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
497fi
498])
499
500dnl
501dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
502dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
503dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
504dnl matters, this just checks for rlim_t, quad_t, or long.
505dnl
506AC_DEFUN([BASH_TYPE_RLIMIT],
507[AC_MSG_CHECKING(for size and type of struct rlimit fields)
508AC_CACHE_VAL(bash_cv_type_rlimit,
509[AC_TRY_COMPILE([#include <sys/types.h>
510#include <sys/resource.h>],
511[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
512AC_TRY_RUN([
513#include <sys/types.h>
514#include <sys/time.h>
515#include <sys/resource.h>
516main()
517{
518#ifdef HAVE_QUAD_T
519 struct rlimit rl;
520 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
521 exit(0);
522#endif
523 exit(1);
524}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
525 [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
526 bash_cv_type_rlimit=long])])
527])
528AC_MSG_RESULT($bash_cv_type_rlimit)
529if test $bash_cv_type_rlimit = quad_t; then
530AC_DEFINE(RLIMTYPE, quad_t)
531elif test $bash_cv_type_rlimit = rlim_t; then
532AC_DEFINE(RLIMTYPE, rlim_t)
533fi
534])
535
536AC_DEFUN([BASH_FUNC_LSTAT],
537[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
538dnl inline function in <sys/stat.h>.
539AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
540[AC_TRY_LINK([
541#include <sys/types.h>
542#include <sys/stat.h>
543],[ lstat(".",(struct stat *)0); ],
544bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
545if test $bash_cv_func_lstat = yes; then
546 AC_DEFINE(HAVE_LSTAT)
547fi
548])
549
550AC_DEFUN([BASH_FUNC_INET_ATON],
551[
552AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
553[AC_TRY_LINK([
554#include <sys/types.h>
555#include <netinet/in.h>
556#include <arpa/inet.h>
557struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
558bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
559if test $bash_cv_func_inet_aton = yes; then
560 AC_DEFINE(HAVE_INET_ATON)
561else
562 AC_LIBOBJ(inet_aton)
563fi
564])
565
566AC_DEFUN([BASH_FUNC_GETENV],
567[AC_MSG_CHECKING(to see if getenv can be redefined)
568AC_CACHE_VAL(bash_cv_getenv_redef,
569[AC_TRY_RUN([
570#ifdef HAVE_UNISTD_H
571# include <unistd.h>
572#endif
573#ifndef __STDC__
574# ifndef const
575# define const
576# endif
577#endif
578char *
579getenv (name)
580#if defined (__linux__) || defined (__bsdi__) || defined (convex)
581 const char *name;
582#else
583 char const *name;
584#endif /* !__linux__ && !__bsdi__ && !convex */
585{
586return "42";
587}
588main()
589{
590char *s;
591/* The next allows this program to run, but does not allow bash to link
592 when it redefines getenv. I'm not really interested in figuring out
593 why not. */
594#if defined (NeXT)
595exit(1);
596#endif
597s = getenv("ABCDE");
598exit(s == 0); /* force optimizer to leave getenv in */
599}
600], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
601 [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
602 bash_cv_getenv_redef=yes]
603)])
604AC_MSG_RESULT($bash_cv_getenv_redef)
605if test $bash_cv_getenv_redef = yes; then
606AC_DEFINE(CAN_REDEFINE_GETENV)
607fi
608])
609
610# We should check for putenv before calling this
611AC_DEFUN([BASH_FUNC_STD_PUTENV],
612[
613AC_REQUIRE([AC_HEADER_STDC])
614AC_REQUIRE([AC_C_PROTOTYPES])
615AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
616[AC_TRY_LINK([
617#if STDC_HEADERS
618#include <stdlib.h>
619#include <stddef.h>
620#endif
621#ifndef __STDC__
622# ifndef const
623# define const
624# endif
625#endif
626#ifdef PROTOTYPES
627extern int putenv (char *);
628#else
629extern int putenv ();
630#endif
631],
632[return (putenv == 0);],
633bash_cv_std_putenv=yes, bash_cv_std_putenv=no
634)])
635if test $bash_cv_std_putenv = yes; then
636AC_DEFINE(HAVE_STD_PUTENV)
637fi
638])
639
640# We should check for unsetenv before calling this
641AC_DEFUN([BASH_FUNC_STD_UNSETENV],
642[
643AC_REQUIRE([AC_HEADER_STDC])
644AC_REQUIRE([AC_C_PROTOTYPES])
645AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
646[AC_TRY_LINK([
647#if STDC_HEADERS
648#include <stdlib.h>
649#include <stddef.h>
650#endif
651#ifndef __STDC__
652# ifndef const
653# define const
654# endif
655#endif
656#ifdef PROTOTYPES
657extern int unsetenv (const char *);
658#else
659extern int unsetenv ();
660#endif
661],
662[return (unsetenv == 0);],
663bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
664)])
665if test $bash_cv_std_unsetenv = yes; then
666AC_DEFINE(HAVE_STD_UNSETENV)
667fi
668])
669
670AC_DEFUN([BASH_FUNC_ULIMIT_MAXFDS],
671[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
672AC_CACHE_VAL(bash_cv_ulimit_maxfds,
673[AC_TRY_RUN([
674main()
675{
676long maxfds = ulimit(4, 0L);
677exit (maxfds == -1L);
678}
679], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
680 [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
681 bash_cv_ulimit_maxfds=no]
682)])
683AC_MSG_RESULT($bash_cv_ulimit_maxfds)
684if test $bash_cv_ulimit_maxfds = yes; then
685AC_DEFINE(ULIMIT_MAXFDS)
686fi
687])
688
689AC_DEFUN([BASH_FUNC_GETCWD],
690[AC_MSG_CHECKING([if getcwd() calls popen()])
691AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
692[AC_TRY_RUN([
693#include <stdio.h>
694#ifdef HAVE_UNISTD_H
695#include <unistd.h>
696#endif
697
698#ifndef __STDC__
699#ifndef const
700#define const
701#endif
702#endif
703
704int popen_called;
705
706FILE *
707popen(command, type)
708 const char *command;
709 const char *type;
710{
711 popen_called = 1;
712 return (FILE *)NULL;
713}
714
715FILE *_popen(command, type)
716 const char *command;
717 const char *type;
718{
719 return (popen (command, type));
720}
721
722int
723pclose(stream)
724FILE *stream;
725{
726 return 0;
727}
728
729int
730_pclose(stream)
731FILE *stream;
732{
733 return 0;
734}
735
736main()
737{
738 char lbuf[32];
739 popen_called = 0;
740 getcwd(lbuf, 32);
741 exit (popen_called);
742}
743], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
744 [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
745 bash_cv_getcwd_calls_popen=no]
746)])
747AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
748if test $bash_cv_getcwd_calls_popen = yes; then
749AC_DEFINE(GETCWD_BROKEN)
750AC_LIBOBJ(getcwd)
751fi
752])
753
754dnl
755dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
756dnl system, we can't use AC_PREREQ
757dnl
758AC_DEFUN([BASH_FUNC_GETHOSTBYNAME],
759[if test "X$bash_cv_have_gethostbyname" = "X"; then
760_bash_needmsg=yes
761else
762AC_MSG_CHECKING(for gethostbyname in socket library)
763_bash_needmsg=
764fi
765AC_CACHE_VAL(bash_cv_have_gethostbyname,
766[AC_TRY_LINK([#include <netdb.h>],
767[ struct hostent *hp;
768 hp = gethostbyname("localhost");
769], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
770)
771if test "X$_bash_needmsg" = Xyes; then
772 AC_MSG_CHECKING(for gethostbyname in socket library)
773fi
774AC_MSG_RESULT($bash_cv_have_gethostbyname)
775if test "$bash_cv_have_gethostbyname" = yes; then
776AC_DEFINE(HAVE_GETHOSTBYNAME)
777fi
778])
779
780AC_DEFUN([BASH_FUNC_FNMATCH_EXTMATCH],
781[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
782AC_CACHE_VAL(bash_cv_fnm_extmatch,
783[AC_TRY_RUN([
784#include <fnmatch.h>
785
786main()
787{
788#ifdef FNM_EXTMATCH
789 exit (0);
790#else
791 exit (1);
792#endif
793}
794], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
795 [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
796 bash_cv_fnm_extmatch=no])
797])
798AC_MSG_RESULT($bash_cv_fnm_extmatch)
799if test $bash_cv_fnm_extmatch = yes; then
800AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
801fi
802])
803
804AH_TEMPLATE([HAVE_POSIX_SIGSETJMP], [Define if we POSIX-style sigsetjmp/siglongjmp are available])
805AC_DEFUN([BASH_FUNC_POSIX_SETJMP],
806[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
807AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
808AC_CACHE_VAL(bash_cv_func_sigsetjmp,
809[AC_TRY_RUN([
810#ifdef HAVE_UNISTD_H
811#include <unistd.h>
812#endif
813#include <sys/types.h>
814#include <signal.h>
815#include <setjmp.h>
816
817main()
818{
819#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
820exit (1);
821#else
822
823int code;
824sigset_t set, oset;
825sigjmp_buf xx;
826
827/* get the mask */
828sigemptyset(&set);
829sigemptyset(&oset);
830sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
831sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
832
833/* save it */
834code = sigsetjmp(xx, 1);
835if (code)
836 exit(0); /* could get sigmask and compare to oset here. */
837
838/* change it */
839sigaddset(&set, SIGINT);
840sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
841
842/* and siglongjmp */
843siglongjmp(xx, 10);
844exit(1);
845#endif
846}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
847 [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
848 bash_cv_func_sigsetjmp=missing]
849)])
850AC_MSG_RESULT($bash_cv_func_sigsetjmp)
851if test $bash_cv_func_sigsetjmp = present; then
852AC_DEFINE(HAVE_POSIX_SIGSETJMP)
853fi
854])
855
856AH_TEMPLATE([STRCOLL_BROKEN], [Define if strcoll is broken with respect to strcmp in the default locale.])
857AC_DEFUN([BASH_FUNC_STRCOLL],
858[
859AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
860AC_CACHE_VAL(bash_cv_func_strcoll_broken,
861[AC_TRY_RUN([
862#include <stdio.h>
863#if defined (HAVE_LOCALE_H)
864#include <locale.h>
865#endif
866
867main(c, v)
868int c;
869char *v[];
870{
871 int r1, r2;
872 char *deflocale, *defcoll;
873
874#ifdef HAVE_SETLOCALE
875 deflocale = setlocale(LC_ALL, "");
876 defcoll = setlocale(LC_COLLATE, "");
877#endif
878
879#ifdef HAVE_STRCOLL
880 /* These two values are taken from tests/glob-test. */
881 r1 = strcoll("abd", "aXd");
882#else
883 r1 = 0;
884#endif
885 r2 = strcmp("abd", "aXd");
886
887 /* These two should both be greater than 0. It is permissible for
888 a system to return different values, as long as the sign is the
889 same. */
890
891 /* Exit with 1 (failure) if these two values are both > 0, since
892 this tests whether strcoll(3) is broken with respect to strcmp(3)
893 in the default locale. */
894 exit (r1 > 0 && r2 > 0);
895}
896], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
897 [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
898 bash_cv_func_strcoll_broken=no]
899)])
900AC_MSG_RESULT($bash_cv_func_strcoll_broken)
901if test $bash_cv_func_strcoll_broken = yes; then
902AC_DEFINE(STRCOLL_BROKEN)
903fi
904])
905
906AC_DEFUN([BASH_FUNC_PRINTF_A_FORMAT],
907[AC_MSG_CHECKING([for printf floating point output in hex notation])
908AC_CACHE_VAL(bash_cv_printf_a_format,
909[AC_TRY_RUN([
910#include <stdio.h>
911#include <string.h>
912
913int
914main()
915{
916 double y = 0.0;
917 char abuf[1024];
918
919 sprintf(abuf, "%A", y);
920 exit(strchr(abuf, 'P') == (char *)0);
921}
922], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
923 [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
924 bash_cv_printf_a_format=no]
925)])
926AC_MSG_RESULT($bash_cv_printf_a_format)
927if test $bash_cv_printf_a_format = yes; then
928AC_DEFINE(HAVE_PRINTF_A_FORMAT)
929fi
930])
931
932AC_DEFUN([BASH_STRUCT_TERMIOS_LDISC],
933[
934AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
935#include <sys/types.h>
936#include <termios.h>
937])
938])
939
940AC_DEFUN([BASH_STRUCT_TERMIO_LDISC],
941[
942AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
943#include <sys/types.h>
944#include <termio.h>
945])
946])
947
948dnl
949dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
950dnl
951dnl sets bash_cv_struct_stat_st_blocks
952dnl
953dnl unused for now; we'll see how AC_CHECK_MEMBERS works
954dnl
955AC_DEFUN([BASH_STRUCT_ST_BLOCKS],
956[
957AC_MSG_CHECKING([for struct stat.st_blocks])
958AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
959[AC_TRY_COMPILE(
960[
961#include <sys/types.h>
962#include <sys/stat.h>
963],
964[
965main()
966{
967static struct stat a;
968if (a.st_blocks) return 0;
969return 0;
970}
971], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
972])
973AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
974if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
975AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
976fi
977])
978
979AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
980[
981if test "X$bash_cv_termcap_lib" = "X"; then
982_bash_needmsg=yes
983else
984AC_MSG_CHECKING(which library has the termcap functions)
985_bash_needmsg=
986fi
987AC_CACHE_VAL(bash_cv_termcap_lib,
988[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
989 [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
990 [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
991 [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
992 bash_cv_termcap_lib=gnutermcap)])])])])
993if test "X$_bash_needmsg" = "Xyes"; then
994AC_MSG_CHECKING(which library has the termcap functions)
995fi
996AC_MSG_RESULT(using $bash_cv_termcap_lib)
997if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
998LDFLAGS="$LDFLAGS -L./lib/termcap"
999TERMCAP_LIB="./lib/termcap/libtermcap.a"
1000TERMCAP_DEP="./lib/termcap/libtermcap.a"
1001elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1002TERMCAP_LIB=-ltermcap
1003TERMCAP_DEP=
1004elif test $bash_cv_termcap_lib = libtinfo; then
1005TERMCAP_LIB=-ltinfo
1006TERMCAP_DEP=
1007elif test $bash_cv_termcap_lib = libncurses; then
1008TERMCAP_LIB=-lncurses
1009TERMCAP_DEP=
1010else
1011TERMCAP_LIB=-lcurses
1012TERMCAP_DEP=
1013fi
1014])
1015
1016dnl
1017dnl Check for the presence of getpeername in libsocket.
1018dnl If libsocket is present, check for libnsl and add it to LIBS if
1019dnl it's there, since most systems with libsocket require linking
1020dnl with libnsl as well. This should only be called if getpeername
1021dnl was not found in libc.
1022dnl
1023dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
1024dnl AS WELL
1025dnl
1026AC_DEFUN([BASH_CHECK_LIB_SOCKET],
1027[
1028if test "X$bash_cv_have_socklib" = "X"; then
1029_bash_needmsg=
1030else
1031AC_MSG_CHECKING(for socket library)
1032_bash_needmsg=yes
1033fi
1034AC_CACHE_VAL(bash_cv_have_socklib,
1035[AC_CHECK_LIB(socket, getpeername,
1036 bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
1037if test "X$_bash_needmsg" = Xyes; then
1038 AC_MSG_RESULT($bash_cv_have_socklib)
1039 _bash_needmsg=
1040fi
1041if test $bash_cv_have_socklib = yes; then
1042 # check for libnsl, add it to LIBS if present
1043 if test "X$bash_cv_have_libnsl" = "X"; then
1044 _bash_needmsg=
1045 else
1046 AC_MSG_CHECKING(for libnsl)
1047 _bash_needmsg=yes
1048 fi
1049 AC_CACHE_VAL(bash_cv_have_libnsl,
1050 [AC_CHECK_LIB(nsl, t_open,
1051 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
1052 if test "X$_bash_needmsg" = Xyes; then
1053 AC_MSG_RESULT($bash_cv_have_libnsl)
1054 _bash_needmsg=
1055 fi
1056 if test $bash_cv_have_libnsl = yes; then
1057 LIBS="-lsocket -lnsl $LIBS"
1058 else
1059 LIBS="-lsocket $LIBS"
1060 fi
1061 AC_DEFINE(HAVE_LIBSOCKET)
1062 AC_DEFINE(HAVE_GETPEERNAME)
1063fi
1064])
1065
1066AH_TEMPLATE([STRUCT_DIRENT_HAS_D_INO], [Define if struct dirent has a d_ino member])
1067AC_DEFUN([BASH_STRUCT_DIRENT_D_INO],
1068[AC_REQUIRE([AC_HEADER_DIRENT])
1069AC_MSG_CHECKING(if struct dirent has a d_ino member)
1070AC_CACHE_VAL(bash_cv_dirent_has_dino,
1071[AC_TRY_COMPILE([
1072#include <stdio.h>
1073#include <sys/types.h>
1074#ifdef HAVE_UNISTD_H
1075# include <unistd.h>
1076#endif /* HAVE_UNISTD_H */
1077#if defined(HAVE_DIRENT_H)
1078# include <dirent.h>
1079#else
1080# define dirent direct
1081# ifdef HAVE_SYS_NDIR_H
1082# include <sys/ndir.h>
1083# endif /* SYSNDIR */
1084# ifdef HAVE_SYS_DIR_H
1085# include <sys/dir.h>
1086# endif /* SYSDIR */
1087# ifdef HAVE_NDIR_H
1088# include <ndir.h>
1089# endif
1090#endif /* HAVE_DIRENT_H */
1091],[
1092struct dirent d; int z; z = d.d_ino;
1093], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
1094AC_MSG_RESULT($bash_cv_dirent_has_dino)
1095if test $bash_cv_dirent_has_dino = yes; then
1096AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
1097fi
1098])
1099
1100AH_TEMPLATE([STRUCT_DIRENT_HAS_D_FILENO], [Define if struct dirent has a d_fileno member])
1101AC_DEFUN([BASH_STRUCT_DIRENT_D_FILENO],
1102[AC_REQUIRE([AC_HEADER_DIRENT])
1103AC_MSG_CHECKING(if struct dirent has a d_fileno member)
1104AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
1105[AC_TRY_COMPILE([
1106#include <stdio.h>
1107#include <sys/types.h>
1108#ifdef HAVE_UNISTD_H
1109# include <unistd.h>
1110#endif /* HAVE_UNISTD_H */
1111#if defined(HAVE_DIRENT_H)
1112# include <dirent.h>
1113#else
1114# define dirent direct
1115# ifdef HAVE_SYS_NDIR_H
1116# include <sys/ndir.h>
1117# endif /* SYSNDIR */
1118# ifdef HAVE_SYS_DIR_H
1119# include <sys/dir.h>
1120# endif /* SYSDIR */
1121# ifdef HAVE_NDIR_H
1122# include <ndir.h>
1123# endif
1124#endif /* HAVE_DIRENT_H */
1125],[
1126struct dirent d; int z; z = d.d_fileno;
1127], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
1128AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
1129if test $bash_cv_dirent_has_d_fileno = yes; then
1130AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
1131fi
1132])
1133
1134AC_DEFUN([BASH_STRUCT_TIMEVAL],
1135[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
1136AC_CACHE_VAL(bash_cv_struct_timeval,
1137[
1138AC_EGREP_HEADER(struct timeval, sys/time.h,
1139 bash_cv_struct_timeval=yes,
1140 AC_EGREP_HEADER(struct timeval, time.h,
1141 bash_cv_struct_timeval=yes,
1142 bash_cv_struct_timeval=no))
1143])
1144AC_MSG_RESULT($bash_cv_struct_timeval)
1145if test $bash_cv_struct_timeval = yes; then
1146 AC_DEFINE(HAVE_TIMEVAL)
1147fi
1148])
1149
1150AH_TEMPLATE([STRUCT_WINSIZE_IN_SYS_IOCTL], [Define if struct winsize is in sys/ioctl.h])
1151AH_TEMPLATE([STRUCT_WINSIZE_IN_TERMIOS], [Define if struct winsize is in termios.h])
1152AC_DEFUN([BASH_STRUCT_WINSIZE],
1153[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
1154AC_CACHE_VAL(bash_cv_struct_winsize_header,
1155[AC_TRY_COMPILE([#include <sys/types.h>
1156#include <sys/ioctl.h>], [struct winsize x;],
1157 bash_cv_struct_winsize_header=ioctl_h,
1158 [AC_TRY_COMPILE([#include <sys/types.h>
1159#include <termios.h>], [struct winsize x;],
1160 bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
1161])])
1162if test $bash_cv_struct_winsize_header = ioctl_h; then
1163 AC_MSG_RESULT(sys/ioctl.h)
1164 AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
1165elif test $bash_cv_struct_winsize_header = termios_h; then
1166 AC_MSG_RESULT(termios.h)
1167 AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
1168else
1169 AC_MSG_RESULT(not found)
1170fi
1171])
1172
1173dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
1174AH_TEMPLATE([HAVE_POSIX_SIGNALS], [Define if we have the POSIX signal routines])
1175AH_TEMPLATE([HAVE_BSD_SIGNALS], [Define if we have the BSD signal routines])
1176AH_TEMPLATE([HAVE_USG_SIGHOLD], [Define if we have the USG signal routines])
1177AC_DEFUN([BASH_SYS_SIGNAL_VINTAGE],
1178[AC_REQUIRE([AC_TYPE_SIGNAL])
1179AC_MSG_CHECKING(for type of signal functions)
1180AC_CACHE_VAL(bash_cv_signal_vintage,
1181[
1182 AC_MSG_WARN([checking for posix...])
1183 AC_TRY_LINK([#include <signal.h>],[
1184 sigset_t ss;
1185 struct sigaction sa;
1186 sigemptyset(&ss); sigsuspend(&ss);
1187 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1188 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1189 ], bash_cv_signal_vintage="posix",
1190 [
1191 AC_MSG_WARN([checking for 4.2bsd...])
1192 AC_TRY_LINK([#include <signal.h>], [
1193 int mask = sigmask(SIGINT);
1194 sigsetmask(mask); sigblock(mask); sigpause(mask);
1195 ], bash_cv_signal_vintage="4.2bsd",
1196 [
1197 AC_MSG_WARN([checking for svr3...])
1198 AC_TRY_LINK([
1199 #include <signal.h>
1200 RETSIGTYPE foo() { }], [
1201 int mask = sigmask(SIGINT);
1202 sigset(SIGINT, foo); sigrelse(SIGINT);
1203 sighold(SIGINT); sigpause(SIGINT);
1204 ], bash_cv_signal_vintage="svr3", bash_cv_signal_vintage="v7"
1205 )]
1206 )]
1207)
1208])
1209AC_MSG_RESULT($bash_cv_signal_vintage)
1210if test "$bash_cv_signal_vintage" = "posix"; then
1211AC_DEFINE(HAVE_POSIX_SIGNALS)
1212elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1213AC_DEFINE(HAVE_BSD_SIGNALS)
1214elif test "$bash_cv_signal_vintage" = "svr3"; then
1215AC_DEFINE(HAVE_USG_SIGHOLD)
1216fi
1217])
1218
1219dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
1220AC_DEFUN([BASH_SYS_PGRP_SYNC],
1221[AC_REQUIRE([AC_FUNC_GETPGRP])
1222AC_MSG_CHECKING(whether pgrps need synchronization)
1223AC_CACHE_VAL(bash_cv_pgrp_pipe,
1224[AC_TRY_RUN([
1225#ifdef HAVE_UNISTD_H
1226# include <unistd.h>
1227#endif
1228main()
1229{
1230# ifdef GETPGRP_VOID
1231# define getpgID() getpgrp()
1232# else
1233# define getpgID() getpgrp(0)
1234# define setpgid(x,y) setpgrp(x,y)
1235# endif
1236 int pid1, pid2, fds[2];
1237 int status;
1238 char ok;
1239
1240 switch (pid1 = fork()) {
1241 case -1:
1242 exit(1);
1243 case 0:
1244 setpgid(0, getpid());
1245 exit(0);
1246 }
1247 setpgid(pid1, pid1);
1248
1249 sleep(2); /* let first child die */
1250
1251 if (pipe(fds) < 0)
1252 exit(2);
1253
1254 switch (pid2 = fork()) {
1255 case -1:
1256 exit(3);
1257 case 0:
1258 setpgid(0, pid1);
1259 ok = getpgID() == pid1;
1260 write(fds[1], &ok, 1);
1261 exit(0);
1262 }
1263 setpgid(pid2, pid1);
1264
1265 close(fds[1]);
1266 if (read(fds[0], &ok, 1) != 1)
1267 exit(4);
1268 wait(&status);
1269 wait(&status);
1270 exit(ok ? 0 : 5);
1271}
1272], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
1273 [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
1274 bash_cv_pgrp_pipe=no])
1275])
1276AC_MSG_RESULT($bash_cv_pgrp_pipe)
1277if test $bash_cv_pgrp_pipe = yes; then
1278AC_DEFINE(PGRP_PIPE)
1279fi
1280])
1281
1282AH_TEMPLATE([MUST_REINSTALL_SIGHANDLERS], [Define if signal handlers must be reinstalled when invoked.])
1283AC_DEFUN([BASH_SYS_REINSTALL_SIGHANDLERS],
1284[AC_REQUIRE([AC_TYPE_SIGNAL])
1285AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1286AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
1287AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
1288[AC_TRY_RUN([
1289#include <signal.h>
1290#ifdef HAVE_UNISTD_H
1291#include <unistd.h>
1292#endif
1293
1294typedef RETSIGTYPE sigfunc();
1295
1296int nsigint;
1297
1298#ifdef HAVE_POSIX_SIGNALS
1299sigfunc *
1300set_signal_handler(sig, handler)
1301 int sig;
1302 sigfunc *handler;
1303{
1304 struct sigaction act, oact;
1305 act.sa_handler = handler;
1306 act.sa_flags = 0;
1307 sigemptyset (&act.sa_mask);
1308 sigemptyset (&oact.sa_mask);
1309 sigaction (sig, &act, &oact);
1310 return (oact.sa_handler);
1311}
1312#else
1313#define set_signal_handler(s, h) signal(s, h)
1314#endif
1315
1316RETSIGTYPE
1317sigint(s)
1318int s;
1319{
1320 nsigint++;
1321}
1322
1323main()
1324{
1325 nsigint = 0;
1326 set_signal_handler(SIGINT, sigint);
1327 kill((int)getpid(), SIGINT);
1328 kill((int)getpid(), SIGINT);
1329 exit(nsigint != 2);
1330}
1331], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
1332 [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
1333 bash_cv_must_reinstall_sighandlers=no]
1334)])
1335AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
1336if test $bash_cv_must_reinstall_sighandlers = yes; then
1337AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
1338fi
1339])
1340
1341dnl check that some necessary job control definitions are present
1342AC_DEFUN([BASH_SYS_JOB_CONTROL_MISSING],
1343[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1344AC_MSG_CHECKING(for presence of necessary job control definitions)
1345AC_CACHE_VAL(bash_cv_job_control_missing,
1346[AC_TRY_RUN([
1347#include <sys/types.h>
1348#ifdef HAVE_SYS_WAIT_H
1349#include <sys/wait.h>
1350#endif
1351#ifdef HAVE_UNISTD_H
1352#include <unistd.h>
1353#endif
1354#include <signal.h>
1355
1356/* Add more tests in here as appropriate. */
1357main()
1358{
1359/* signal type */
1360#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
1361exit(1);
1362#endif
1363
1364/* signals and tty control. */
1365#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
1366exit (1);
1367#endif
1368
1369/* process control */
1370#if !defined (WNOHANG) || !defined (WUNTRACED)
1371exit(1);
1372#endif
1373
1374/* Posix systems have tcgetpgrp and waitpid. */
1375#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
1376exit(1);
1377#endif
1378
1379#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
1380exit(1);
1381#endif
1382
1383/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
1384#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
1385exit(1);
1386#endif
1387
1388exit(0);
1389}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
1390 [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
1391 bash_cv_job_control_missing=missing]
1392)])
1393AC_MSG_RESULT($bash_cv_job_control_missing)
1394if test $bash_cv_job_control_missing = missing; then
1395AC_DEFINE(JOB_CONTROL_MISSING)
1396fi
1397])
1398
1399dnl check whether named pipes are present
1400dnl this requires a previous check for mkfifo, but that is awkward to specify
1401AC_DEFUN([BASH_SYS_NAMED_PIPES],
1402[AC_MSG_CHECKING(for presence of named pipes)
1403AC_CACHE_VAL(bash_cv_sys_named_pipes,
1404[AC_TRY_RUN([
1405#include <sys/types.h>
1406#include <sys/stat.h>
1407#ifdef HAVE_UNISTD_H
1408#include <unistd.h>
1409#endif
1410
1411/* Add more tests in here as appropriate. */
1412main()
1413{
1414int fd, err;
1415
1416#if defined (HAVE_MKFIFO)
1417exit (0);
1418#endif
1419
1420#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
1421exit (1);
1422#endif
1423
1424#if defined (NeXT)
1425exit (1);
1426#endif
1427err = mkdir("/tmp/bash-aclocal", 0700);
1428if (err < 0) {
1429 perror ("mkdir");
1430 exit(1);
1431}
1432fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
1433if (fd == -1) {
1434 rmdir ("/tmp/bash-aclocal");
1435 exit (1);
1436}
1437close(fd);
1438unlink ("/tmp/bash-aclocal/sh-np-autoconf");
1439rmdir ("/tmp/bash-aclocal");
1440exit(0);
1441}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
1442 [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
1443 bash_cv_sys_named_pipes=missing]
1444)])
1445AC_MSG_RESULT($bash_cv_sys_named_pipes)
1446if test $bash_cv_sys_named_pipes = missing; then
1447AC_DEFINE(NAMED_PIPES_MISSING)
1448fi
1449])
1450
1451AC_DEFUN([BASH_SYS_DEFAULT_MAIL_DIR],
1452[AC_MSG_CHECKING(for default mail directory)
1453AC_CACHE_VAL(bash_cv_mail_dir,
1454[if test -d /var/mail; then
1455 bash_cv_mail_dir=/var/mail
1456 elif test -d /var/spool/mail; then
1457 bash_cv_mail_dir=/var/spool/mail
1458 elif test -d /usr/mail; then
1459 bash_cv_mail_dir=/usr/mail
1460 elif test -d /usr/spool/mail; then
1461 bash_cv_mail_dir=/usr/spool/mail
1462 else
1463 bash_cv_mail_dir=unknown
1464 fi
1465])
1466AC_MSG_RESULT($bash_cv_mail_dir)
1467AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
1468])
1469
1470AC_DEFUN([BASH_HAVE_TIOCGWINSZ],
1471[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
1472AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
1473[AC_TRY_COMPILE([#include <sys/types.h>
1474#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
1475 bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
1476AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
1477if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
1478AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
1479fi
1480])
1481
1482AH_TEMPLATE([TIOCSTAT_IN_SYS_IOCTL], [Define if TIOCSTAT is in sys/ioctl.h])
1483AC_DEFUN([BASH_HAVE_TIOCSTAT],
1484[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
1485AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
1486[AC_TRY_COMPILE([#include <sys/types.h>
1487#include <sys/ioctl.h>], [int x = TIOCSTAT;],
1488 bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
1489AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
1490if test $bash_cv_tiocstat_in_ioctl = yes; then
1491AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
1492fi
1493])
1494
1495AH_TEMPLATE([FIONREAD_IN_SYS_IOCTL], [Define if FIONREAD is in sys/ioctl.h])
1496AC_DEFUN([BASH_HAVE_FIONREAD],
1497[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
1498AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
1499[AC_TRY_COMPILE([#include <sys/types.h>
1500#include <sys/ioctl.h>], [int x = FIONREAD;],
1501 bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
1502AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
1503if test $bash_cv_fionread_in_ioctl = yes; then
1504AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
1505fi
1506])
1507
1508dnl
1509dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
1510dnl require a definition of speed_t each time <termcap.h> is included,
1511dnl but you can only get speed_t if you include <termios.h> (on some
1512dnl versions) or <sys/types.h> (on others).
1513dnl
1514AH_TEMPLATE([SPEED_T_IN_SYS_TYPES], [Define if speed_t is in sys/types.h])
1515AC_DEFUN([BASH_CHECK_SPEED_T],
1516[AC_MSG_CHECKING(for speed_t in sys/types.h)
1517AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
1518[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
1519 bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
1520AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
1521if test $bash_cv_speed_t_in_sys_types = yes; then
1522AC_DEFINE(SPEED_T_IN_SYS_TYPES)
1523fi
1524])
1525
1526AH_TEMPLATE([HAVE_GETPW_DECLS], [Define if getpw functions are declared in pwd.h])
1527AC_DEFUN([BASH_CHECK_GETPW_FUNCS],
1528[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
1529AC_CACHE_VAL(bash_cv_getpw_declared,
1530[AC_EGREP_CPP(getpwuid,
1531[
1532#include <sys/types.h>
1533#ifdef HAVE_UNISTD_H
1534# include <unistd.h>
1535#endif
1536#include <pwd.h>
1537],
1538bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
1539AC_MSG_RESULT($bash_cv_getpw_declared)
1540if test $bash_cv_getpw_declared = yes; then
1541AC_DEFINE(HAVE_GETPW_DECLS)
1542fi
1543])
1544
1545AC_DEFUN([BASH_CHECK_DEV_FD],
1546[AC_MSG_CHECKING(whether /dev/fd is available)
1547AC_CACHE_VAL(bash_cv_dev_fd,
1548[if test -d /dev/fd && test -r /dev/fd/0; then
1549 bash_cv_dev_fd=standard
1550 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
1551 bash_cv_dev_fd=whacky
1552 else
1553 bash_cv_dev_fd=absent
1554 fi
1555])
1556AC_MSG_RESULT($bash_cv_dev_fd)
1557if test $bash_cv_dev_fd = "standard"; then
1558 AC_DEFINE(HAVE_DEV_FD)
1559 AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
1560elif test $bash_cv_dev_fd = "whacky"; then
1561 AC_DEFINE(HAVE_DEV_FD)
1562 AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
1563fi
1564])
1565
1566AC_DEFUN([BASH_CHECK_DEV_STDIN],
1567[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
1568AC_CACHE_VAL(bash_cv_dev_stdin,
1569[if test -d /dev/fd && test -r /dev/stdin; then
1570 bash_cv_dev_stdin=present
1571 elif test -d /proc/self/fd && test -r /dev/stdin; then
1572 bash_cv_dev_stdin=present
1573 else
1574 bash_cv_dev_stdin=absent
1575 fi
1576])
1577AC_MSG_RESULT($bash_cv_dev_stdin)
1578if test $bash_cv_dev_stdin = "present"; then
1579 AC_DEFINE(HAVE_DEV_STDIN)
1580fi
1581])
1582
1583dnl
1584dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
1585dnl
1586AC_DEFUN([BASH_CHECK_KERNEL_RLIMIT],
1587[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
1588AC_CACHE_VAL(bash_cv_kernel_rlimit,
1589[AC_TRY_COMPILE([
1590#include <sys/types.h>
1591#include <sys/resource.h>
1592],
1593[
1594 int f;
1595 f = RLIMIT_DATA;
1596], bash_cv_kernel_rlimit=no,
1597[AC_TRY_COMPILE([
1598#include <sys/types.h>
1599#define _KERNEL
1600#include <sys/resource.h>
1601#undef _KERNEL
1602],
1603[
1604 int f;
1605 f = RLIMIT_DATA;
1606], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
1607)])
1608AC_MSG_RESULT($bash_cv_kernel_rlimit)
1609if test $bash_cv_kernel_rlimit = yes; then
1610AC_DEFINE(RLIMIT_NEEDS_KERNEL)
1611fi
1612])
1613
1614dnl
1615dnl Check for 64-bit off_t -- used for malloc alignment
1616dnl
1617dnl C does not allow duplicate case labels, so the compile will fail if
1618dnl sizeof(off_t) is > 4.
1619dnl
1620AC_DEFUN([BASH_CHECK_OFF_T_64],
1621[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
1622AC_TRY_COMPILE([
1623#ifdef HAVE_UNISTD_H
1624#include <unistd.h>
1625#endif
1626#include <sys/types.h>
1627],[
1628switch (0) case 0: case (sizeof (off_t) <= 4):;
1629], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
1630if test $bash_cv_off_t_64 = yes; then
1631 AC_DEFINE(HAVE_OFF_T_64)
1632fi])
1633
1634AC_DEFUN([BASH_CHECK_RTSIGS],
1635[AC_MSG_CHECKING(for unusable real-time signals due to large values)
1636AC_CACHE_VAL(bash_cv_unusable_rtsigs,
1637[AC_TRY_RUN([
1638#include <sys/types.h>
1639#include <signal.h>
1640
1641#ifndef NSIG
1642# define NSIG 64
1643#endif
1644
1645main ()
1646{
1647 int n_sigs = 2 * NSIG;
1648#ifdef SIGRTMIN
1649 int rtmin = SIGRTMIN;
1650#else
1651 int rtmin = 0;
1652#endif
1653
1654 exit(rtmin < n_sigs);
1655}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
1656 [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
1657 bash_cv_unusable_rtsigs=yes]
1658)])
1659AC_MSG_RESULT($bash_cv_unusable_rtsigs)
1660if test $bash_cv_unusable_rtsigs = yes; then
1661AC_DEFINE(UNUSABLE_RT_SIGNALS)
1662fi
1663])
1664
1665dnl
1666dnl check for availability of multibyte characters and functions
1667dnl
1668AH_TEMPLATE([HAVE_MBSRTOWCS], [Define if we have the mbsrtowcs function])
1669AH_TEMPLATE([HAVE_WCWIDTH], [Define if we have the wcwidth function])
1670AH_TEMPLATE([HAVE_MBSTATE_T], [Define if we have mbstate_t])
1671AH_TEMPLATE([HAVE_LANGINFO_CODESET], [Define if we have nl_langinfo and CODESET])
1672AC_DEFUN([BASH_CHECK_MULTIBYTE],
1673[
1674AC_CHECK_HEADERS(wctype.h)
1675AC_CHECK_HEADERS(wchar.h)
1676AC_CHECK_HEADERS(langinfo.h)
1677
1678AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
1679AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
1680
1681AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
1682[AC_TRY_RUN([
1683#include <wchar.h>
1684int
1685main ()
1686{
1687 mbstate_t ps;
1688 return 0;
1689}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
1690if test $bash_cv_have_mbstate_t = yes; then
1691 AC_DEFINE(HAVE_MBSTATE_T)
1692fi
1693
1694AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
1695[AC_TRY_LINK(
1696[#include <langinfo.h>],
1697[char* cs = nl_langinfo(CODESET);],
1698bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
1699if test $bash_cv_langinfo_codeset = yes; then
1700 AC_DEFINE(HAVE_LANGINFO_CODESET)
1701fi
1702
1703])
1704
1705dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
1706dnl require:
1707dnl AC_PROG_CC
1708dnl BASH_CHECK_LIB_TERMCAP
1709
1710AC_DEFUN([RL_LIB_READLINE_VERSION],
1711[
1712AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
1713
1714AC_MSG_CHECKING([version of installed readline library])
1715
1716# What a pain in the ass this is.
1717
1718# save cpp and ld options
1719_save_CFLAGS="$CFLAGS"
1720_save_LDFLAGS="$LDFLAGS"
1721_save_LIBS="$LIBS"
1722
1723# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
1724# allows the caller to do something like $_rl_prefix=$withval if the user
1725# specifies --with-installed-readline=PREFIX as an argument to configure
1726
1727if test -z "$ac_cv_rl_prefix"; then
1728test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
1729fi
1730
1731eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
1732eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
1733
1734LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
1735CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
1736LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
1737
1738AC_TRY_RUN([
1739#include <stdio.h>
1740#include <readline/readline.h>
1741
1742main()
1743{
1744 FILE *fp;
1745 fp = fopen("conftest.rlv", "w");
1746 if (fp == 0) exit(1);
1747 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
1748 fclose(fp);
1749 exit(0);
1750}
1751],
1752ac_cv_rl_version=`cat conftest.rlv`,
1753ac_cv_rl_version='0.0',
1754ac_cv_rl_version='4.2')
1755
1756CFLAGS="$_save_CFLAGS"
1757LDFLAGS="$_save_LDFLAGS"
1758LIBS="$_save_LIBS"
1759
1760RL_MAJOR=0
1761RL_MINOR=0
1762
1763# (
1764case "$ac_cv_rl_version" in
17652*|3*|4*|5*|6*|7*|8*|9*)
1766 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
1767 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
1768 ;;
1769esac
1770
1771# (((
1772case $RL_MAJOR in
1773[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
1774[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
1775*) _RL_MAJOR=00 ;;
1776esac
1777
1778# (((
1779case $RL_MINOR in
1780[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
1781[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
1782*) _RL_MINOR=00 ;;
1783esac
1784
1785RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
1786
1787# Readline versions greater than 4.2 have these defines in readline.h
1788
1789if test $ac_cv_rl_version = '0.0' ; then
1790 AC_MSG_WARN([Could not test version of installed readline library.])
1791elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
1792 # set these for use by the caller
1793 RL_PREFIX=$ac_cv_rl_prefix
1794 RL_LIBDIR=$ac_cv_rl_libdir
1795 RL_INCLUDEDIR=$ac_cv_rl_includedir
1796 AC_MSG_RESULT($ac_cv_rl_version)
1797else
1798
1799AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
1800AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
1801AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
1802
1803AC_SUBST(RL_VERSION)
1804AC_SUBST(RL_MAJOR)
1805AC_SUBST(RL_MINOR)
1806
1807# set these for use by the caller
1808RL_PREFIX=$ac_cv_rl_prefix
1809RL_LIBDIR=$ac_cv_rl_libdir
1810RL_INCLUDEDIR=$ac_cv_rl_includedir
1811
1812AC_MSG_RESULT($ac_cv_rl_version)
1813
1814fi
1815])
diff --git a/openembedded/packages/readline/readline-4.3/shlink-termcap.patch b/openembedded/packages/readline/readline-4.3/shlink-termcap.patch
new file mode 100644
index 0000000000..249f4e7081
--- /dev/null
+++ b/openembedded/packages/readline/readline-4.3/shlink-termcap.patch
@@ -0,0 +1,45 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- readline-4.3/shlib/Makefile.in~shlink-termcap
7+++ readline-4.3/shlib/Makefile.in
8@@ -53,11 +53,13 @@
9 CFLAGS = @CFLAGS@
10 LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
11 CPPFLAGS = @CPPFLAGS@
12-LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@
13+LDFLAGS = @LDFLAGS@ $(SHOBJ_LDFLAGS) $(SHLIB_XLDFLAGS) @LOCAL_LDFLAGS@ @CFLAGS@
14
15 DEFS = @DEFS@
16 LOCAL_DEFS = @LOCAL_DEFS@
17
18+TERMCAP_LIB = @TERMCAP_LIB@
19+
20 #
21 # These values are generated for configure by ${topdir}/support/shobj-conf.
22 # If your system is not supported by that script, but includes facilities for
23@@ -73,7 +75,7 @@
24 SHOBJ_LIBS = @SHOBJ_LIBS@
25
26 SHLIB_XLDFLAGS = @SHLIB_XLDFLAGS@
27-SHLIB_LIBS = @SHLIB_LIBS@
28+SHLIB_LIBS = @SHLIB_LIBS@ @TERMCAP_LIB@
29 SHLIB_LIBSUFF = @SHLIB_LIBSUFF@
30
31 SHLIB_LIBVERSION = @SHLIB_LIBVERSION@
32@@ -147,11 +149,11 @@
33
34 $(SHARED_READLINE): $(SHARED_OBJ)
35 $(RM) $@
36- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS)
37+ $(SHOBJ_LD) ${LDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS)
38
39 $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so
40 $(RM) $@
41- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS)
42+ $(SHOBJ_LD) ${LDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS)
43
44 # Since tilde.c is shared between readline and bash, make sure we compile
45 # it with the right flags when it's built as part of readline
diff --git a/openembedded/packages/readline/readline-native_4.3.bb b/openembedded/packages/readline/readline-native_4.3.bb
new file mode 100644
index 0000000000..e9cede7cd1
--- /dev/null
+++ b/openembedded/packages/readline/readline-native_4.3.bb
@@ -0,0 +1,4 @@
1include readline_${PV}.bb
2inherit native
3DEPENDS = "ncurses-native"
4FILESPATH = "${FILE_DIRNAME}/readline-${PV}:${FILE_DIRNAME}/readline:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
diff --git a/openembedded/packages/readline/readline_4.3.bb b/openembedded/packages/readline/readline_4.3.bb
new file mode 100644
index 0000000000..234d697dfb
--- /dev/null
+++ b/openembedded/packages/readline/readline_4.3.bb
@@ -0,0 +1,46 @@
1DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
2command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
3additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
4lines, and perform csh-like history expansion on previous commands."
5SECTION = "libs"
6PRIORITY = "optional"
7MAINTAINER = "Greg Gilbert <greg@treke.net>"
8LICENSE = "GPLv2"
9DEPENDS += "ncurses"
10RPROVIDES_${PN} += "readline"
11LEAD_SONAME = "libreadline.so"
12PR = "r2"
13
14SRC_URI = "ftp://ftp.cwru.edu/pub/bash/readline-${PV}.tar.gz \
15 file://shlink-termcap.patch;patch=1 \
16 file://acinclude.m4"
17S = "${WORKDIR}/readline-${PV}"
18
19inherit autotools
20
21do_configure () {
22 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
23 autotools_do_configure
24}
25
26do_install () {
27 autotools_do_install
28 # Make install doesn't properly install these
29 oe_libinstall -so -C shlib libhistory ${D}${libdir}
30 oe_libinstall -so -C shlib libreadline ${D}${libdir}
31}
32
33do_stage() {
34 oe_libinstall -a libhistory ${STAGING_LIBDIR}
35 oe_libinstall -a libreadline ${STAGING_LIBDIR}
36 oe_libinstall -so -C shlib libhistory ${STAGING_LIBDIR}
37 oe_libinstall -so -C shlib libreadline ${STAGING_LIBDIR}
38
39 install -d ${STAGING_INCDIR}/readline
40 for f in readline.h chardefs.h keymaps.h history.h tilde.h rlstdc.h \
41 rlconf.h rltypedefs.h
42 do
43 install -m 0644 $f ${STAGING_INCDIR}/readline/
44 done
45
46}
diff --git a/openembedded/packages/strace/strace-4.5.12/quota.patch b/openembedded/packages/strace/strace-4.5.12/quota.patch
new file mode 100644
index 0000000000..8d05da626a
--- /dev/null
+++ b/openembedded/packages/strace/strace-4.5.12/quota.patch
@@ -0,0 +1,10 @@
1--- strace-4.5.11/resource.c.old 2005-06-28 14:44:27.000000000 +0100
2+++ strace-4.5.11/resource.c 2005-06-28 14:44:28.000000000 +0100
3@@ -36,6 +36,7 @@
4 #ifdef LINUX
5 #include <sys/times.h>
6 #include <linux/kernel.h>
7+#define _LINUX_QUOTA_VERSION 1
8 #include <sys/quota.h>
9 #endif /* LINUX */
10 #ifdef SUNOS4
diff --git a/openembedded/packages/strace/strace/arm-syscallent.patch b/openembedded/packages/strace/strace/arm-syscallent.patch
new file mode 100644
index 0000000000..dd23ab762b
--- /dev/null
+++ b/openembedded/packages/strace/strace/arm-syscallent.patch
@@ -0,0 +1,402 @@
1--- /dev/null Fri Apr 23 21:29:25 2004
2+++ strace-4.5.4/linux/arm/syscallent.h Thu Sep 2 13:42:52 2004
3@@ -0,0 +1,399 @@
4+/*
5+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
6+ * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
7+ * All rights reserved.
8+ *
9+ * Redistribution and use in source and binary forms, with or without
10+ * modification, are permitted provided that the following conditions
11+ * are met:
12+ * 1. Redistributions of source code must retain the above copyright
13+ * notice, this list of conditions and the following disclaimer.
14+ * 2. Redistributions in binary form must reproduce the above copyright
15+ * notice, this list of conditions and the following disclaimer in the
16+ * documentation and/or other materials provided with the distribution.
17+ * 3. The name of the author may not be used to endorse or promote products
18+ * derived from this software without specific prior written permission.
19+ *
20+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+ *
31+ * $Id: syscallent.h,v 1.26 2004/04/16 21:48:44 roland Exp $
32+ */
33+
34+ { 0, 0, sys_setup, "setup" }, /* 0 */
35+ { 1, TP, sys_exit, "_exit" }, /* 1 */
36+ { 0, TP, sys_fork, "fork" }, /* 2 */
37+ { 3, 0, sys_read, "read" }, /* 3 */
38+ { 3, 0, sys_write, "write" }, /* 4 */
39+ { 3, TF, sys_open, "open" }, /* 5 */
40+ { 1, 0, sys_close, "close" }, /* 6 */
41+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
42+ { 2, TF, sys_creat, "creat" }, /* 8 */
43+ { 2, TF, sys_link, "link" }, /* 9 */
44+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
45+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
46+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
47+ { 1, 0, sys_time, "time" }, /* 13 */
48+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
49+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
50+#ifdef M68K
51+ { 3, TF, sys_chown, "chown" }, /* 16 */
52+#else
53+ { 3, TF, sys_chown, "lchown" }, /* 16 */
54+#endif
55+ { 0, 0, sys_break, "break" }, /* 17 */
56+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
57+ { 3, 0, sys_lseek, "lseek" }, /* 19 */
58+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
59+ { 5, TF, sys_mount, "mount" }, /* 21 */
60+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
61+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
62+ { 0, 0, sys_getuid, "getuid" }, /* 24 */
63+ { 1, 0, sys_stime, "stime" }, /* 25 */
64+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
65+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
66+ { 2, 0, sys_oldfstat, "oldfstat" }, /* 28 */
67+ { 0, TS, sys_pause, "pause" }, /* 29 */
68+ { 2, TF, sys_utime, "utime" }, /* 30 */
69+ { 2, 0, sys_stty, "stty" }, /* 31 */
70+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
71+ { 2, TF, sys_access, "access" }, /* 33 */
72+ { 1, 0, sys_nice, "nice" }, /* 34 */
73+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
74+ { 0, 0, sys_sync, "sync" }, /* 36 */
75+ { 2, TS, sys_kill, "kill" }, /* 37 */
76+ { 2, TF, sys_rename, "rename" }, /* 38 */
77+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
78+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
79+ { 1, 0, sys_dup, "dup" }, /* 41 */
80+ { 1, 0, sys_pipe, "pipe" }, /* 42 */
81+ { 1, 0, sys_times, "times" }, /* 43 */
82+ { 0, 0, sys_prof, "prof" }, /* 44 */
83+ { 1, 0, sys_brk, "brk" }, /* 45 */
84+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
85+ { 0, 0, sys_getgid, "getgid" }, /* 47 */
86+ { 3, TS, sys_signal, "signal" }, /* 48 */
87+ { 0, 0, sys_geteuid, "geteuid" }, /* 49 */
88+ { 0, 0, sys_getegid, "getegid" }, /* 50 */
89+ { 1, TF, sys_acct, "acct" }, /* 51 */
90+ { 2, TF, sys_umount2, "umount" }, /* 52 */
91+ { 0, 0, sys_lock, "lock" }, /* 53 */
92+ { 3, 0, sys_ioctl, "ioctl" }, /* 54 */
93+ { 3, 0, sys_fcntl, "fcntl" }, /* 55 */
94+ { 0, 0, sys_mpx, "mpx" }, /* 56 */
95+ { 2, 0, sys_setpgid, "setpgid" }, /* 57 */
96+ { 2, 0, sys_ulimit, "ulimit" }, /* 58 */
97+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
98+ { 1, 0, sys_umask, "umask" }, /* 60 */
99+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
100+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
101+ { 2, 0, sys_dup2, "dup2" }, /* 63 */
102+ { 0, 0, sys_getppid, "getppid" }, /* 64 */
103+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
104+ { 0, 0, sys_setsid, "setsid" }, /* 66 */
105+ { 3, TS, sys_sigaction, "sigaction" }, /* 67 */
106+ { 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
107+ { 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
108+ { 2, 0, sys_setreuid, "setreuid" }, /* 70 */
109+ { 2, 0, sys_setregid, "setregid" }, /* 71 */
110+ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
111+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
112+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
113+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
114+ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
115+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
116+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
117+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
118+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
119+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
120+ { 1, 0, sys_oldselect, "oldselect" }, /* 82 */
121+ { 2, TF, sys_symlink, "symlink" }, /* 83 */
122+ { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
123+ { 3, TF, sys_readlink, "readlink" }, /* 85 */
124+ { 1, TF, sys_uselib, "uselib" }, /* 86 */
125+ { 1, TF, sys_swapon, "swapon" }, /* 87 */
126+ { 3, 0, sys_reboot, "reboot" }, /* 88 */
127+ { 3, 0, sys_readdir, "readdir" }, /* 89 */
128+ { 6, 0, sys_old_mmap, "old_mmap" }, /* 90 */
129+ { 2, 0, sys_munmap, "munmap" }, /* 91 */
130+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
131+ { 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
132+ { 2, 0, sys_fchmod, "fchmod" }, /* 94 */
133+ { 3, 0, sys_fchown, "fchown" }, /* 95 */
134+ { 2, 0, sys_getpriority, "getpriority" }, /* 96 */
135+ { 3, 0, sys_setpriority, "setpriority" }, /* 97 */
136+ { 4, 0, sys_profil, "profil" }, /* 98 */
137+ { 2, TF, sys_statfs, "statfs" }, /* 99 */
138+ { 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
139+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
140+ { 2, 0, sys_socketcall, "socketcall" }, /* 102 */
141+ { 3, 0, sys_syslog, "syslog" }, /* 103 */
142+ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
143+ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
144+ { 2, TF, sys_stat, "stat" }, /* 106 */
145+ { 2, TF, sys_lstat, "lstat" }, /* 107 */
146+ { 2, 0, sys_fstat, "fstat" }, /* 108 */
147+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
148+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
149+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
150+ { 0, 0, sys_idle, "idle" }, /* 112 */
151+ { 1, 0, sys_vm86old, "vm86old" }, /* 113 */
152+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
153+ { 1, 0, sys_swapoff, "swapoff" }, /* 115 */
154+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
155+ { 6, 0, sys_ipc, "ipc" }, /* 117 */
156+ { 1, 0, sys_fsync, "fsync" }, /* 118 */
157+ { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
158+ { 5, TP, sys_clone, "clone" }, /* 120 */
159+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
160+ { 1, 0, sys_uname, "uname" }, /* 122 */
161+#ifdef M68K
162+ { 4, 0, sys_cacheflush, "cacheflush" }, /* 123 */
163+#else
164+ { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */
165+#endif
166+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
167+ { 3, 0, sys_mprotect, "mprotect" }, /* 125 */
168+ { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
169+ { 2, 0, sys_create_module, "create_module" }, /* 127 */
170+ { 2, 0, sys_init_module, "init_module" }, /* 128 */
171+ { 1, 0, sys_delete_module, "delete_module" }, /* 129 */
172+ { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
173+ { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
174+ { 1, 0, sys_getpgid, "getpgid" }, /* 132 */
175+ { 1, 0, sys_fchdir, "fchdir" }, /* 133 */
176+ { 0, 0, sys_bdflush, "bdflush" }, /* 134 */
177+ { 3, 0, sys_sysfs, "sysfs" }, /* 135 */
178+ { 1, 0, sys_personality, "personality" }, /* 136 */
179+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
180+ { 1, 0, sys_setfsuid, "setfsuid" }, /* 138 */
181+ { 1, 0, sys_setfsgid, "setfsgid" }, /* 139 */
182+ { 5, 0, sys_llseek, "_llseek" }, /* 140 */
183+ { 3, 0, sys_getdents, "getdents" }, /* 141 */
184+ { 5, 0, sys_select, "select" }, /* 142 */
185+ { 2, 0, sys_flock, "flock" }, /* 143 */
186+ { 3, 0, sys_msync, "msync" }, /* 144 */
187+ { 3, 0, sys_readv, "readv" }, /* 145 */
188+ { 3, 0, sys_writev, "writev" }, /* 146 */
189+ { 1, 0, sys_getsid, "getsid" }, /* 147 */
190+ { 1, 0, sys_fdatasync, "fdatasync" }, /* 148 */
191+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
192+ { 2, 0, sys_mlock, "mlock" }, /* 150 */
193+ { 2, 0, sys_munlock, "munlock" }, /* 151 */
194+ { 2, 0, sys_mlockall, "mlockall" }, /* 152 */
195+ { 0, 0, sys_munlockall, "munlockall" }, /* 153 */
196+ { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
197+ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
198+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
199+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
200+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
201+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
202+ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
203+ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
204+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
205+ { 4, 0, sys_mremap, "mremap" }, /* 163 */
206+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
207+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
208+#ifdef M68K
209+ { 5, 0, printargs, "SYS_166" }, /* 166 */
210+#else
211+ { 5, 0, printargs, "vm86" }, /* 166 */
212+#endif
213+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
214+ { 3, 0, sys_poll, "poll" }, /* 168 */
215+ { 3, 0, printargs, "nfsservctl" }, /* 169 */
216+ { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
217+ { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
218+ { 5, 0, printargs, "prctl" }, /* 172 */
219+ { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
220+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
221+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
222+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
223+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
224+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
225+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
226+
227+ { 5, TF, sys_pread, "pread" }, /* 180 */
228+ { 5, TF, sys_pwrite, "pwrite" }, /* 181 */
229+#ifdef M68K
230+ { 3, TF, sys_chown, "lchown" }, /* 182 */
231+#else
232+ { 3, TF, sys_chown, "chown" }, /* 182 */
233+#endif
234+ { 2, TF, sys_getcwd, "getcwd" }, /* 183 */
235+ { 2, 0, sys_capget, "capget" }, /* 184 */
236+ { 2, 0, sys_capset, "capset" }, /* 185 */
237+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
238+ { 4, TF, sys_sendfile, "sendfile" }, /* 187 */
239+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
240+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
241+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
242+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
243+ { 6, 0, sys_mmap, "mmap2" }, /* 192 */
244+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
245+ { 3, TF, sys_ftruncate64, "ftruncate64" }, /* 194 */
246+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
247+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
248+ { 2, TF, sys_fstat64, "fstat64" }, /* 197 */
249+ { 3, TF, sys_chown, "lchown32" }, /* 198 */
250+ { 0, 0, sys_getuid, "getuid32" }, /* 199 */
251+
252+ { 0, 0, sys_getgid, "getgid32" }, /* 200 */
253+ { 0, 0, sys_geteuid, "geteuid32" }, /* 201 */
254+ { 0, 0, sys_geteuid, "getegid32" }, /* 202 */
255+ { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */
256+ { 2, 0, sys_setregid, "setregid32" }, /* 204 */
257+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
258+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
259+ { 3, 0, sys_fchown, "fchown32" }, /* 207 */
260+ { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
261+ { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
262+ { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
263+ { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */
264+ { 3, TF, sys_chown, "chown32" }, /* 212 */
265+ { 1, 0, sys_setuid, "setuid32" }, /* 213 */
266+ { 1, 0, sys_setgid, "setgid32" }, /* 214 */
267+ { 1, 0, sys_setfsuid, "setfsuid32" }, /* 215 */
268+ { 1, 0, sys_setfsgid, "setfsgid32" }, /* 216 */
269+ { 4, 0, sys_getdents64, "getdents64" }, /* 217 */
270+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 218 */
271+ { 3, 0, printargs, "mincore" }, /* 219 */
272+ { 3, 0, sys_madvise, "madvise" }, /* 220 */
273+ { 3, 0, sys_fcntl, "fcntl64" }, /* 221 */
274+ { 4, 0, printargs, "SYS_222" }, /* 222 */
275+/*TODO*/{ 5, 0, printargs, "security" }, /* 223 */
276+ { 0, 0, printargs, "gettid" }, /* 224 */
277+ { 4, 0, sys_readahead, "readahead" }, /* 225 */
278+ { 5, TF, sys_setxattr, "setxattr" }, /* 226 */
279+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
280+ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 228 */
281+ { 4, TF, sys_getxattr, "getxattr" }, /* 229 */
282+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
283+ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 231 */
284+ { 3, TF, sys_listxattr, "listxattr" }, /* 232 */
285+ { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */
286+ { 3, 0, sys_flistxattr, "flistxattr" }, /* 234 */
287+ { 2, TF, sys_removexattr, "removexattr" }, /* 235 */
288+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
289+ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 237 */
290+ { 2, TS, sys_kill, "tkill" }, /* 238 */
291+ { 4, TF, sys_sendfile64, "sendfile64" }, /* 239 */
292+ { 5, 0, sys_futex, "futex" }, /* 240 */
293+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */
294+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */
295+ { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 243 */
296+ { 1, 0, sys_get_thread_area, "get_thread_area" }, /* 244 */
297+ { 2, 0, printargs, "io_setup" }, /* 245 */
298+ { 1, 0, printargs, "io_destroy" }, /* 246 */
299+ { 5, 0, printargs, "io_getevents" }, /* 247 */
300+ { 3, 0, printargs, "io_submit" }, /* 248 */
301+ { 3, 0, printargs, "io_cancel" }, /* 249 */
302+ { 5, 0, printargs, "SYS_250" }, /* 250 */
303+ { 5, 0, printargs, "SYS_251" }, /* 251 */
304+ { 1, TP, sys_exit, "exit_group" }, /* 252 */
305+ { 4, 0, printargs, "lookup_dcookie"}, /* 253 */
306+ { 1, 0, printargs, "epoll_create" }, /* 254 */
307+ { 4, 0, printargs, "epoll_ctl" }, /* 255 */
308+ { 4, 0, printargs, "epoll_wait" }, /* 256 */
309+ { 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
310+ { 1, 0, printargs, "set_tid_address"}, /* 258 */
311+ { 3, 0, sys_timer_create, "timer_create" }, /* 259 */
312+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */
313+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */
314+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */
315+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */
316+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */
317+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */
318+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */
319+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */
320+ { 3, TF, sys_statfs64, "statfs64" }, /* 268 */
321+ { 3, 0, sys_fstatfs64, "fstatfs64" }, /* 269 */
322+ { 3, TS, sys_tgkill, "tgkill" }, /* 270 */
323+ { 2, TF, sys_utimes, "utimes" }, /* 271 */
324+ { 5, 0, printargs, "SYS_272" }, /* 272 */
325+ { 5, 0, printargs, "SYS_273" }, /* 273 */
326+ { 5, 0, printargs, "SYS_274" }, /* 274 */
327+ { 5, 0, printargs, "SYS_275" }, /* 275 */
328+ { 5, 0, printargs, "SYS_276" }, /* 276 */
329+ { 4, 0, sys_mq_open, "mq_open" }, /* 277 */
330+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */
331+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */
332+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 280 */
333+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */
334+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */
335+ { 5, 0, printargs, "SYS_283" }, /* 283 */
336+ { 5, 0, printargs, "SYS_284" }, /* 284 */
337+ { 5, 0, printargs, "SYS_285" }, /* 285 */
338+ { 5, 0, printargs, "SYS_286" }, /* 286 */
339+ { 5, 0, printargs, "SYS_287" }, /* 287 */
340+ { 5, 0, printargs, "SYS_288" }, /* 288 */
341+ { 5, 0, printargs, "SYS_289" }, /* 289 */
342+ { 5, 0, printargs, "SYS_290" }, /* 290 */
343+ { 5, 0, printargs, "SYS_291" }, /* 291 */
344+ { 5, 0, printargs, "SYS_292" }, /* 292 */
345+ { 5, 0, printargs, "SYS_293" }, /* 293 */
346+ { 5, 0, printargs, "SYS_294" }, /* 294 */
347+ { 5, 0, printargs, "SYS_295" }, /* 295 */
348+ { 5, 0, printargs, "SYS_296" }, /* 296 */
349+ { 5, 0, printargs, "SYS_297" }, /* 297 */
350+ { 5, 0, printargs, "SYS_298" }, /* 298 */
351+ { 5, 0, printargs, "SYS_299" }, /* 299 */
352+
353+#if SYS_socket_subcall != 300 && !defined X86_64 /* pers1 broken on x86-64 */
354+ #error fix me
355+#endif
356+ { 8, 0, printargs, "socket_subcall"}, /* 300 */
357+ { 3, TN, sys_socket, "socket" }, /* 301 */
358+ { 3, TN, sys_bind, "bind" }, /* 302 */
359+ { 3, TN, sys_connect, "connect" }, /* 303 */
360+ { 2, TN, sys_listen, "listen" }, /* 304 */
361+ { 3, TN, sys_accept, "accept" }, /* 305 */
362+ { 3, TN, sys_getsockname, "getsockname" }, /* 306 */
363+ { 3, TN, sys_getpeername, "getpeername" }, /* 307 */
364+ { 4, TN, sys_socketpair, "socketpair" }, /* 308 */
365+ { 4, TN, sys_send, "send" }, /* 309 */
366+ { 4, TN, sys_recv, "recv" }, /* 310 */
367+ { 6, TN, sys_sendto, "sendto" }, /* 311 */
368+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 312 */
369+ { 2, TN, sys_shutdown, "shutdown" }, /* 313 */
370+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 314 */
371+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 315 */
372+ { 5, TN, sys_sendmsg, "sendmsg" }, /* 316 */
373+ { 5, TN, sys_recvmsg, "recvmsg" }, /* 317 */
374+
375+#if SYS_ipc_subcall != 318 && !defined X86_64 /* pers1 broken on x86-64 */
376+ #error fix me
377+#endif
378+ { 4, 0, printargs, "ipc_subcall" }, /* 318 */
379+ { 4, TI, sys_semop, "semop" }, /* 319 */
380+ { 4, TI, sys_semget, "semget" }, /* 320 */
381+ { 4, TI, sys_semctl, "semctl" }, /* 321 */
382+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 322 */
383+ { 4, 0, printargs, "ipc_subcall" }, /* 323 */
384+ { 4, 0, printargs, "ipc_subcall" }, /* 324 */
385+ { 4, 0, printargs, "ipc_subcall" }, /* 325 */
386+ { 4, 0, printargs, "ipc_subcall" }, /* 326 */
387+ { 4, 0, printargs, "ipc_subcall" }, /* 327 */
388+ { 4, 0, printargs, "ipc_subcall" }, /* 328 */
389+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 329 */
390+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 330 */
391+ { 4, TI, sys_msgget, "msgget" }, /* 331 */
392+ { 4, TI, sys_msgctl, "msgctl" }, /* 332 */
393+ { 4, 0, printargs, "ipc_subcall" }, /* 333 */
394+ { 4, 0, printargs, "ipc_subcall" }, /* 334 */
395+ { 4, 0, printargs, "ipc_subcall" }, /* 335 */
396+ { 4, 0, printargs, "ipc_subcall" }, /* 336 */
397+ { 4, 0, printargs, "ipc_subcall" }, /* 337 */
398+ { 4, 0, printargs, "ipc_subcall" }, /* 338 */
399+ { 4, TI, sys_shmat, "shmat" }, /* 339 */
400+ { 4, TI, sys_shmdt, "shmdt" }, /* 340 */
401+ { 4, TI, sys_shmget, "shmget" }, /* 341 */
402+ { 4, TI, sys_shmctl, "shmctl" }, /* 342 */
diff --git a/openembedded/packages/strace/strace_4.5.12.bb b/openembedded/packages/strace/strace_4.5.12.bb
new file mode 100644
index 0000000000..95a5b7fa9b
--- /dev/null
+++ b/openembedded/packages/strace/strace_4.5.12.bb
@@ -0,0 +1,13 @@
1LICENSE = "GPL"
2SECTION = "console/utils"
3PR = "r0"
4
5DESCRIPTION = "strace is a system call tracing tool."
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
8 file://arm-syscallent.patch;patch=1 \
9 file://quota.patch;patch=1"
10
11inherit autotools
12
13export INCLUDES = "-I. -I./linux"