xref: /curl/CMake/Platforms/WindowsCache.cmake (revision 8b76a8ae)
1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24if(NOT WIN32)
25  message(FATAL_ERROR "This file should be included on Windows platform only")
26endif()
27
28set(HAVE_LOCALE_H 1)
29
30if(MINGW)
31  set(HAVE_SNPRINTF 1)
32  set(HAVE_UNISTD_H 1)
33  set(HAVE_LIBGEN_H 1)
34  set(HAVE_STDDEF_H 1)  # detected by CMake internally in check_type_size()
35  set(HAVE_STDBOOL_H 1)
36  set(HAVE_BOOL_T "${HAVE_STDBOOL_H}")
37  set(HAVE_STRTOLL 1)
38  set(HAVE_BASENAME 1)
39  set(HAVE_STRCASECMP 1)
40  set(HAVE_FTRUNCATE 1)
41  set(HAVE_SYS_PARAM_H 1)
42  set(HAVE_SYS_TIME_H 1)
43  set(HAVE_GETTIMEOFDAY 1)
44  set(HAVE_STRINGS_H 1)  # wrapper to string.h
45  set(HAVE_UTIME_H 1)  # wrapper to sys/utime.h
46  set(HAVE_DIRENT_H 1)
47  set(HAVE_OPENDIR 1)
48else()
49  set(HAVE_LIBGEN_H 0)
50  set(HAVE_STRCASECMP 0)
51  set(HAVE_FTRUNCATE 0)
52  set(HAVE_SYS_PARAM_H 0)
53  set(HAVE_SYS_TIME_H 0)
54  set(HAVE_GETTIMEOFDAY 0)
55  set(HAVE_STRINGS_H 0)
56  set(HAVE_UTIME_H 0)
57  set(HAVE_DIRENT_H 0)
58  set(HAVE_OPENDIR 0)
59  if(MSVC)
60    set(HAVE_UNISTD_H 0)
61    set(HAVE_LOCALE_H 1)
62    set(HAVE_STDDEF_H 1)  # detected by CMake internally in check_type_size()
63    set(HAVE_STDATOMIC_H 0)
64    if(NOT MSVC_VERSION LESS 1800)
65      set(HAVE_STDBOOL_H 1)
66      set(HAVE_STRTOLL 1)
67    else()
68      set(HAVE_STDBOOL_H 0)
69      set(HAVE_STRTOLL 0)
70    endif()
71    set(HAVE_BOOL_T "${HAVE_STDBOOL_H}")
72    if(NOT MSVC_VERSION LESS 1900)
73      set(HAVE_SNPRINTF 1)
74    else()
75      set(HAVE_SNPRINTF 0)
76    endif()
77    set(HAVE_BASENAME 0)
78    set(HAVE_STRTOK_R 0)
79    set(HAVE_FILE_OFFSET_BITS 0)
80    set(HAVE_ATOMIC 0)
81  endif()
82endif()
83
84# Available in Windows XP and newer
85set(HAVE_GETADDRINFO 1)
86set(HAVE_FREEADDRINFO 1)
87
88set(HAVE_FCHMOD 0)
89set(HAVE_SOCKETPAIR 0)
90set(HAVE_SENDMSG 0)
91set(HAVE_SENDMMSG 0)
92set(HAVE_ALARM 0)
93set(HAVE_FCNTL 0)
94set(HAVE_GETPPID 0)
95set(HAVE_UTIMES 0)
96set(HAVE_GETPWUID_R 0)
97set(HAVE_STRERROR_R 0)
98set(HAVE_SIGINTERRUPT 0)
99set(HAVE_PIPE 0)
100set(HAVE_EVENTFD 0)
101set(HAVE_IF_NAMETOINDEX 0)
102set(HAVE_GETRLIMIT 0)
103set(HAVE_SETRLIMIT 0)
104set(HAVE_FSETXATTR 0)
105set(HAVE_SETLOCALE 1)
106set(HAVE_SETMODE 1)
107set(HAVE__SETMODE 1)
108set(HAVE_GETPEERNAME 1)
109set(HAVE_GETSOCKNAME 1)
110set(HAVE_GETHOSTNAME 1)
111
112set(HAVE_RECV 1)
113set(HAVE_SEND 1)
114set(HAVE_STROPTS_H 0)
115set(HAVE_SYS_XATTR_H 0)
116set(HAVE_ARC4RANDOM 0)
117set(HAVE_FNMATCH 0)
118set(HAVE_SCHED_YIELD 0)
119set(HAVE_ARPA_INET_H 0)
120set(HAVE_FCNTL_H 1)
121set(HAVE_IFADDRS_H 0)
122set(HAVE_IO_H 1)
123set(HAVE_NETDB_H 0)
124set(HAVE_NETINET_IN_H 0)
125set(HAVE_NETINET_IN6_H 0)
126set(HAVE_NETINET_TCP_H 0)
127set(HAVE_NETINET_UDP_H 0)
128set(HAVE_NET_IF_H 0)
129set(HAVE_IOCTL_SIOCGIFADDR 0)
130set(HAVE_POLL_H 0)
131set(HAVE_POLL 0)
132set(HAVE_PWD_H 0)
133set(HAVE_SYS_EVENTFD_H 0)
134set(HAVE_SYS_FILIO_H 0)
135set(HAVE_SYS_WAIT_H 0)
136set(HAVE_SYS_IOCTL_H 0)
137set(HAVE_SYS_POLL_H 0)
138set(HAVE_SYS_RESOURCE_H 0)
139set(HAVE_SYS_SELECT_H 0)
140set(HAVE_SYS_SOCKET_H 0)
141set(HAVE_SYS_SOCKIO_H 0)
142set(HAVE_SYS_STAT_H 1)
143set(HAVE_SYS_TYPES_H 1)
144set(HAVE_SYS_UN_H 0)
145set(HAVE_SYS_UTIME_H 1)
146set(HAVE_TERMIOS_H 0)
147set(HAVE_TERMIO_H 0)
148set(HAVE_LINUX_TCP_H 0)
149
150set(HAVE_FSEEKO 0)  # mingw-w64 2.0.0 and newer has it
151set(HAVE_SOCKET 1)
152set(HAVE_SELECT 1)
153set(HAVE_STRDUP 1)
154set(HAVE_STRICMP 1)
155set(HAVE_STRCMPI 1)
156set(HAVE_MEMRCHR 0)
157set(HAVE_CLOSESOCKET 1)
158set(HAVE_SIGSETJMP 0)
159set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1)
160set(HAVE_GETPASS_R 0)
161set(HAVE_GETPWUID 0)
162set(HAVE_GETEUID 0)
163set(HAVE_UTIME 1)
164set(HAVE_GMTIME_R 0)
165set(HAVE_GETHOSTBYNAME_R 0)
166set(HAVE_SIGNAL 1)
167set(HAVE_SIGACTION 0)
168set(HAVE_GLIBC_STRERROR_R 0)
169set(HAVE_GETIFADDRS 0)
170set(HAVE_FCNTL_O_NONBLOCK 0)
171set(HAVE_IOCTLSOCKET 1)
172set(HAVE_IOCTLSOCKET_CAMEL 0)
173set(HAVE_IOCTLSOCKET_CAMEL_FIONBIO 0)
174set(HAVE_IOCTLSOCKET_FIONBIO 1)
175set(HAVE_IOCTL_FIONBIO 0)
176set(HAVE_SETSOCKOPT_SO_NONBLOCK 0)
177set(HAVE_POSIX_STRERROR_R 0)
178set(HAVE_MSG_NOSIGNAL 0)
179set(HAVE_STRUCT_TIMEVAL 1)
180set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
181
182set(HAVE_GETHOSTBYNAME_R_3 0)
183set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
184set(HAVE_GETHOSTBYNAME_R_5 0)
185set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
186set(HAVE_GETHOSTBYNAME_R_6 0)
187set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
188
189set(HAVE_O_NONBLOCK 0)
190set(HAVE_IN_ADDR_T 0)
191set(STDC_HEADERS 1)
192
193set(HAVE_SIZEOF_SUSECONDS_T 0)
194set(HAVE_SIZEOF_SA_FAMILY_T 0)
195