aboutsummaryrefslogtreecommitdiff
path: root/compat/cygwin.h
blob: c04965a2e0e259d3bded51730f699bde5c4262e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <sys/types.h>
#include <sys/stat.h>

typedef int (*stat_fn_t)(const char*, struct stat*);
extern stat_fn_t cygwin_stat_fn;
extern stat_fn_t cygwin_lstat_fn;
int cygwin_get_st_mode_bits(const char *path, int *mode);

#define get_st_mode_bits(p,m) cygwin_get_st_mode_bits((p),(m))
#ifndef CYGWIN_C
/* cygwin.c needs the original lstat() */
#define stat(path, buf) (*cygwin_stat_fn)(path, buf)
#define lstat(path, buf) (*cygwin_lstat_fn)(path, buf)
#endif