soci-platform.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2008 Mateusz Loskot
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 
8 #ifndef SOCI_PLATFORM_H_INCLUDED
9 #define SOCI_PLATFORM_H_INCLUDED
10 
11 #if defined(_MSC_VER) || defined(__MINGW32__)
12 #define LL_FMT_FLAGS "I64"
13 #else
14 #define LL_FMT_FLAGS "ll"
15 #endif
16 
17 // Portability hacks for Microsoft Visual C++ compiler
18 #ifdef _MSC_VER
19 #include <stdlib.h>
20 
21 // Define if you have the vsnprintf variants.
22 #if _MSC_VER < 1500
23 # define vsnprintf _vsnprintf
24 #endif
25 
26 // Define if you have the snprintf variants.
27 #define snprintf _snprintf
28 
29 // Define if you have the strtoll and strtoull variants.
30 #if _MSC_VER < 1300
31 # error "Visual C++ versions prior 1300 don't support _strtoi64 and _strtoui64"
32 #elif _MSC_VER >= 1300 && _MSC_VER < 1800
33 namespace std {
34  inline long long strtoll(char const* str, char** str_end, int base)
35  {
36  return _strtoi64(str, str_end, base);
37  }
38 
39  inline unsigned long long strtoull(char const* str, char** str_end, int base)
40  {
41  return _strtoui64(str, str_end, base);
42  }
43 }
44 #endif // _MSC_VER < 1800
45 #endif // _MSC_VER
46 
47 #if defined(__CYGWIN__) || defined(__MINGW32__)
48 #include <stdlib.h>
49 namespace std {
50  using ::strtoll;
51  using ::strtoull;
52 }
53 #endif
54 
55 #endif // SOCI_PLATFORM_H_INCLUDED


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41