CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
duplex_fuse.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_DUPLEX_FUSE_H_
6 #define CVMFS_DUPLEX_FUSE_H_
7 
8 #ifdef CVMFS_LIBCVMFS
9  // Unit tests
10  #include <sys/types.h>
11  #define FUSE_VERSION 29
12  #define FUSE_ROOT_ID 1
13  extern "C" {
14  typedef unsigned long fuse_ino_t; // NOLINT
15  // Empty structs have different sizes in C and C++, hence the dummy int
16  struct fuse_chan { int dummy; };
17  struct fuse_lowlevel_ops { int dummy; }; // for loader.h
18  // Defined in t_fuse_evict.cc
19  extern unsigned fuse_lowlevel_notify_inval_inode_cnt;
20  extern unsigned fuse_lowlevel_notify_inval_entry_cnt;
21  static int __attribute__((used)) fuse_lowlevel_notify_inval_inode(
22  void *, unsigned /*fuse_ino_t*/, off_t, off_t) // NOLINT (ulong from fuse)
23  {
24  fuse_lowlevel_notify_inval_inode_cnt++;
25  return -1;
26  }
27  static int __attribute__((used)) fuse_lowlevel_notify_inval_entry(
28  void *, unsigned /*fuse_ino_t*/, const char *, size_t) // NOLINT
29  {
30  fuse_lowlevel_notify_inval_entry_cnt++;
31  return -1;
32  }
33  }
34 #else // CVMFS_LIBCVMFS
35  #ifndef CVMFS_USE_LIBFUSE
36  #error "Build system error: CVMFS_USE_LIBFUSE unset"
37  #endif
38 
39  #if CVMFS_USE_LIBFUSE == 2
40  #define FUSE_USE_VERSION 26
41  #include <fuse/fuse_lowlevel.h>
42  #include <fuse/fuse_opt.h>
43  #if(FUSE_VERSION < 28)
44  #include <cstdlib>
45  extern "C" {
46  static int __attribute__((used)) fuse_lowlevel_notify_inval_entry(
47  void *, unsigned long, const char *, size_t) // NOLINT
48  {
49  abort();
50  }
51  static int __attribute__((used)) fuse_lowlevel_notify_inval_inode(
52  void *, fuse_ino_t, off_t, off_t) // NOLINT
53  {
54  abort();
55  }
56  }
57  #endif // FUSE_VERSION < 28
58  #else
59  // CVMFS_USE_LIBFUSE == 3
60  #define FUSE_USE_VERSION 31
61  #include <fuse3/fuse.h>
62  #include <fuse3/fuse_lowlevel.h>
63  #include <fuse3/fuse_opt.h>
64  #endif
65 #endif
66 
67 #endif // CVMFS_DUPLEX_FUSE_H_
struct cvmcache_object_info __attribute__
Definition: atomic.h:24