2014-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.in: Add autoconf test to determine size of uintptr_t. * newlib.hin: Add new autoconf feature variables. * libc/include/inttypes.h: Use new feature variables. * configure: Regenerate.
This commit is contained in:
parent
0f3cacfaa5
commit
85907fe082
|
@ -1,3 +1,10 @@
|
||||||
|
2014-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* configure.in: Add autoconf test to determine size of uintptr_t.
|
||||||
|
* newlib.hin: Add new autoconf feature variables.
|
||||||
|
* libc/include/inttypes.h: Use new feature variables.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2014-11-06 Terry Guo <terry.guo@arm.com>
|
2014-11-06 Terry Guo <terry.guo@arm.com>
|
||||||
|
|
||||||
* libc/stdio/nano-vfprintf_i.c (_printf_i): Use Newlib approach to
|
* libc/stdio/nano-vfprintf_i.c (_printf_i): Use Newlib approach to
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -617,6 +617,47 @@ if test $newlib_cv_ldbl_eq_dbl = yes; then
|
||||||
AC_DEFINE_UNQUOTED(_LDBL_EQ_DBL)
|
AC_DEFINE_UNQUOTED(_LDBL_EQ_DBL)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#### Determine if uintptr_t is unsigned long long
|
||||||
|
AC_CACHE_CHECK(whether uintptr_t equals unsigned long long,
|
||||||
|
newlib_cv_uintptr_eq_ulonglong, [dnl
|
||||||
|
cat > conftest.c <<EOF
|
||||||
|
#include <inttypes.h>
|
||||||
|
extern int foo(uintptr_t);
|
||||||
|
extern int foo(unsigned long long);
|
||||||
|
EOF
|
||||||
|
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
|
||||||
|
1>&AS_MESSAGE_LOG_FD])
|
||||||
|
then
|
||||||
|
newlib_cv_uintptr_eq_ulonglong=yes;
|
||||||
|
else
|
||||||
|
newlib_cv_uintptr_eq_ulonglong=no;
|
||||||
|
fi
|
||||||
|
rm -f conftest*])
|
||||||
|
if test $newlib_cv_uintptr_eq_ulonglong = yes; then
|
||||||
|
AC_DEFINE_UNQUOTED(_UINTPTR_EQ_ULONGLONG)
|
||||||
|
else
|
||||||
|
#### Determine if uintptr_t is unsigned long
|
||||||
|
AC_CACHE_CHECK(whether uintptr_t equals unsigned long,
|
||||||
|
newlib_cv_uintptr_eq_ulong, [dnl
|
||||||
|
cat > conftest.c <<EOF
|
||||||
|
#include <inttypes.h>
|
||||||
|
extern int foo(uintptr_t);
|
||||||
|
extern int foo(unsigned long);
|
||||||
|
EOF
|
||||||
|
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
|
||||||
|
1>&AS_MESSAGE_LOG_FD])
|
||||||
|
then
|
||||||
|
newlib_cv_uintptr_eq_ulong=yes;
|
||||||
|
else
|
||||||
|
newlib_cv_uintptr_eq_ulong=no;
|
||||||
|
fi
|
||||||
|
rm -f conftest*])
|
||||||
|
if test $newlib_cv_uintptr_eq_ulong = yes; then
|
||||||
|
AC_DEFINE_UNQUOTED(_UINTPTR_EQ_ULONG)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile],
|
AC_CONFIG_FILES([Makefile],
|
||||||
|
|
|
@ -243,15 +243,15 @@
|
||||||
#define SCNxMAX __SCNMAX(x)
|
#define SCNxMAX __SCNMAX(x)
|
||||||
|
|
||||||
/* ptr types */
|
/* ptr types */
|
||||||
#if PTRDIFF_MAX <= __STDINT_EXP(INT_MAX)
|
#if defined(_UINTPTR_EQ_ULONGLONG)
|
||||||
# define __PRIPTR(x) __STRINGIFY(x)
|
# define __PRIPTR(x) __STRINGIFY(ll##x)
|
||||||
# define __SCNPTR(x) __STRINGIFY(x)
|
# define __SCNPTR(x) __STRINGIFY(ll##x)
|
||||||
#elif PTRDIFF_MAX <= __STDINT_EXP(LONG_MAX) || !defined(__have_longlong64)
|
#elif defined(_UINTPTR_EQ_ULONG)
|
||||||
# define __PRIPTR(x) __STRINGIFY(l##x)
|
# define __PRIPTR(x) __STRINGIFY(l##x)
|
||||||
# define __SCNPTR(x) __STRINGIFY(l##x)
|
# define __SCNPTR(x) __STRINGIFY(l##x)
|
||||||
#else
|
#else
|
||||||
# define __PRIPTR(x) __STRINGIFY(ll##x)
|
# define __PRIPTR(x) __STRINGIFY(x)
|
||||||
# define __SCNPTR(x) __STRINGIFY(ll##x)
|
# define __SCNPTR(x) __STRINGIFY(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PRIdPTR __PRIPTR(d)
|
#define PRIdPTR __PRIPTR(d)
|
||||||
|
|
|
@ -61,6 +61,12 @@
|
||||||
/* True if long double supported and it is equal to double. */
|
/* True if long double supported and it is equal to double. */
|
||||||
#undef _LDBL_EQ_DBL
|
#undef _LDBL_EQ_DBL
|
||||||
|
|
||||||
|
/* Define if uintptr_t is unsigned long on this architecture */
|
||||||
|
#undef _UINTPTR_EQ_ULONG
|
||||||
|
|
||||||
|
/* Define if uintptr_t is unsigned long long on this architecture */
|
||||||
|
#undef _UINTPTR_EQ_ULONGLONG
|
||||||
|
|
||||||
/* Define if ivo supported in streamio. */
|
/* Define if ivo supported in streamio. */
|
||||||
#undef _FVWRITE_IN_STREAMIO
|
#undef _FVWRITE_IN_STREAMIO
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue