mirror of
https://github.com/gperftools/gperftools
synced 2025-01-12 09:39:44 +00:00
dont test HAVE_{STDINT,INTTYPES}_H
Those are fairly standard by now. We already require C++11 or later compiler.
This commit is contained in:
parent
86867674f0
commit
f06ccc6f79
@ -188,7 +188,6 @@ check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H) # for memalign_unittest
|
||||
check_include_file("sys/cdefs.h" HAVE_SYS_CDEFS_H) # Where glibc defines __THROW
|
||||
|
||||
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||
check_include_file("inttypes.h" HAVE_INTTYPES_H)
|
||||
# We also need <ucontext.h>/<sys/ucontext.h>, but we get those from
|
||||
# AC_PC_FROM_UCONTEXT, below.
|
||||
|
||||
|
@ -92,9 +92,6 @@
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
#cmakedefine01 HAVE_GRP_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine01 HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <libunwind.h> header file. */
|
||||
#cmakedefine01 HAVE_LIBUNWIND_H
|
||||
|
||||
@ -138,17 +135,6 @@
|
||||
#cmakedefine01 HAVE_SCHED_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine01 HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#cmakedefine01 HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#cmakedefine01 HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine01 HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if the system has the type `struct mallinfo'. */
|
||||
#cmakedefine01 HAVE_STRUCT_MALLINFO
|
||||
|
||||
|
@ -84,13 +84,8 @@
|
||||
#include "config.h"
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uint16_t (ISO naming madness)
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place uint16_t might be defined
|
||||
#else
|
||||
#include <sys/types.h> // our last best hope
|
||||
#endif
|
||||
|
||||
// This class is thread-unsafe -- that is, instances of this class can
|
||||
// not be accessed concurrently by multiple threads -- because the
|
||||
|
@ -33,21 +33,14 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h> // for memcpy()
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // gets us PRId64, etc
|
||||
#endif
|
||||
|
||||
// To use this in an autoconf setting, make sure you run the following
|
||||
// autoconf macros:
|
||||
// AC_HEADER_STDC /* for stdint_h and inttypes_h */
|
||||
// AC_CHECK_TYPES([__int64]) /* defined in some windows platforms */
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // uint16_t might be here; PRId64 too.
|
||||
#endif
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uint16_t (ISO naming madness)
|
||||
#endif
|
||||
#include <sys/types.h> // our last best hope for uint16_t
|
||||
|
||||
// Standard typedefs
|
||||
|
@ -36,9 +36,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h> // for size_t
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for int32_t
|
||||
#endif
|
||||
#include "base/spinlock.h"
|
||||
#include "base/thread_annotations.h"
|
||||
#include "common.h"
|
||||
|
@ -38,9 +38,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h> // for size_t
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t, uint64_t
|
||||
#endif
|
||||
#include "internal_logging.h" // for ASSERT, etc
|
||||
#include "base/basictypes.h" // for LIKELY, etc
|
||||
|
||||
|
@ -36,9 +36,7 @@
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
// We only need malloc.h for struct mallinfo.
|
||||
#ifdef HAVE_STRUCT_MALLINFO
|
||||
// Malloc can be in several places on older versions of OS X.
|
||||
|
@ -45,9 +45,7 @@
|
||||
# define GLOB_NOMATCH 0
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // for PRIxPTR
|
||||
#endif
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
@ -40,9 +40,7 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h> // for open()
|
||||
#endif
|
||||
|
@ -38,13 +38,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stddef.h> // for size_t
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Utility routines
|
||||
|
@ -35,13 +35,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <string>
|
||||
#include "base/dynamic_annotations.h"
|
||||
#include "base/sysinfo.h" // for FillProcSelfMaps
|
||||
|
@ -37,9 +37,7 @@
|
||||
#include "malloc_hook-inl.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSCALL_H
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
@ -43,9 +43,7 @@
|
||||
#include <inttypes.h> // for PRId64
|
||||
#include <limits.h> // for PATH_MAX
|
||||
#include <stddef.h> // for size_t, NULL
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for int64_t, uintptr_t
|
||||
#endif
|
||||
#include <stdio.h> // for snprintf
|
||||
#include <stdlib.h> // for mkstemp
|
||||
#include <string.h> // for strerror
|
||||
|
@ -102,9 +102,7 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#elif !defined(MAP_FAILED)
|
||||
|
@ -114,9 +114,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h> // for size_t
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t
|
||||
#endif
|
||||
#include "base/basictypes.h"
|
||||
#include "common.h"
|
||||
#include "internal_logging.h"
|
||||
|
@ -32,9 +32,7 @@
|
||||
// Author: Sanjay Ghemawat <opensource@google.com>
|
||||
|
||||
#include <config.h>
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // for PRIuPTR
|
||||
#endif
|
||||
#include <errno.h> // for ENOMEM, errno
|
||||
#include <gperftools/malloc_extension.h> // for MallocRange, etc
|
||||
#include "base/basictypes.h"
|
||||
|
@ -36,9 +36,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stddef.h> // for size_t
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uint64_t, int64_t, uint16_t
|
||||
#endif
|
||||
#include <gperftools/malloc_extension.h>
|
||||
#include "base/basictypes.h"
|
||||
#include "common.h"
|
||||
|
@ -50,13 +50,7 @@
|
||||
|
||||
#include <stddef.h> // for NULL, size_t
|
||||
#include <string.h> // for memset
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "internal_logging.h" // for ASSERT
|
||||
|
||||
// Single-level array
|
||||
|
@ -38,9 +38,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h> // for size_t
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uint64_t, uint32_t, int32_t
|
||||
#endif
|
||||
#include <string.h> // for memcpy
|
||||
#include "base/basictypes.h" // for ASSERT
|
||||
#include "internal_logging.h" // for ASSERT
|
||||
|
@ -37,9 +37,7 @@
|
||||
#define TCMALLOC_STACK_TRACE_TABLE_H_
|
||||
|
||||
#include <config.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t
|
||||
#endif
|
||||
#include "common.h"
|
||||
#include "page_heap_allocator.h"
|
||||
|
||||
|
@ -35,9 +35,7 @@
|
||||
#define TCMALLOC_SYMBOLIZE_H_
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t
|
||||
#endif
|
||||
#include <stddef.h> // for NULL
|
||||
#include <map>
|
||||
|
||||
|
@ -35,13 +35,7 @@
|
||||
#include <errno.h> // for EAGAIN, errno
|
||||
#include <fcntl.h> // for open, O_RDWR
|
||||
#include <stddef.h> // for size_t, NULL, ptrdiff_t
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t, intptr_t
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h> // for munmap, mmap, MADV_DONTNEED, etc
|
||||
#endif
|
||||
|
@ -94,13 +94,7 @@
|
||||
#include <gperftools/tcmalloc.h>
|
||||
|
||||
#include <errno.h> // for ENOMEM, EINVAL, errno
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <stddef.h> // for size_t, NULL
|
||||
#include <stdlib.h> // for getenv
|
||||
#include <string.h> // for strcmp, memset, strlen, etc
|
||||
|
@ -62,11 +62,7 @@
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uint16_t (ISO naming madness)
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place uint16_t might be defined
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h> // errno
|
||||
|
@ -53,9 +53,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h> // defines posix_memalign
|
||||
#include <stdio.h> // for the printf at the end
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uintptr_t
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> // for getpagesize()
|
||||
#endif
|
||||
|
@ -35,11 +35,7 @@
|
||||
#include "config_for_unittests.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get intptr_t
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place intptr_t might be defined
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
#include "base/logging.h"
|
||||
|
@ -33,11 +33,7 @@
|
||||
//
|
||||
// This file contains the unit tests for the ProfileData class.
|
||||
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uintptr_t
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place uintptr_t might be defined
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -38,11 +38,7 @@
|
||||
#include "config_for_unittests.h"
|
||||
#include <stdlib.h> // defines posix_memalign
|
||||
#include <stdio.h> // for the printf at the end
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uintptr_t
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place uintptr_t might be defined
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
@ -36,11 +36,7 @@
|
||||
#include "system-alloc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h> // to get uintptr_t
|
||||
#elif defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h> // another place uintptr_t might be defined
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -69,9 +69,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for intptr_t
|
||||
#endif
|
||||
#include <sys/types.h> // for size_t
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h> // for open; used with mmap-hook test
|
||||
|
@ -36,9 +36,7 @@
|
||||
#include "config_for_unittests.h"
|
||||
#include <stdlib.h> // for NULL, abort()
|
||||
// On FreeBSD, if you #include <sys/resource.h>, you have to get stdint first.
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
@ -39,9 +39,7 @@
|
||||
#include <pthread.h> // for pthread_t, pthread_key_t
|
||||
#endif
|
||||
#include <stddef.h> // for size_t, NULL
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h> // for uint32_t, uint64_t
|
||||
#endif
|
||||
#include <sys/types.h> // for ssize_t
|
||||
#include "base/commandlineflags.h"
|
||||
#include "common.h"
|
||||
|
@ -99,11 +99,6 @@
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
/* #undef HAVE_GRP_H */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <libunwind.h> header file. */
|
||||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
@ -141,18 +136,6 @@
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct mallinfo'. */
|
||||
/* #undef HAVE_STRUCT_MALLINFO */
|
||||
|
||||
|
@ -101,10 +101,6 @@
|
||||
|
||||
/* ----------------------------------- BASIC TYPES */
|
||||
|
||||
#ifndef HAVE_STDINT_H
|
||||
# error Do not know how to set up type aliases. Edit port.h for your system.
|
||||
#endif
|
||||
|
||||
/* I guess MSVC's <types.h> doesn't include ssize_t by default? */
|
||||
#ifdef _MSC_VER
|
||||
typedef intptr_t ssize_t;
|
||||
@ -236,21 +232,6 @@ inline int perftools_vsnprintf(char *str, size_t size, const char *format,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INTTYPES_H
|
||||
#define PRIx64 "I64x"
|
||||
#define SCNx64 "I64x"
|
||||
#define PRId64 "I64d"
|
||||
#define SCNd64 "I64d"
|
||||
#define PRIu64 "I64u"
|
||||
#ifdef _WIN64
|
||||
# define PRIuPTR "llu"
|
||||
# define PRIxPTR "llx"
|
||||
#else
|
||||
# define PRIuPTR "lu"
|
||||
# define PRIxPTR "lx"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ----------------------------------- FILE IO */
|
||||
|
||||
#ifndef PATH_MAX
|
||||
|
Loading…
Reference in New Issue
Block a user