blob: 9e6e7b61c2f28b4625597fe93381c75e396af48e [file] [log] [blame]
Alexandre Lisionddd731e2014-01-31 11:50:08 -05001#ifndef COMMONCPP_CONFIG_H_
2#define COMMONCPP_CONFIG_H_
3
4#ifndef _UCOMMON_UCOMMON_H_
5#include <ucommon/ucommon.h>
6#endif
7
8#ifdef __EXPORT
9#undef __EXPORT
10#endif
11
12#define __EXPORT __SHARED
13
14// #include <streambuf>
15#include <iostream>
16
17#define COMMONCPP_HEADERS
18#define CCXX_NAMESPACES
19#define COMMONCPP_NAMESPACE ost
20#define NAMESPACE_COMMONCPP namespace ost {
21#define TIMEOUT_INF ucommon::Timer::inf
22
23#ifdef _UCOMMON_EXTENDED_
24#define CCXX_EXCEPTIONS
25#endif
26
27#ifdef AF_INET6
28#define CCXX_IPV6
29#endif
30
31#ifdef AF_INET
32#define CCXX_IPV4
33#endif
34
35typedef pthread_t cctid_t;
36typedef int8_t int8;
37typedef uint8_t uint8;
38typedef int16_t int16;
39typedef uint16_t uint16;
40typedef int32_t int32;
41typedef uint32_t uint32;
42typedef int64_t int64;
43typedef uint64_t uint64;
44
45#if !defined(_MSWINDOWS_) && !defined(__QNX__)
46
47/**
48 * Convenience function for case insensitive null terminated string compare.
49 * @param string1 to compare.
50 * @param string2 to compare.
51 * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
52 */
53extern "C" inline int stricmp(const char *string1, const char *string2)
54 {return ucommon::String::case_compare(string1, string2);}
55
56/**
57 * Convenience function for case insensitive null terminated string compare.
58 * @param string1 to compare.
59 * @param string2 to compare.
60 * @param max size of string to compare.
61 * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
62 */
63extern "C" inline int strnicmp(const char *string1, const char *string2, size_t max)
64 {return ucommon::String::case_compare(string1, string2, max);}
65
66#endif
67
68
69
70#endif