mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
inc: fuse: use FSP_FUSE_SYM to define FUSE symbols
This commit is contained in:
parent
99a1e331b5
commit
29496a35be
@ -120,74 +120,74 @@ FSP_FUSE_API void fsp_fuse_exit(struct fsp_fuse_env *env,
|
||||
struct fuse *f);
|
||||
FSP_FUSE_API struct fuse_context *fsp_fuse_get_context(struct fsp_fuse_env *env);
|
||||
|
||||
static inline int fuse_main_real(int argc, char *argv[],
|
||||
FSP_FUSE_SYM int fuse_main_real(int argc, char *argv[],
|
||||
const struct fuse_operations *ops, size_t opsize, void *data)
|
||||
{
|
||||
return fsp_fuse_main_real(fsp_fuse_env(), argc, argv, ops, opsize, data);
|
||||
}
|
||||
|
||||
static inline int fuse_is_lib_option(const char *opt)
|
||||
FSP_FUSE_SYM int fuse_is_lib_option(const char *opt)
|
||||
{
|
||||
return fsp_fuse_is_lib_option(fsp_fuse_env(), opt);
|
||||
}
|
||||
|
||||
static inline struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
|
||||
FSP_FUSE_SYM struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
|
||||
const struct fuse_operations *ops, size_t opsize, void *data)
|
||||
{
|
||||
return fsp_fuse_new(fsp_fuse_env(), ch, args, ops, opsize, data);
|
||||
}
|
||||
|
||||
static inline void fuse_destroy(struct fuse *f)
|
||||
FSP_FUSE_SYM void fuse_destroy(struct fuse *f)
|
||||
{
|
||||
fsp_fuse_destroy(fsp_fuse_env(), f);
|
||||
}
|
||||
|
||||
static inline int fuse_loop(struct fuse *f)
|
||||
FSP_FUSE_SYM int fuse_loop(struct fuse *f)
|
||||
{
|
||||
return fsp_fuse_loop(fsp_fuse_env(), f);
|
||||
}
|
||||
|
||||
static inline int fuse_loop_mt(struct fuse *f)
|
||||
FSP_FUSE_SYM int fuse_loop_mt(struct fuse *f)
|
||||
{
|
||||
return fsp_fuse_loop_mt(fsp_fuse_env(), f);
|
||||
}
|
||||
|
||||
static inline void fuse_exit(struct fuse *f)
|
||||
FSP_FUSE_SYM void fuse_exit(struct fuse *f)
|
||||
{
|
||||
fsp_fuse_exit(fsp_fuse_env(), f);
|
||||
}
|
||||
|
||||
static inline struct fuse_context *fuse_get_context(void)
|
||||
FSP_FUSE_SYM struct fuse_context *fuse_get_context(void)
|
||||
{
|
||||
return fsp_fuse_get_context(fsp_fuse_env());
|
||||
}
|
||||
|
||||
static inline int fuse_getgroups(int size, fuse_gid_t list[])
|
||||
FSP_FUSE_SYM int fuse_getgroups(int size, fuse_gid_t list[])
|
||||
{
|
||||
(void)size;
|
||||
(void)list;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int fuse_interrupted(void)
|
||||
FSP_FUSE_SYM int fuse_interrupted(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int fuse_invalidate(struct fuse *f, const char *path)
|
||||
FSP_FUSE_SYM int fuse_invalidate(struct fuse *f, const char *path)
|
||||
{
|
||||
(void)f;
|
||||
(void)path;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int fuse_notify_poll(struct fuse_pollhandle *ph)
|
||||
FSP_FUSE_SYM int fuse_notify_poll(struct fuse_pollhandle *ph)
|
||||
{
|
||||
(void)ph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct fuse_session *fuse_get_session(struct fuse *f)
|
||||
FSP_FUSE_SYM struct fuse_session *fuse_get_session(struct fuse *f)
|
||||
{
|
||||
return (void *)f;
|
||||
}
|
||||
|
@ -88,43 +88,43 @@ FSP_FUSE_API int fsp_fuse_parse_cmdline(struct fsp_fuse_env *env,
|
||||
FSP_FUSE_API int32_t fsp_fuse_ntstatus_from_errno(struct fsp_fuse_env *env,
|
||||
int err);
|
||||
|
||||
static inline int fuse_version(void)
|
||||
FSP_FUSE_SYM int fuse_version(void)
|
||||
{
|
||||
return fsp_fuse_version(fsp_fuse_env());
|
||||
}
|
||||
|
||||
static inline struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
|
||||
FSP_FUSE_SYM struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
|
||||
{
|
||||
return fsp_fuse_mount(fsp_fuse_env(), mountpoint, args);
|
||||
}
|
||||
|
||||
static inline void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
|
||||
FSP_FUSE_SYM void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
|
||||
{
|
||||
fsp_fuse_unmount(fsp_fuse_env(), mountpoint, ch);
|
||||
}
|
||||
|
||||
static inline int fuse_parse_cmdline(struct fuse_args *args,
|
||||
FSP_FUSE_SYM int fuse_parse_cmdline(struct fuse_args *args,
|
||||
char **mountpoint, int *multithreaded, int *foreground)
|
||||
{
|
||||
return fsp_fuse_parse_cmdline(fsp_fuse_env(), args, mountpoint, multithreaded, foreground);
|
||||
}
|
||||
|
||||
static inline void fuse_pollhandle_destroy(struct fuse_pollhandle *ph)
|
||||
FSP_FUSE_SYM void fuse_pollhandle_destroy(struct fuse_pollhandle *ph)
|
||||
{
|
||||
(void)ph;
|
||||
}
|
||||
|
||||
static inline int fuse_daemonize(int foreground)
|
||||
FSP_FUSE_SYM int fuse_daemonize(int foreground)
|
||||
{
|
||||
return fsp_fuse_daemonize(foreground);
|
||||
}
|
||||
|
||||
static inline int fuse_set_signal_handlers(struct fuse_session *se)
|
||||
FSP_FUSE_SYM int fuse_set_signal_handlers(struct fuse_session *se)
|
||||
{
|
||||
return fsp_fuse_set_signal_handlers(se);
|
||||
}
|
||||
|
||||
static inline void fuse_remove_signal_handlers(struct fuse_session *se)
|
||||
FSP_FUSE_SYM void fuse_remove_signal_handlers(struct fuse_session *se)
|
||||
{
|
||||
(void)se;
|
||||
fsp_fuse_set_signal_handlers(0);
|
||||
|
@ -72,38 +72,38 @@ FSP_FUSE_API int fsp_fuse_opt_add_opt_escaped(struct fsp_fuse_env *env,
|
||||
FSP_FUSE_API int fsp_fuse_opt_match(struct fsp_fuse_env *env,
|
||||
const struct fuse_opt opts[], const char *opt);
|
||||
|
||||
static inline int fuse_opt_parse(struct fuse_args *args, void *data,
|
||||
FSP_FUSE_SYM int fuse_opt_parse(struct fuse_args *args, void *data,
|
||||
const struct fuse_opt opts[], fuse_opt_proc_t proc)
|
||||
{
|
||||
return fsp_fuse_opt_parse(fsp_fuse_env(), args, data, opts, proc);
|
||||
}
|
||||
|
||||
static inline int fuse_opt_add_arg(struct fuse_args *args, const char *arg)
|
||||
FSP_FUSE_SYM int fuse_opt_add_arg(struct fuse_args *args, const char *arg)
|
||||
{
|
||||
return fsp_fuse_opt_add_arg(fsp_fuse_env(), args, arg);
|
||||
}
|
||||
|
||||
static inline int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
|
||||
FSP_FUSE_SYM int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
|
||||
{
|
||||
return fsp_fuse_opt_insert_arg(fsp_fuse_env(), args, pos, arg);
|
||||
}
|
||||
|
||||
static inline void fuse_opt_free_args(struct fuse_args *args)
|
||||
FSP_FUSE_SYM void fuse_opt_free_args(struct fuse_args *args)
|
||||
{
|
||||
fsp_fuse_opt_free_args(fsp_fuse_env(), args);
|
||||
}
|
||||
|
||||
static inline int fuse_opt_add_opt(char **opts, const char *opt)
|
||||
FSP_FUSE_SYM int fuse_opt_add_opt(char **opts, const char *opt)
|
||||
{
|
||||
return fsp_fuse_opt_add_opt(fsp_fuse_env(), opts, opt);
|
||||
}
|
||||
|
||||
static inline int fuse_opt_add_opt_escaped(char **opts, const char *opt)
|
||||
FSP_FUSE_SYM int fuse_opt_add_opt_escaped(char **opts, const char *opt)
|
||||
{
|
||||
return fsp_fuse_opt_add_opt_escaped(fsp_fuse_env(), opts, opt);
|
||||
}
|
||||
|
||||
static inline int fuse_opt_match(const struct fuse_opt opts[], const char *opt)
|
||||
FSP_FUSE_SYM int fuse_opt_match(const struct fuse_opt opts[], const char *opt)
|
||||
{
|
||||
return fsp_fuse_opt_match(fsp_fuse_env(), opts, opt);
|
||||
}
|
||||
|
@ -35,6 +35,10 @@ extern "C" {
|
||||
#define FSP_FUSE_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#if !defined(FSP_FUSE_SYM)
|
||||
#define FSP_FUSE_SYM static inline
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FUSE uses a number of types (notably: struct stat) that are OS specific.
|
||||
* Furthermore there are sometimes multiple definitions of the same type even
|
||||
|
Loading…
x
Reference in New Issue
Block a user