mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
Windows supports localtime_s() instead of POSIX's localtime_r() and the function prototype of localtime_s() is different as compared to localtime_r(). This commit introduces ssh_localtime() (having same prototype as localtime_r()) for Windows which acts as a wrapper for localtime_s(), and defines localtime_r as a macro which expands to ssh_localtime for Windows. As a result, libssh can now use localtime_r() on Windows in the same manner as localtime_r() can be used on POSIX systems. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>