SNAP Library, User Reference  2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
base.h
Go to the documentation of this file.
00001 #ifndef base_h
00002 #define base_h
00003 
00005 // Environment defines
00006 #if defined (_WIN32)
00007   #define GLib_WIN
00008   #define GLib_WIN32
00009 #elif defined (__WIN64)
00010 #define GLib_WIN
00011   #define GLib_WIN64
00012 #elif defined(__linux__)
00013   #define GLib_UNIX
00014   #define GLib_LINUX __linux__
00015 #elif defined(__sun__)
00016   #define GLib_UNIX
00017   #define GLib_SOLARIS __sun__
00018   // !bn: defined in ctype_iso.h but apears as a parameter in GLib
00019   #undef _C
00020 #elif defined(__FreeBSD__)
00021   #define GLib_UNIX
00022   #define GLib_BSD __FreeBSD__
00023 #elif defined(__CYGWIN__)
00024   #define GLib_UNIX
00025   #define GLib_CYGWIN
00026 #elif (defined(__APPLE__) && defined(__MACH__))
00027   #define GLib_UNIX
00028   #define GLib_MACOSX
00029 #endif
00030 
00031 #define _CMPWARN
00032 // compiler
00033 #if defined (_MSC_VER)
00034   #define GLib_MSC _MSC_VER
00035 #endif
00036 #if defined (__BCPLUSPLUS__)
00037   #define GLib_BCB __BCPLUSPLUS__
00038 #endif
00039 #if defined (__GNUC__)
00040   #define GLib_GCC __GNUC__
00041 // !bn: to bo not samo dokler ne ugotovim kje so primerjave problematicne
00042   #ifdef FLTWARN
00043     #undef _CMPWARN
00044     #define _CMPWARN __attribute__ ((deprecated))
00045   #endif
00046 #endif
00047 
00048 // includes
00049 #if defined (GLib_WIN32)
00050   #define WIN32_LEAN_AND_MEAN
00051   #include <windows.h>
00052   #if !defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
00053     #include <winsock2.h>
00054   #endif
00055   #include <oleauto.h>
00056   #include <shellapi.h>
00057 #endif
00058 
00059 #if defined(GLib_UNIX)
00060   #define __STDC_LIMIT_MACROS
00061   #include <stdint.h>
00062   #include <stdarg.h>
00063   #include <errno.h>
00064   #include <fcntl.h>
00065   #include <dirent.h>
00066   #include <unistd.h>
00067   #include <signal.h>
00068   #include <sys/poll.h>
00069   #include <sys/socket.h>
00070   #include <sys/stat.h>
00071   #include <sys/time.h>
00072   #include <sys/types.h>
00073   #include <sys/wait.h>
00074   #include <sys/resource.h>
00075   #include <netdb.h>
00076   #include <arpa/inet.h>
00077   #include <netinet/in.h>
00078 #endif
00079 
00080 // word size
00081 #if __WORDSIZE == 32 || defined(GLib_WIN32) || defined(__CYGWIN32__)
00082   #define GLib_32Bit
00083 #elif __WORDSIZE == 64 || defined(GLib_WIN64) || defined(__CYGWIN64__)
00084   #define GLib_64Bit
00085 #else
00086   #error "Undefined word size"
00087 #endif
00088 
00089 #if defined(GLib_UNIX)
00090   #ifndef _environ
00091     #if defined(GLib_MACOSX)
00092      #include <crt_externs.h>
00093      #define _environ (*_NSGetEnviron())
00094     #elif !defined(GLib_CYGWIN)
00095      #define _environ __environ
00096      extern int _daylight;
00097     #else
00098      #define _environ environ
00099     #endif
00100   #endif
00101   #ifndef __stdcall
00102     #define __stdcall
00103   #endif
00104 #endif
00105 
00106 #if defined(GLib_LINUX)
00107   #include <sys/epoll.h>
00108 #endif
00109 
00110 #if defined(GLib_SOLARIS)
00111   #include <ieeefp.h>
00112 #endif
00113 
00114 #if defined (__GLIBC__)
00115   #define GLib_GLIBC __GLIBC__
00116 #endif
00117 
00118 #if defined (__USE_XOPEN2K)
00119   #define GLib_POSIX_1j "1003.1j"
00120 #endif
00121 
00122 #include <ctype.h>
00123 #include <float.h>
00124 #include <limits.h>
00125 #include <math.h>
00126 #include <stdio.h>
00127 #include <stdlib.h>
00128 #include <string.h>
00129 #include <time.h>
00130 #include <typeinfo>
00131 #include <stdexcept>
00132 
00133 #ifdef GLib_CYGWIN
00134   #define timezone _timezone
00135 #endif
00136 
00137 //#ifdef GLib_MACOSX
00138 //  #undef _POSIX_MONOTONIC_CLOCK
00139 //#endif
00140 
00141 #include "bd.h"
00142 #include "fl.h"
00143 #include "dt.h"
00144 #include "ut.h"
00145 #include "ds.h"
00146 #include "bits.h"
00147 #include "hash.h"
00148 #include "xml.h"
00149 
00150 #include "xmath.h"
00151 #include "xmlser.h"
00152 
00153 #include "unicode.h"
00154 #include "unicodestring.h"
00155 #include "tm.h"
00156 #include "shash.h"
00157 #include "os.h"
00158 #include "console.h"
00159 
00160 #include "app.h"
00161 #include "env.h"
00162 #include "wch.h"
00163 #include "xdt.h"
00164 #include "xfl.h"
00165 
00166 #include "blobbs.h"
00167 #include "fds.h"
00168 #include "lx.h"
00169 #include "macro.h"
00170 #include "pp.h"
00171 #include "url.h"
00172 
00173 #include "exp.h"
00174 #include "http.h"
00175 #include "html.h"
00176 #include "md5.h"
00177 #include "ss.h"
00178 #include "json.h"
00179 //#include "prolog.h"
00180 
00181 #include "zipfl.h"
00182 
00183 void BaseTralala();
00184 
00185 #endif