diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2007-02-03 23:32:47 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2007-02-03 23:32:47 +0000 |
commit | 3a7c00ec0c156123c47b53ec1cd7ead001fa4dfb (patch) | |
tree | d8ea21530477edcc954d35e111724c8b770c5fa1 /lib/fuse_misc.h | |
parent | 47910d7b8af40ffaccc8845d10d109871b5be604 (diff) | |
download | libfuse-3a7c00ec0c156123c47b53ec1cd7ead001fa4dfb.tar.gz |
Add filesystem stacking support to high level API
Diffstat (limited to 'lib/fuse_misc.h')
-rw-r--r-- | lib/fuse_misc.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h index 57a1e37..0fabfe4 100644 --- a/lib/fuse_misc.h +++ b/lib/fuse_misc.h @@ -24,14 +24,22 @@ static inline void fuse_mutex_init(pthread_mutex_t *mut) #ifdef HAVE_STRUCT_STAT_ST_ATIM /* Linux */ -#define ST_ATIM(stbuf) (stbuf)->st_atim -#define ST_CTIM(stbuf) (stbuf)->st_ctim -#define ST_MTIM(stbuf) (stbuf)->st_mtim -#define FUSE_STAT_HAS_NANOSEC 1 +#define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec) +#define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctim.tv_nsec) +#define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec) +#define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val) +#define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val) #elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) /* FreeBSD */ -#define ST_ATIM(stbuf) (stbuf)->st_atimespec -#define ST_CTIM(stbuf) (stbuf)->st_ctimespec -#define ST_MTIM(stbuf) (stbuf)->st_mtimespec -#define FUSE_STAT_HAS_NANOSEC 1 +#define ST_ATIM(stbuf) ((stbuf)->st_atimespec.tv_nsec) +#define ST_CTIM(stbuf) ((stbuf)->st_ctimespec.tv_nsec) +#define ST_MTIM(stbuf) ((stbuf)->st_mtimespec.tv_nsec) +#define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atimespec.tv_nsec = (val) +#define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtimespec.tv_nsec = (val) +#else +#define ST_ATIM_NSEC(stbuf) 0 +#define ST_CTIM_NSEC(stbuf) 0 +#define ST_MTIM_NSEC(stbuf) 0 +#define ST_ATIM_NSEC_SET(stbuf, val) do { } while (0) +#define ST_MTIM_NSEC_SET(stbuf, val) do { } while (0) #endif |