File: babelconfig.h

package info (click to toggle)
openbabel 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 37,188 kB
  • ctags: 47,193
  • sloc: cpp: 237,858; ansic: 85,555; cs: 22,219; java: 14,377; sh: 9,876; perl: 5,432; python: 4,319; pascal: 793; makefile: 683; xml: 97; ruby: 54
file content (133 lines) | stat: -rw-r--r-- 3,884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef OB_BCONFIG_H
#define OB_BCONFIG_H

//For use with Visual C++ (version 8)
#define HAVE_CONIO_H 1
#define HAVE_CLOCK_T 1
#define HAVE_IOSTREAM	1
#define HAVE_FSTREAM 1
#define HAVE_SSTREAM 1
#define HAVE_SNPRINTF 1
#define HAVE_STRNCASECMP 1
#define HAVE_LIBZ 1 //Compression enabled...
#define DISABLE_WRITE_COMPRESSION 1 //...but not for output

#define BABEL_VERSION  "2.2.0"

#define BABEL_DATADIR "."

//The following are synomyms for various functions
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define strcasestr _strcasestr
#define rindex(a,b) strrchr((a),(b))
#define IsNan _isnan
#define isfinite _finite
#define strdup _strdup


#define TESTDATADIR "../../test/files/"

// A non-const reference may only be bound to an lvalue. VS extension but error in gcc
#pragma warning(3 : 4239)
// Supress warning on deprecated functions
#pragma warning(disable : 4996)
// Supress warning that compiler is ignoring C++ exception specification
#pragma warning( disable : 4290 )
// Supress warning on signed/unsigned comparison with < or > (harmless, but maybe should be fixed)
#pragma warning( disable : 4018 )
// Supress warning on unreferenced formal parameter
#pragma warning( disable : 4100 )

#ifndef __FUNCTION__
#define __FUNCTION__ __FILE__
#endif

//Makes unix input files compatible with VC++6
#define ALL_READS_BINARY

//Do not use newlinebuf. (All varieties of line endings seem to be handled ok anyway)
#define NO_NEWLINEBUF

// Visual Studio Express does not have the classes in namespace std::tr1, particularly
// shared_ptr. Use the Boost library instead. It is necessary to have download Boost
// and put its top level folder in the Include section of Visual Studio's VC++ Directories.
#define USE_BOOST
#define HAVE_SHARED_POINTER
//The following should disable the TR1 version in a Feature Pack  of VC2008PRO,
//so that Boost shared_ptr is still used.
#define _HAS_TR1 0

/* Export of functions and global variables from DLLs
*/

#if defined (SINGLE_DLL) 
  //builds with a single DLL OpenBabel.dll
  // Supress warning on wrong dll-interface
  /*Exporting templated classes and classes with templated member variable
  requires some care. See http://support.microsoft.com/kb/168958*/
  #pragma warning(disable : 4251)
  #define OBAPI __declspec(dllexport)
  #define OBCONV __declspec(dllexport)
  #define OBERROR __declspec(dllexport)
  #define OBCOMMON __declspec(dllexport)
  #define OBFPRT __declspec(dllexport)
  #define EXTERN __declspec(dllexport) extern
#elif defined(USING_DYNAMIC_LIBS)
  //builds with multiple DLLs like OBDLL.dll, OBConv.dll , *.obf
  #pragma warning (disable : 4251) //no dll interface for some templated classes

  #if defined(OBDLL_EXPORTS)
    //OBDLL being built
    #define OBAPI __declspec(dllexport)
    #define EXTERN __declspec(dllexport) extern
  #else
    #define OBAPI __declspec(dllimport)
    #define EXTERN __declspec(dllimport) extern
  #endif

  #ifdef OBCONV_EXPORTS
    #define OBCONV __declspec(dllexport)
  #else
    #define OBCONV __declspec(dllimport)
  #endif

  #if defined(OBFPRT_EXPORTS)
    //OBFPRT being built
    #define OBFPRT __declspec(dllexport)
  #else
    #define OBFPRT __declspec(dllimport)
  #endif

  #if defined(OBDESC_EXPORTS)
    //OBDESC being built
    #define OBDESC __declspec(dllexport)
  #else
    #define OBDESC __declspec(dllimport)
  #endif

#if defined(OBCOMMON_EXPORTS)
   //OBCommonFormats being built
    #define OBCOMMON __declspec(dllexport)
  #else
    #define OBCOMMON __declspec(dllimport)
  #endif

  #if defined(OBERROR_EXPORTS)
    //OBError being built
    #define OBERROR __declspec(dllexport)
  #else
    #define OBERROR __declspec(dllimport)
  #endif
#else
  //builds without DLLs
  #define EXTERN extern
  #define OBAPI
  #define OBCONV
  #define OBERROR
  #define OBCOMMON
  #define OBFPRT

#endif
#endif //OB_BCONFIG_H