Apache Mesos
config.hpp
Go to the documentation of this file.
1 // Licensed under the Apache License, Version 2.0 (the "License");
2 // you may not use this file except in compliance with the License.
3 // You may obtain a copy of the License at
4 //
5 // http://www.apache.org/licenses/LICENSE-2.0
6 //
7 // Unless required by applicable law or agreed to in writing, software
8 // distributed under the License is distributed on an "AS IS" BASIS,
9 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 // See the License for the specific language governing permissions and
11 // limitations under the License
12 
13 #ifndef __CONFIG_HPP__
14 #define __CONFIG_HPP__
15 
16 #ifdef __sun__
17 #define gethostbyname2(name, _) gethostbyname(name)
18 #ifndef MSG_NOSIGNAL
19 #define MSG_NOSIGNAL 0
20 #endif
21 #ifndef SOL_TCP
22 #define SOL_TCP IPPROTO_TCP
23 #endif
24 #ifndef MAP_32BIT
25 #define MAP_32BIT 0
26 #endif
27 #endif /* __sun__ */
28 
29 #ifdef __APPLE__
30 #ifndef MAP_ANONYMOUS
31 #define MAP_ANONYMOUS MAP_ANON
32 #endif
33 #ifndef MSG_NOSIGNAL
34 #define MSG_NOSIGNAL 0
35 #endif
36 #ifndef SOL_TCP
37 #define SOL_TCP IPPROTO_TCP
38 #endif
39 #ifndef MAP_32BIT
40 #define MAP_32BIT 0
41 #endif
42 #endif /* __APPLE__ */
43 
44 #ifdef __linux__
45 #ifndef MAP_32BIT
46 #define MAP_32BIT 0
47 #endif
48 #endif /* __linux__ */
49 
50 #ifdef __FreeBSD__
51 #ifndef SOL_TCP
52 #define SOL_TCP IPPROTO_TCP
53 #endif
54 #endif /* __FreeBSD__ */
55 
56 #ifdef __WINDOWS__
57 #ifndef SOL_TCP
58 #define SOL_TCP IPPROTO_TCP
59 #endif
60 #endif /* __WINDOWS__ */
61 
62 #endif // __CONFIG_HPP__