* Wrap everything related to *stat() into own functions

* Testwise remove early includes to stdin for OSX, see if they are still required
This commit is contained in:
jsteube
2016-10-31 11:28:06 +01:00
parent 80b3f52952
commit 93adde9d2f
23 changed files with 107 additions and 147 deletions

View File

@@ -99,6 +99,30 @@ void naive_escape (char *s, size_t s_max, const char key_char, const char escape
strncpy (s, s_escaped, s_max - 1);
}
#if defined (_POSIX)
int hc_stat (const char *pathname, hc_stat_t *buf)
{
return stat (pathname, buf);
}
int hc_fstat (int fd, hc_stat_t *buf)
{
return fstat (fd, buf);
}
#endif
#if defined (_WIN)
int hc_stat (const char *pathname, hc_stat_t *buf)
{
return stat64 (pathname, buf);
}
int hc_fstat (int fd, hc_stat_t *buf)
{
return fstat64 (fd, buf);
}
#endif
void hc_sleep_msec (const u32 msec)
{
#if defined (_WIN)