summaryrefslogtreecommitdiffstats
path: root/meta/packages/autoconf/autoconf-2.59/sizeof_types.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/autoconf/autoconf-2.59/sizeof_types.patch')
-rw-r--r--meta/packages/autoconf/autoconf-2.59/sizeof_types.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/packages/autoconf/autoconf-2.59/sizeof_types.patch b/meta/packages/autoconf/autoconf-2.59/sizeof_types.patch
new file mode 100644
index 0000000000..9a6e47453e
--- /dev/null
+++ b/meta/packages/autoconf/autoconf-2.59/sizeof_types.patch
@@ -0,0 +1,59 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- autoconf-2.59/lib/autoconf/types.m4~sizeof_types.patch 2003-05-22 08:05:14.000000000 -0400
7+++ autoconf-2.59/lib/autoconf/types.m4 2004-05-29 01:31:24.828295015 -0400
8@@ -380,32 +380,38 @@
9 # Generic checks. #
10 # ---------------- #
11
12+AC_DEFUN([AC_PROG_SIZE],
13+[
14+ AC_CHECK_TOOL(SIZE, size, :)
15+])
16
17 # AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES])
18 # ---------------------------------------------------------------
19 AC_DEFUN([AC_CHECK_SIZEOF],
20-[AS_LITERAL_IF([$1], [],
21+[AC_REQUIRE([AC_PROG_SIZE])
22+AC_REQUIRE([AC_PROG_AWK])
23+ AS_LITERAL_IF([$1], [],
24 [AC_FATAL([$0: requires literal arguments])])dnl
25 AC_CHECK_TYPE([$1], [], [], [$3])
26 AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]),
27-[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
28- # The cast to unsigned long works around a bug in the HP C Compiler
29- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
30- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
31- # This bug is HP SR number 8606223364.
32- _AC_COMPUTE_INT([(long) (sizeof ($1))],
33- [AS_TR_SH([ac_cv_sizeof_$1])],
34- [AC_INCLUDES_DEFAULT([$3])],
35- [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])])
36+[
37+if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
38+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$3])],
39+ [static const $1 x[[256]];])],
40+ [
41+ AS_TR_SH([ac_cv_sizeof_$1])=`$SIZE conftest.$ac_objext | tail -n 1 | $AWK '{print [$]3/256}'`
42+ ],
43+ [
44+ AS_TR_SH([ac_cv_sizeof_$1])=0
45+ ])
46 else
47 AS_TR_SH([ac_cv_sizeof_$1])=0
48-fi])dnl
49+fi
50+])dnl
51 AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]),
52 [The size of a `$1', as computed by sizeof.])
53 ])# AC_CHECK_SIZEOF
54
55-
56-
57 # ---------------- #
58 # Generic checks. #
59 # ---------------- #