2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB
12 /* Versioned symbols confuse the dynamic linker in uClibc */
14 #define FUSE_SYMVER(x) __asm__(x)
16 #define FUSE_SYMVER(x)
20 #define fuse_mutex_init(mut) pthread_mutex_init(mut, NULL)
22 /* Is this hack still needed? */
23 static inline void fuse_mutex_init(pthread_mutex_t
*mut
)
25 pthread_mutexattr_t attr
;
26 pthread_mutexattr_init(&attr
);
27 pthread_mutexattr_settype(&attr
, PTHREAD_MUTEX_ADAPTIVE_NP
);
28 pthread_mutex_init(mut
, &attr
);
29 pthread_mutexattr_destroy(&attr
);
33 #ifdef HAVE_STRUCT_STAT_ST_ATIM
35 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec)
36 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctim.tv_nsec)
37 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec)
38 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val)
39 #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val)
40 #elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC)
42 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atimespec.tv_nsec)
43 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctimespec.tv_nsec)
44 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtimespec.tv_nsec)
45 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atimespec.tv_nsec = (val)
46 #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtimespec.tv_nsec = (val)
48 #define ST_ATIM_NSEC(stbuf) 0
49 #define ST_CTIM_NSEC(stbuf) 0
50 #define ST_MTIM_NSEC(stbuf) 0
51 #define ST_ATIM_NSEC_SET(stbuf, val) do { } while (0)
52 #define ST_MTIM_NSEC_SET(stbuf, val) do { } while (0)