ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
config.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file config.h
1 // Copyright FreeHEP, 2005.
2 #ifndef CHEPREP_CONFIG_H
3 #define CHEPREP_CONFIG_H 1
4 
8 namespace cheprep {
9 
10 #if defined(WIN32) && !defined(GNU_GCC)
11 
12 // WIN32 and NOT GNU_GCC
13 typedef __int64 int64;
14 typedef unsigned __int64 uint64;
15 #define CHEPREP_INT64_FORMAT "%lld"
16 #define CHEPREP_UINT64_FORMAT "%llu"
17 
18 #else // other than WIN32-MSVC
19 #if defined(_LP64)
20 
21 // 64 Bit Platforms
22 typedef long int64;
23 typedef unsigned long uint64;
24 #define CHEPREP_INT64_FORMAT "%ld"
25 #define CHEPREP_UINT64_FORMAT "%uld"
26 
27 #else
28 
29 // 32-Bit Platforms
30 typedef long long int64;
31 typedef unsigned long long uint64;
32 #define CHEPREP_INT64_FORMAT "%lld"
33 #define CHEPREP_UINT64_FORMAT "%ulld"
34 
35 #endif // 32-Bit Platforms
36 #endif // other than WIN32-MSVC
37 
38 } // namespace cheprep
39 
40 #ifdef WIN32
41 #ifndef GNU_GCC
42 // Disable warning C4786: identifier was truncated to '255' characters in the debug information
43  #pragma warning ( disable : 4786 )
44 // Disable warning C4250: inherits via dominance
45  #pragma warning ( disable : 4250 )
46 #ifdef VC6
47 // FIX for KB 168440 - VC6
48 // Stream Operator << Cannot Handle __int64 Type
49  #include<iostream>
50 
51  inline std::ostream& operator<<(std::ostream& os, __int64 i ) {
52  char buf[20];
53  sprintf(buf,"%I64d", i );
54  os << buf;
55  return os;
56  }
57 #endif // VC6
58 #endif // GNU_GCC
59 #endif // WIN32
60 
61 
62 #endif // CHEPREP_CONFIG_H