2 Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
4 Governed by the TrueCrypt License 3.0 the full text of which is contained in
5 the file License.txt included in TrueCrypt binary and source code distribution
9 #ifndef TC_HEADER_Platform_PlatformBase
10 #define TC_HEADER_Platform_PlatformBase
30 #if !(defined(_MSC_VER) && _MSC_VER >= 1600)
37 # ifndef TC_INT_TYPES_DEFINED
39 typedef __int16 int16;
40 typedef __int32 int32;
41 typedef __int64 int64;
42 typedef unsigned __int8 byte;
43 typedef unsigned __int16 uint16;
44 typedef unsigned __int32 uint32;
45 typedef unsigned __int64 uint64;
49 typedef int16_t int16;
50 typedef int32_t int32;
51 typedef int64_t int64;
53 typedef uint16_t uint16;
54 typedef uint32_t uint32;
55 typedef uint64_t uint64;
59 #if (defined(_WIN32) || defined(_WIN64)) && !defined(TC_WINDOWS)
63 #if defined(_DEBUG) && !defined(DEBUG)
68 # define TC_TO_STRING2(n) #n
69 # define TC_TO_STRING(n) TC_TO_STRING2(n)
72 #define TC_JOIN_ARGS(a,b) a##b
73 #define TC_JOIN(a,b) TC_JOIN_ARGS(a,b)
76 template <class T> string GetFunctionName (T pos)
79 size_t p = s.find ('(');
80 if (p == string::npos)
83 p = s.find_last_of (" ");
84 if (p == string::npos)
86 return s.substr (p + 1);
88 # define SRC_POS (GetFunctionName (__PRETTY_FUNCTION__) += ":" TC_TO_STRING(__LINE__))
89 # define TC_UNUSED_VAR __attribute__ ((unused))
91 # define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
92 # define TC_UNUSED_VAR
104 # define if_debug(...) __VA_ARGS__
107 # define trace_point OutputDebugStringA ((string (SRC_POS) + "\n").c_str())
108 # define trace_msg(stream_args) do { stringstream s; s << (SRC_POS) << ": " << stream_args << endl; OutputDebugStringA (s.str().c_str()); } while (0)
109 # define trace_msgw(stream_args) do { wstringstream s; s << (SRC_POS) << L": " << stream_args << endl; OutputDebugStringW (s.str().c_str()); } while (0)
112 # define trace_point cerr << (SRC_POS) << endl
113 # define trace_msg(stream_args) cerr << (SRC_POS) << ": " << stream_args << endl
114 # define trace_msgw(stream_args) cerr << (SRC_POS); wcerr << L": " << stream_args << endl
117 # include "Platform/SystemLog.h"
118 # define trace_log_point SystemLog::WriteError (SRC_POS)
119 # define trace_log_msg(stream_args) do { stringstream s; s << (SRC_POS) << ": " << stream_args; SystemLog::WriteError (s.str()); } while (0)
122 # define if_debug(...)
124 # define trace_msg(...)
125 # define trace_msgw(...)
126 # define trace_log_point
127 # define trace_log_msg(...)
130 #define trace_val(VAL) trace_msg (#VAL << '=' << (VAL));
132 #define array_capacity(arr) (sizeof (arr) / sizeof ((arr)[0]))
134 #endif // TC_HEADER_Platform_PlatformBase
This page took
0.023247 seconds and
3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at
this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.