Windows compiles! (w/Visual Studio 2012) That's about all it does, but it's a start.
This commit is contained in:
parent
5076c75b07
commit
d6414c9ff7
30 changed files with 191 additions and 87 deletions
|
@ -30,6 +30,8 @@
|
|||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "Constants.hpp"
|
||||
#include "Logger.hpp"
|
||||
|
||||
namespace ZeroTier {
|
||||
|
@ -64,7 +66,12 @@ void Logger::log(const char *fmt,...)
|
|||
|
||||
if (_log) {
|
||||
time_t now = time(0);
|
||||
#ifdef __WINDOWS__
|
||||
ctime_s(tmp,sizeof(tmp),&now);
|
||||
char *nowstr = tmp;
|
||||
#else
|
||||
char *nowstr = ctime_r(&now,tmp);
|
||||
#endif
|
||||
for(char *c=nowstr;*c;++c) {
|
||||
if (*c == '\n')
|
||||
*c = '\0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue