summaryrefslogtreecommitdiffstats
path: root/patches/Python-3.1.2/0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
blob: b98bce9e7d2d66baf061609cc87773a9e72bb5fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From ba932c009e8fc45e23efe1dfbc0f179c40af6923 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Fri, 24 Apr 2009 18:44:11 +0200
Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long detection

AC_CHECK_SIZEOF does first detect if the type is available and detects
its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 configure.in |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Index: b/configure.in
===================================================================
--- a/configure.in
+++ b/configure.in
@@ -1398,15 +1398,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
 AC_CHECK_SIZEOF(size_t, 4)
 AC_CHECK_SIZEOF(pid_t, 4)
 
-AC_MSG_CHECKING(for long long support)
-have_long_long=no
-AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
-  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
-  have_long_long=yes
-])
-AC_MSG_RESULT($have_long_long)
-if test "$have_long_long" = yes ; then
-AC_CHECK_SIZEOF(long long, 8)
+AC_CHECK_SIZEOF(long long)
+if test "$ac_cv_type_long_long" = "yes" ; then
+  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
 fi
 
 AC_MSG_CHECKING(for long double support)