2013-02-19 17:19:16 +08:00
|
|
|
//===-- sanitizer_platform_limits_posix.h ---------------------------------===//
|
2012-12-11 20:27:27 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2013-02-19 17:19:16 +08:00
|
|
|
// This file is a part of Sanitizer common code.
|
2012-12-11 20:27:27 +08:00
|
|
|
//
|
2013-02-19 17:19:16 +08:00
|
|
|
// Sizes and layouts of platform-specific POSIX data structures.
|
2012-12-11 20:27:27 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2013-02-19 17:19:16 +08:00
|
|
|
#ifndef SANITIZER_PLATFORM_LIMITS_POSIX_H
|
|
|
|
#define SANITIZER_PLATFORM_LIMITS_POSIX_H
|
2012-12-11 20:27:27 +08:00
|
|
|
|
2013-02-19 17:19:16 +08:00
|
|
|
namespace __sanitizer {
|
2012-12-11 20:27:27 +08:00
|
|
|
extern unsigned struct_utsname_sz;
|
|
|
|
extern unsigned struct_stat_sz;
|
|
|
|
extern unsigned struct_stat64_sz;
|
2013-02-19 17:19:16 +08:00
|
|
|
extern unsigned struct_rusage_sz;
|
|
|
|
extern unsigned struct_tm_sz;
|
|
|
|
|
|
|
|
#if defined(__linux__)
|
2012-12-11 20:27:27 +08:00
|
|
|
extern unsigned struct_rlimit_sz;
|
|
|
|
extern unsigned struct_dirent_sz;
|
|
|
|
extern unsigned struct_statfs_sz;
|
|
|
|
extern unsigned struct_epoll_event_sz;
|
2013-02-19 17:19:16 +08:00
|
|
|
#endif // __linux__
|
2012-12-11 20:27:27 +08:00
|
|
|
|
2013-02-19 19:06:41 +08:00
|
|
|
#if defined(__linux__) && !defined(__ANDROID__)
|
2013-03-14 21:24:03 +08:00
|
|
|
extern unsigned struct_dirent64_sz;
|
2013-02-19 19:06:41 +08:00
|
|
|
extern unsigned struct_rlimit64_sz;
|
|
|
|
extern unsigned struct_statfs64_sz;
|
|
|
|
#endif // __linux__ && !__ANDROID__
|
|
|
|
|
2013-02-19 17:19:16 +08:00
|
|
|
void* __sanitizer_get_msghdr_iov_iov_base(void* msg, int idx);
|
|
|
|
uptr __sanitizer_get_msghdr_iov_iov_len(void* msg, int idx);
|
|
|
|
uptr __sanitizer_get_msghdr_iovlen(void* msg);
|
|
|
|
uptr __sanitizer_get_socklen_t(void* socklen_ptr);
|
2013-03-13 17:01:40 +08:00
|
|
|
|
|
|
|
// This thing depends on the platform. We are only interested in the upper
|
|
|
|
// limit. Verified with a compiler assert in .cc.
|
|
|
|
const int pthread_attr_t_max_sz = 128;
|
|
|
|
union __sanitizer_pthread_attr_t {
|
2013-03-13 18:20:35 +08:00
|
|
|
char size[pthread_attr_t_max_sz]; // NOLINT
|
2013-03-13 17:01:40 +08:00
|
|
|
void *align;
|
|
|
|
};
|
2013-02-19 17:19:16 +08:00
|
|
|
} // namespace __sanitizer
|
2012-12-11 20:27:27 +08:00
|
|
|
|
|
|
|
#endif
|