-
Notifications
You must be signed in to change notification settings - Fork 951
Expand file tree
/
Copy pathacl_cpp_init.cpp
More file actions
84 lines (66 loc) · 1.23 KB
/
Copy pathacl_cpp_init.cpp
File metadata and controls
84 lines (66 loc) · 1.23 KB
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
#include "acl_stdafx.hpp"
#ifndef ACL_PREPARE_COMPILE
#include "acl_cpp/stdlib/string.hpp"
#endif
#include "acl_cpp/acl_cpp_init.hpp"
namespace acl
{
void acl_cpp_init(void)
{
acl_lib_init();
}
const char* acl_cpp_verbose(void)
{
static string buf;
buf.clear();
#ifdef HAS_MBEDTLS
buf += "HAS_MBEDTLS";
# ifdef HAS_MBEDTLS_DLL
buf += ", HAS_MBEDTLS_DLL";
# endif
#endif
#ifdef HAS_POLARSSL
buf += ", HAS_POLARSSL";
# ifdef HAS_POLARSSL_DLL
buf += ", HAS_POLARSSL_DLL";
# endif
#endif
#ifdef ACL_CLIENT_ONLY
buf += ", ACL_CLIENT_ONLY";
#endif
#ifdef ACL_HOOK_NEW
buf += ", ACL_HOOK_NEW";
#endif
return buf.c_str();
}
#ifdef ACL_WINDOWS
static FILE* dos_fp_ = NULL;
void open_dos(void)
{
if (dos_fp_)
return;
// ´ò¿ª DOS ´°¿Ú
AllocConsole();
#if _MSC_VER >= 1500
if (freopen_s(&dos_fp_,"CONOUT$", "w+t", stdout) != 0)
dos_fp_ = NULL;
#else
dos_fp_ = freopen("CONOUT$", "w+t", stdout);
#endif
if (dos_fp_ == NULL)
{
printf("open DOS error %s\r\n", last_serror());
FreeConsole();
}
}
void close_dos(void)
{
if (dos_fp_)
{
fclose(dos_fp_);
FreeConsole();
dos_fp_ = NULL;
}
}
#endif
} // namespace acl