* 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:
24
src/shared.c
24
src/shared.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user