solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
include
win_strptime.h
1
#ifndef WIN_STRPTIME_H
2
#define WIN_STRPTIME_H
3
4
#if defined(_MSC_VER)
5
6
// Define timespec for older MSVC versions
7
#if _MSC_VER < 1900
8
// Before VS2015
9
struct
timespec {
10
time_t tv_sec;
// Seconds
11
long
tv_nsec;
// Nanoseconds [0, 999999999]
12
};
13
#else
14
// VS2015+: Prevent redefinition if using pthread or other libs
15
#ifndef HAVE_STRUCT_TIMESPEC
16
#define HAVE_STRUCT_TIMESPEC
17
#endif
18
#include <time.h>
19
#endif
20
21
// Windows headers
22
#ifndef WIN32_LEAN_AND_MEAN
23
#define WIN32_LEAN_AND_MEAN
24
#endif
25
#include <windows.h>
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
131
char
* strptime(
const
char
* buf,
const
char
* fmt,
struct
tm* tm);
132
133
#ifdef __cplusplus
134
}
135
#endif
136
137
#endif
// defined(_MSC_VER)
138
139
#endif
// WIN_STRPTIME_H
Generated by
1.9.8