mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 19:41:01 -05:00
New function ltime() returns a struct tm of the current local time.
Fixes crashes when time() returns (time_t)-1 on Windows by using the Win32 GetLocalTime() function. (The Unix implementation still just uses time() and localtime().) [originally from svn r5086]
This commit is contained in:
3
misc.h
3
misc.h
@ -5,6 +5,7 @@
|
||||
|
||||
#include <stdio.h> /* for FILE * */
|
||||
#include <stdarg.h> /* for va_list */
|
||||
#include <time.h> /* for struct_tm */
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
@ -41,6 +42,8 @@ void bufchain_prefix(bufchain *ch, void **data, int *len);
|
||||
void bufchain_consume(bufchain *ch, int len);
|
||||
void bufchain_fetch(bufchain *ch, void *data, int len);
|
||||
|
||||
struct tm ltime(void);
|
||||
|
||||
/*
|
||||
* Debugging functions.
|
||||
*
|
||||
|
Reference in New Issue
Block a user