From: Eric Bollengier Date: Wed, 21 Jan 2009 13:12:21 +0000 (+0000) Subject: ebl Add detection of intptr_t and uintptr_t to configure process X-Git-Tag: Release-7.0.0~3438 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef5a7d8d6a3879d07b3e1988291109e6d7766924;p=bacula%2Fbacula ebl Add detection of intptr_t and uintptr_t to configure process git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8391 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index a78a5e39d3..1b549320ca 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -21,6 +21,12 @@ /* Define to `int' if doesn't define. */ #undef ssize_t +/* Typedef to intxx if doesn't declare. */ +#undef HAVE_INTPTR_T + +/* Typedef to uintxx if doesn't declare. */ +#undef HAVE_UINTPTR_T + /* Define if you want to use PostgreSQL */ #undef HAVE_POSTGRESQL diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index ed39ba5313..14857a46a4 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1862,6 +1862,7 @@ AC_TYPE_SIZE_T AC_TYPE_PID_T AC_TYPE_OFF_T AC_TYPE_INTPTR_T +AC_TYPE_UINTPTR_T AC_CHECK_TYPE(ino_t, unsigned long) AC_CHECK_TYPE(dev_t, unsigned long) AC_CHECK_TYPE(daddr_t, long) diff --git a/bacula/configure b/bacula/configure index df62b8dd46..135fccb22c 100755 --- a/bacula/configure +++ b/bacula/configure @@ -33586,6 +33586,122 @@ else sed 's/^/| /' conftest.$ac_ext >&5 +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + + { echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +if test "${ac_cv_type_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintptr_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +if test $ac_cv_type_uintptr_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 19ae84519f..8bcdfa561b 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -10,6 +10,8 @@ filepattern (restore with regex in bsr) mixed priorities General: +21Jan09 +ebl Add detection of intptr_t and uintptr_t to configure process 20Jan09 ebl Change some cast to use intptr_t instead of long 18Jan09