ucommon
config.h
1 // Copyright (C) 2009-2014 David Sugar, Tycho Softworks.
2 //
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public License
14 // along with this program. If not, see <http://www.gnu.org/licenses/>.
15 //
16 // As a special exception, you may use this file as part of a free software
17 // library without restriction. Specifically, if other files instantiate
18 // templates or use macros or inline functions from this file, or you compile
19 // this file and link it with other files to produce an executable, this
20 // file does not by itself cause the resulting executable to be covered by
21 // the GNU General Public License. This exception does not however
22 // invalidate any other reasons why the executable file might be covered by
23 // the GNU General Public License.
24 //
25 // This exception applies only to the code released under the name GNU
26 // Common C++. If you copy code from other releases into a copy of GNU
27 // Common C++, as the General Public License permits, the exception does
28 // not apply to the code that you add in this way. To avoid misleading
29 // anyone as to the status of such modified files, you must delete
30 // this exception notice from them.
31 //
32 // If you write modifications of your own for GNU Common C++, it is your choice
33 // whether to permit this exception to apply to your modifications.
34 // If you do not wish that, delete this exception notice.
35 //
36 
37 #ifndef COMMONCPP_CONFIG_H_
38 #define COMMONCPP_CONFIG_H_
39 
40 #ifndef _UCOMMON_UCOMMON_H_
41 #include <ucommon/ucommon.h>
42 #endif
43 
44 #ifdef __EXPORT
45 #undef __EXPORT
46 #endif
47 
48 #define __EXPORT __SHARED
49 
50 // #include <streambuf>
51 #include <iostream>
52 
53 #define COMMONCPP_HEADERS
54 #define CCXX_NAMESPACES
55 #define COMMONCPP_NAMESPACE ost
56 #define NAMESPACE_COMMONCPP namespace ost {
57 #define TIMEOUT_INF ucommon::Timer::inf
58 
59 #ifdef _UCOMMON_EXTENDED_
60 #define CCXX_EXCEPTIONS
61 #endif
62 
63 #ifdef AF_INET6
64 #define CCXX_IPV6
65 #endif
66 
67 #ifdef AF_INET
68 #define CCXX_IPV4
69 #endif
70 
71 typedef pthread_t cctid_t;
72 typedef int8_t int8;
73 typedef uint8_t uint8;
74 typedef int16_t int16;
75 typedef uint16_t uint16;
76 typedef int32_t int32;
77 typedef uint32_t uint32;
78 typedef int64_t int64;
79 typedef uint64_t uint64;
80 
81 #if !defined(_MSWINDOWS_) && !defined(__QNX__)
82 
89 extern "C" inline int stricmp(const char *string1, const char *string2)
90  {return ucommon::String::case_compare(string1, string2);}
91 
99 extern "C" inline int strnicmp(const char *string1, const char *string2, size_t max)
100  {return ucommon::String::case_compare(string1, string2, max);}
101 
102 #endif
103 
104 
105 
106 #endif
Top level include file for the GNU uCommon C++ core library.
T &() max(T &o1, T &o2)
Convenience function to return max of two objects.
Definition: generics.h:543
static int case_compare(const char *text1, const char *text2)
Depreciated case insensitive string comparison function.
int stricmp(const char *string1, const char *string2)
Convenience function for case insensitive null terminated string compare.
Definition: string.h:1630
int strnicmp(const char *string1, const char *string2, size_t max)
Convenience function for case insensitive null terminated string compare.
Definition: string.h:1640