Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/glog/src/windows/port.cc')
-rw-r--r--extern/glog/src/windows/port.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/extern/glog/src/windows/port.cc b/extern/glog/src/windows/port.cc
index d9943254ee5..19bda367c62 100644
--- a/extern/glog/src/windows/port.cc
+++ b/extern/glog/src/windows/port.cc
@@ -38,15 +38,8 @@
#include "config.h"
#include <stdarg.h> // for va_list, va_start, va_end
-#include <string.h> // for strstr()
-#include <assert.h>
-#include <string>
-#include <vector>
#include "port.h"
-using std::string;
-using std::vector;
-
// These call the windows _vsnprintf, but always NUL-terminate.
int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
if (size == 0) // not even room for a \0?
@@ -55,6 +48,12 @@ int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
return _vsnprintf(str, size-1, format, ap);
}
+#ifndef HAVE_LOCALTIME_R
+struct tm* localtime_r(const time_t* timep, struct tm* result) {
+ localtime_s(result, timep);
+ return result;
+}
+#endif // not HAVE_LOCALTIME_R
#ifndef HAVE_SNPRINTF
int snprintf(char *str, size_t size, const char *format, ...) {
va_list ap;