gperftools/m4/compiler_characteristics.m4
csilvers a94d5f7974 * Prefer __environ to /proc/self/environ (csilvers)
* Add HEAP_CHECK_MAX_LEAKS envvar (glider)
	* BUGFIX: debugallocation now calls cpp_alloc for new (willchan)
	* BUGFIX: tc_set_new_mode() respected for realloc and calloc (willchan)
	* BUGFIX: fix opt-mode maybe-crash on debugallocation_test (csilvers)
	* Print alloc size when mmap fails (hakon)
	* Add ITIMER_REAL support (csilvers, nabeelmian)
	* BUGFIX: correctly report double-frees (csilvers)
	* Export tc_set_new_mode() from the .h file (willchan)
	* Restructure Symbolize to make it more efficient (glider)
	* PORTING: Augment sysinfo to work on 64-bit OS X (csilvers)
	* Add two numeric pageheap properties to MallocExtension (fikes)
	* PORTING: Use libunwind for i386 when using --omitfp (ppluzhnikov)
	* Add ReleaseToSystem(num_bytes) (kash)
	* Provide correct library filenames under solaris (jeffrey)
	* BUGFIX: simple fix in pprof --raw mode (mrabkin)
	* PORTING: Prefer sys/ucontext.h to fix OS 10.6 builds (csilvers)
	* Improve support for inlined functions in pprof (sanjay)
	* Update wget code to not use keepalive (mrabkin, csilvers)
	* PORTING: correctly handle x86_64 machines that use fp's (csilvers)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@79 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2009-12-02 18:15:13 +00:00

25 lines
1.1 KiB
Plaintext

# Check compiler characteristics (e.g. type sizes, PRIxx macros, ...)
# If types $1 and $2 are compatible, perform action $3
AC_DEFUN([AC_TYPES_COMPATIBLE],
[AC_TRY_COMPILE([#include <stddef.h>], [$1 v1 = 0; $2 v2 = 0; return (&v1 - &v2)], $3)])
define(AC_PRIUS_COMMENT, [printf format code for printing a size_t and ssize_t])
AC_DEFUN([AC_COMPILER_CHARACTERISTICS],
[AC_CACHE_CHECK(AC_PRIUS_COMMENT, ac_cv_formatting_prius_prefix,
[AC_TYPES_COMPATIBLE(unsigned int, size_t,
ac_cv_formatting_prius_prefix=; ac_cv_prius_defined=1)
AC_TYPES_COMPATIBLE(unsigned long, size_t,
ac_cv_formatting_prius_prefix=l; ac_cv_prius_defined=1)
AC_TYPES_COMPATIBLE(unsigned long long, size_t,
ac_cv_formatting_prius_prefix=ll; ac_cv_prius_defined=1
)])
if test -z "$ac_cv_prius_defined"; then
ac_cv_formatting_prius_prefix=z;
fi
AC_DEFINE_UNQUOTED(PRIuS, "${ac_cv_formatting_prius_prefix}u", AC_PRIUS_COMMENT)
AC_DEFINE_UNQUOTED(PRIxS, "${ac_cv_formatting_prius_prefix}x", AC_PRIUS_COMMENT)
AC_DEFINE_UNQUOTED(PRIdS, "${ac_cv_formatting_prius_prefix}d", AC_PRIUS_COMMENT)
])