Revision d3e8f957 oslib-win32.c
b/oslib-win32.c | ||
---|---|---|
74 | 74 |
VirtualFree(ptr, 0, MEM_RELEASE); |
75 | 75 |
} |
76 | 76 |
|
77 |
/* FIXME: add proper locking */ |
|
78 |
struct tm *gmtime_r(const time_t *timep, struct tm *result) |
|
79 |
{ |
|
80 |
struct tm *p = gmtime(timep); |
|
81 |
memset(result, 0, sizeof(*result)); |
|
82 |
if (p) { |
|
83 |
*result = *p; |
|
84 |
p = result; |
|
85 |
} |
|
86 |
return p; |
|
87 |
} |
|
88 |
|
|
89 |
/* FIXME: add proper locking */ |
|
90 |
struct tm *localtime_r(const time_t *timep, struct tm *result) |
|
91 |
{ |
|
92 |
struct tm *p = localtime(timep); |
|
93 |
memset(result, 0, sizeof(*result)); |
|
94 |
if (p) { |
|
95 |
*result = *p; |
|
96 |
p = result; |
|
97 |
} |
|
98 |
return p; |
|
99 |
} |
|
100 |
|
|
77 | 101 |
void socket_set_block(int fd) |
78 | 102 |
{ |
79 | 103 |
unsigned long opt = 0; |
Also available in: Unified diff