re PR lto/40790 (plugin-api.h unconditionally includes stdint.h)

include/
2009-10-09  Rafael Avila de Espindola  <espindola@google.com>

	PR40790
	* plugin-api.h: Don't include stdint.h unconditionally.

lto-plugin/
2009-10-09  Rafael Avila de Espindola  <espindola@google.com>

	PR40790
	* configure: Regenerate.
	* configure.ac: Add AC_TYPE_UINT64_T.

From-SVN: r152976
This commit is contained in:
Rafael Espindola 2009-10-19 15:11:35 +00:00
parent d23a77342c
commit 21750c78c4
3 changed files with 89 additions and 14 deletions

View File

@ -26,8 +26,16 @@
#ifndef PLUGIN_API_H
#define PLUGIN_API_H
#ifdef HAVE_STDINT_H
#include <stdint.h>
#elif defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
#include <sys/types.h>
#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \
!defined(UINT64_MAX) && !defined(uint64_t)
#error can not find uint64_t type
#endif
#ifdef __cplusplus
extern "C"

94
lto-plugin/configure vendored
View File

@ -1864,6 +1864,58 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_func
# ac_fn_c_find_uintX_t LINENO BITS VAR
# ------------------------------------
# Finds an unsigned integer type with width BITS, setting cache variable VAR
# accordingly.
ac_fn_c_find_uintX_t ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
$as_echo_n "checking for uint$2_t... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
'unsigned long long int' 'unsigned short int' 'unsigned char'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
test_array [0] = 0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
case $ac_type in #(
uint$2_t) :
eval "$3=yes" ;; #(
*) :
eval "$3=\$ac_type" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eval as_val=\$$3
if test "x$as_val" = x""no; then :
else
break
fi
done
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_find_uintX_t
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@ -4400,13 +4452,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:4403: $ac_compile\"" >&5)
(eval echo "\"\$as_me:4455: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:4406: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:4458: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:4409: output\"" >&5)
(eval echo "\"\$as_me:4461: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@ -5612,7 +5664,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5615 "configure"' > conftest.$ac_ext
echo '#line 5667 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -7142,11 +7194,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7145: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7197: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7149: \$? = $ac_status" >&5
echo "$as_me:7201: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7481,11 +7533,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7484: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7536: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7488: \$? = $ac_status" >&5
echo "$as_me:7540: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7586,11 +7638,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7589: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7641: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7593: \$? = $ac_status" >&5
echo "$as_me:7645: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -7641,11 +7693,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7644: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7696: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7648: \$? = $ac_status" >&5
echo "$as_me:7700: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -10023,7 +10075,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10026 "configure"
#line 10078 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10119,7 +10171,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10122 "configure"
#line 10174 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10347,6 +10399,20 @@ CC="$lt_save_CC"
ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
case $ac_cv_c_uint64_t in #(
no|yes) ;; #(
*)
$as_echo "#define _UINT64_T 1" >>confdefs.h
cat >>confdefs.h <<_ACEOF
#define uint64_t $ac_cv_c_uint64_t
_ACEOF
;;
esac
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF

View File

@ -7,6 +7,7 @@ AC_ARG_VAR(LIBELFLIBS,[How to link libelf])
AC_ARG_VAR(LIBELFINC,[How to find libelf include files])
AM_PROG_LIBTOOL
AC_SUBST(target_noncanonical)
AC_TYPE_UINT64_T
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
AC_SYS_LARGEFILE