Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 104 lines (81 sloc) 2.039 kb
6fcace5 @trondn Move to pandora build
trondn authored
1 /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /*
3 * Copyright 2010 NorthScale, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 #ifndef CONFIG_STATIC_H
18 #define CONFIG_STATIC_H 1
19
20 // The intention of this file is to avoid cluttering the code with #ifdefs
1fb2447 @trondn Include <sys/types.h> early in config_static.h
trondn authored
21 #include <sys/types.h>
6fcace5 @trondn Move to pandora build
trondn authored
22
23 #ifdef WIN32
24 // HAVE_CONFIG_H is causing problems with pthreads.h on in32
25 #undef HAVE_CONFIG_H
26
27 #define _WIN32_WINNT 0x0501
28 #include <winsock2.h>
29 #include <ws2tcpip.h>
30
31 struct iovec {
32 size_t iov_len;
33 void* iov_base;
34 };
35
36 #include "win32/win32.h"
37
38 #define EX_USAGE EXIT_FAILURE
39 #define EX_OSERR EXIT_FAILURE
40
41 #else
42 #define initialize_sockets()
43 #endif
44
45 #ifdef HAVE_SYS_SOCKET_H
46 #include <sys/socket.h>
47 #endif
48
49 #ifdef HAVE_NETDB_H
50 #include <netdb.h>
51 #endif
52
53 #ifdef HAVE_ARPA_INET_H
54 #include <arpa/inet.h>
55 #endif
56
57 #ifdef HAVE_PWD_H
58 #include <pwd.h>
59 #endif
60
61 #ifdef HAVE_SYS_MMAN_H
62 #include <sys/mman.h>
63 #endif
64
65 #ifdef HAVE_NETINET_TCP_H
66 #include <netinet/tcp.h>
67 #endif
68
69 #ifdef HAVE_SYSEXITS_H
70 #include <sysexits.h>
71 #endif
72
73 #ifdef HAVE_SYS_UIO_H
74 #include <sys/uio.h>
75 #endif
76
77 #ifdef HAVE_SYS_UN_H
78 #include <sys/un.h>
79 #endif
80
81 #ifdef HAVE_SYS_RESOURCE_H
82 #include <sys/resource.h>
83 #endif
84
85 #ifdef HAVE_NETINET_IN_H
86 #include <netinet/in.h>
87 #endif
88
89 #ifdef HAVE_SYSLOG_H
90 #include <syslog.h>
73e565a @steveyen bug 2030 - default to stderr instead of syslog
steveyen authored
91 #endif
92
93 #ifndef DEFAULT_ERRORLOG
b654665 @trondn Win32 support
trondn authored
94 #define DEFAULT_ERRORLOG ERRORLOG_STDERR
6fcace5 @trondn Move to pandora build
trondn authored
95 #endif
96
855b330 @trondn Use the default automake rule to detect endian
trondn authored
97 #if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN > 1
98 #define ENDIAN_BIG 1
99 #else
100 #define ENDIAN_LITTLE 1
101 #endif
102
6fcace5 @trondn Move to pandora build
trondn authored
103 #endif
Something went wrong with that request. Please try again.