SNAP Library 2.4, User Reference  2015-05-11 19:40:56
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
base.h
Go to the documentation of this file.
1 #ifndef base_h
2 #define base_h
3 
5 // Environment defines
6 #if defined (_WIN32)
7  #define GLib_WIN
8  #define GLib_WIN32
9 #elif defined (__WIN64)
10 #define GLib_WIN
11  #define GLib_WIN64
12 #elif defined(__linux__)
13  #define GLib_UNIX
14  #define GLib_LINUX __linux__
15 #elif defined(__sun__)
16  #define GLib_UNIX
17  #define GLib_SOLARIS __sun__
18  // !bn: defined in ctype_iso.h but apears as a parameter in GLib
19  #undef _C
20 #elif defined(__FreeBSD__)
21  #define GLib_UNIX
22  #define GLib_BSD __FreeBSD__
23 #elif defined(__CYGWIN__)
24  #define GLib_UNIX
25  #define GLib_CYGWIN
26 #elif (defined(__APPLE__) && defined(__MACH__))
27  #define GLib_UNIX
28  #define GLib_MACOSX
29 #endif
30 
31 #define _CMPWARN
32 // compiler
33 #if defined (_MSC_VER)
34  #define GLib_MSC _MSC_VER
35 #endif
36 #if defined (__BCPLUSPLUS__)
37  #define GLib_BCB __BCPLUSPLUS__
38 #endif
39 #if defined (__GNUC__)
40  #define GLib_GCC __GNUC__
41 // !bn: to bo not samo dokler ne ugotovim kje so primerjave problematicne
42  #ifdef FLTWARN
43  #undef _CMPWARN
44  #define _CMPWARN __attribute__ ((deprecated))
45  #endif
46 #endif
47 
48 // includes
49 #if defined (GLib_WIN32)
50  #define WIN32_LEAN_AND_MEAN
51  #include <windows.h>
52  #if !defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
53  #include <winsock2.h>
54  #endif
55  #include <oleauto.h>
56  #include <shellapi.h>
57 #endif
58 
59 #if defined(GLib_UNIX)
60  #undef __STDC_LIMIT_MACROS
61  #define __STDC_LIMIT_MACROS
62  #include <stdint.h>
63  #include <stdarg.h>
64  #include <errno.h>
65  #include <fcntl.h>
66  #include <dirent.h>
67  #include <unistd.h>
68  #include <signal.h>
69  #include <sys/poll.h>
70  #include <sys/socket.h>
71  #include <sys/stat.h>
72  #include <sys/time.h>
73  #include <sys/types.h>
74  #include <sys/wait.h>
75  #include <sys/resource.h>
76  #include <netdb.h>
77  #include <arpa/inet.h>
78  #include <netinet/in.h>
79 #endif
80 
81 // word size
82 #if __WORDSIZE == 32 || defined(GLib_WIN32) || defined(__CYGWIN32__)
83  #define GLib_32Bit
84 #elif __WORDSIZE == 64 || defined(GLib_WIN64) || defined(__CYGWIN64__)
85  #define GLib_64Bit
86 #else
87  #error "Undefined word size"
88 #endif
89 
90 #if defined(GLib_UNIX)
91  #ifndef _environ
92  #if defined(GLib_MACOSX)
93  #include <crt_externs.h>
94  #define _environ (*_NSGetEnviron())
95  #elif !defined(GLib_CYGWIN)
96  #define _environ __environ
97  extern int _daylight;
98  #else
99  #define _environ environ
100  #endif
101  #endif
102  #ifndef __stdcall
103  #define __stdcall
104  #endif
105 #endif
106 
107 #if defined(GLib_LINUX)
108  #include <sys/epoll.h>
109 #endif
110 
111 #if defined(GLib_SOLARIS)
112  #include <ieeefp.h>
113 #endif
114 
115 #if defined (__GLIBC__)
116  #define GLib_GLIBC __GLIBC__
117 #endif
118 
119 #if defined (__USE_XOPEN2K)
120  #define GLib_POSIX_1j "1003.1j"
121 #endif
122 
123 #include <ctype.h>
124 #include <float.h>
125 #include <limits.h>
126 #include <math.h>
127 #include <stdio.h>
128 #include <stdlib.h>
129 #include <string.h>
130 #include <time.h>
131 #include <typeinfo>
132 #include <stdexcept>
133 
134 #ifdef GLib_CYGWIN
135  #define timezone _timezone
136 #endif
137 
138 //#ifdef GLib_MACOSX
139 // #undef _POSIX_MONOTONIC_CLOCK
140 //#endif
141 
142 // for Snapworld, switch is defined to include util.h:WriteN()
143 //#if (defined(GLib_UNIX) && !defined(SWIG)) || (defined(SWIG_SW))
144 #if defined(SWIG_SW)
145  #define SW_WRITEN
146 #endif
147 
148 // for backtrace dump in G++, change SW_TRACE to 1
149 #define SW_TRACE 0
150 
151 // for Snap.py, switch 'no abort' is defined and NDEBUG is turned off
152 #if defined(SW_SNAPPY)
153  #define SW_NOABORT
154  #undef NDEBUG
155 #endif
156 
157 #include "bd.h"
158 #include "fl.h"
159 #include "dt.h"
160 #include "ut.h"
161 #include "ds.h"
162 #include "bits.h"
163 #include "hash.h"
164 #include "xml.h"
165 
166 #include "xmath.h"
167 #include "xmlser.h"
168 
169 #include "unicode.h"
170 #include "unicodestring.h"
171 #include "tm.h"
172 #include "shash.h"
173 #include "os.h"
174 
175 #include "env.h"
176 #include "wch.h"
177 #include "xfl.h"
178 
179 #include "blobbs.h"
180 #include "lx.h"
181 #include "url.h"
182 
183 #include "http.h"
184 #include "html.h"
185 #include "md5.h"
186 #include "ss.h"
187 #include "json.h"
188 //#include "prolog.h"
189 
190 #include "zipfl.h"
191 
192 void BaseTralala();
193 
194 #endif
void BaseTralala()
Definition: base.cpp:5