xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/db/db/sequence-type.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1configure wants to use host-specific types to get a 64-bit integer in db.h
2instead of using an alias such as int64_t.  This means that the header differs
3in multilib environments for no good reason, so replace the type with the alias
4in stdint.h.
5
6This then breaks the overly complicated type check but as we know that int64_t
7exists and works, we can just delete that.
8
9Upstream-Status: Inappropriate [as far as open source community is concerned, upstream is dead]
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12--- a/dist/aclocal/sequence.m4~	2013-09-09 16:35:02.000000000 +0100
13+++ b/dist/aclocal/sequence.m4	2017-11-01 13:21:45.472295971 +0000
14@@ -24 +24 @@
15-		db_cv_seq_type="long"
16+		db_cv_seq_type="int64_t"
17@@ -31 +31 @@
18-		db_cv_seq_type="long long"
19+		db_cv_seq_type="int64_t"
20@@ -41,38 +41 @@
21-	# Test to see if we can declare variables of the appropriate size
22-	# and format them.  If we're cross-compiling, all we get is a link
23-	# test, which won't test for the appropriate printf format strings.
24-	if test "$db_cv_build_sequence" = "yes"; then
25-		AC_TRY_RUN([
26-		main() {
27-			$db_cv_seq_type l;
28-			unsigned $db_cv_seq_type u;
29-			char buf@<:@100@:>@;
30-
31-			buf@<:@0@:>@ = 'a';
32-			l = 9223372036854775807LL;
33-			(void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
34-			if (strcmp(buf, "9223372036854775807"))
35-				return (1);
36-			u = 18446744073709551615ULL;
37-			(void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
38-			if (strcmp(buf, "18446744073709551615"))
39-				return (1);
40-			return (0);
41-		}],, [db_cv_build_sequence="no"],
42-		AC_TRY_LINK(,[
43-			$db_cv_seq_type l;
44-			unsigned $db_cv_seq_type u;
45-			char buf@<:@100@:>@;
46-
47-			buf@<:@0@:>@ = 'a';
48-			l = 9223372036854775807LL;
49-			(void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
50-			if (strcmp(buf, "9223372036854775807"))
51-				return (1);
52-			u = 18446744073709551615ULL;
53-			(void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
54-			if (strcmp(buf, "18446744073709551615"))
55-				return (1);
56-			return (0);
57-		],, [db_cv_build_sequence="no"]))
58-	fi
59+	db_cv_build_sequence="yes"
60