Skip to content

Commit

Permalink
win32: declare lfs_win32_pusherror, windowsToUnixTime, lfs_win32_lsta…
Browse files Browse the repository at this point in the history
…t as static
  • Loading branch information
FractalU committed Oct 28, 2024
1 parent ff2cbc2 commit cde08a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ typedef struct dir_data {

#ifdef _WIN32

int lfs_win32_pusherror(lua_State * L)
static int lfs_win32_pusherror(lua_State * L)
{
int en = GetLastError();
lua_pushnil(L);
Expand All @@ -181,15 +181,15 @@ int lfs_win32_pusherror(lua_State * L)

#define TICKS_PER_SECOND 10000000
#define EPOCH_DIFFERENCE 11644473600LL
time_t windowsToUnixTime(FILETIME ft)
static time_t windowsToUnixTime(FILETIME ft)
{
ULARGE_INTEGER uli;
uli.LowPart = ft.dwLowDateTime;
uli.HighPart = ft.dwHighDateTime;
return (time_t) (uli.QuadPart / TICKS_PER_SECOND - EPOCH_DIFFERENCE);
}

int lfs_win32_lstat(const char *path, STAT_STRUCT * buffer)
static int lfs_win32_lstat(const char *path, STAT_STRUCT * buffer)
{
WIN32_FILE_ATTRIBUTE_DATA win32buffer;
if (GetFileAttributesEx(path, GetFileExInfoStandard, &win32buffer)) {
Expand Down

0 comments on commit cde08a1

Please sign in to comment.