EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
ToolsConfig.h
1 // -*- c++ -*-
2 // $Id: ToolsConfig.h,v 1.9 2006/01/19 15:37:12 kasemir Exp $
3 //
4 // Please refer to NOTICE.txt,
5 // included as part of this distribution,
6 // for legal information.
7 //
8 // kasemir@lanl.gov
9 //
10 // Basic configuration for the "Tools" in this directory,
11 // also included by ChannelArchiver sources.
12 //
13 // When I could not see a neat way to hide differences
14 // in operating systems or compilers,
15 // hacks based on #ifdef are used for these symbols:
16 // (very unclear what's defined. Try to use -D$(HOST_ARCH))
17 // WIN32, Linux, solaris, HP_UX
18 
19 // Namespaces:
20 // After great problems with doing so initially,
21 // these sources try to avoid namespaces.
22 // But they use some of the STL/standard C++ library features.
23 // In principle, these should be found in the std:: namespace.
24 //
25 // Visual C++ behaves that way, requiring std:: namespace usage.
26 // GNU g++ does not require std::, even ignores the std:: namespace,
27 // for GNU it does not hurt to include the std::
28 // If your compiler prohibits the use of std::, you will
29 // get compilation errors.
30 // --------------------------------------------------------
31 
32 // Conversions
33 //
34 // Little-Endian Architectures require conversions
35 // because the binary archive stores all data
36 // in the big-endian (aka network or Motorola) format.
37 // CONVERSION_REQUIRED is required on:
38 // Intel PCs (WIN32, Linux, OpenBSD, ...)
39 // It is usually not required on Sun Solaris machines.
40 //
41 // Note: The archiver assumes IEEE Floats
42 // It won't work on VAX/VMS systems!
43 #define CONVERSION_REQUIRED
44 
45 // This seems to work for Mac OS X
46 #if defined(__POWERPC__) && defined(__APPLE__)
47 #undef CONVERSION_REQUIRED
48 #endif
49 
50 #if defined(HP_UX)
51 #undef CONVERSION_REQUIRED
52 #endif
53 
54 // C++ Tweaks
55 // ----------------------------------------------------------
56 
57 // Support for standard C++ library
58 // #include <stdString.h>
59 #define stdString std::string
60 #include <string>
61 
62 // On RedHat9 and R3.14.4, there's a conflict
63 // between /usr/include/assert.h and epicsAssert.h.
64 // We don't use any assert, to remove it:
65 #undef assert
66 
67 // std::list or look-a-like:
68 #define stdList std::list
69 #include <list>
70 
71 // std::vector or look-a-like:
72 #define stdVector std::vector
73 #include <vector>
74 
75 // std::map or look-a-like:
76 #define stdMap std::map
77 #include <map>
78 
79 // Is socklen_t defined?
80 // On e.g. RedHat7.0, the socket calls use socklen_t,
81 // while older systems don't have it.
82 // Win32 does not define socklen_t.
83 // At least Solaris8 and HP-UX11 also have socklen_t (T. Birke 10-19-2001)
84 #ifdef WIN32
85 typedef int socklen_t;
86 #endif
87 
88 // If defined, the base class of all exceptions will
89 // be std::exception.
90 // Otherwise, we start with GenericException
91 #define USE_STD_EXCEPTION
92 
93 // We use the GCC __attribute__((format....)
94 // to have the compiler check printf-type
95 // format strings,
96 // and to mark variables as unused:
97 // __attribute__ ((unused))
98 // Define this one to disable when your compiler
99 // fails to understand __attribute__
100 #ifndef __GNUC__
101 #define __attribute__(x) /* */
102 #endif
103