-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathconfig.cmake.h.in
79 lines (66 loc) · 1.86 KB
/
config.cmake.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#pragma once
#cmakedefine HAVE_NETINET_IN_H ${HAVE_NETINET_IN_H}
#cmakedefine HAVE_ARPA_INET_H ${HAVE_ARPA_INET_H}
#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H}
#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
#cmakedefine HAVE_FDATASYNC ${HAVE_FDATASYNC}
#cmakedefine HAVE_QSORT_R ${HAVE_QSORT_R}
/* Large File Support */
#define _LARGE_FILE 1
#ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
#elif (_FILE_OFFSET_BITS != 64)
#error "bad things"
#endif
#define _LARGEFILE_SOURCE 1
#ifndef O_LARGEFILE
# define O_LARGEFILE 0
#endif
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef __APPLE__
/* autoconf things OS X has fdatasync but it doesn't */
#define fdatasync(FD) fsync(FD)
#endif /* __APPLE__ */
#ifdef linux
#undef ntohs
#undef ntohl
#undef htons
#undef htonl
#endif
#if defined(WIN32) || defined(_WIN32)
#define WINDOWS
/* Mute:
* "The POSIX name for this item is deprecated. Instead, use the ISO
* C++ conformant name: _strdup."
*/
#pragma warning(disable: 4996)
/* we need ntohl with friends (included through arpa/inet.h for *nix */
#include <Winsock2.h>
#endif
// Sanitizer annotations
#if defined(__has_attribute)
# if __has_attribute(no_sanitize_undefined)
// GCC only supports the top-level "no_sanitize_undefined"; so have to
// turn off all UBSan checks just to disable vptr checks :(
# define NO_SANITIZE_VPTR __attribute__((no_sanitize_undefined))
# elif __has_attribute(no_sanitize)
// Can turn off the specific vptr sanitizer.
# define NO_SANITIZE_VPTR __attribute__((no_sanitize("vptr")))
# endif
#endif
#if !defined(NO_SANITIZE_VPTR)
# define NO_SANITIZE_VPTR
#endif