diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-20 15:15:21 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-20 15:15:21 +0000 |
commit | 065f222cd58501acbe6dde5520c1c2498e8d3c08 (patch) | |
tree | 6fee89465e3fc21e91591e53ea1c0678ef965367 /include/fuse.h | |
parent | e089b718969bc0aaecf180c675b9c2b6d1b8ba9c (diff) | |
download | libfuse-065f222cd58501acbe6dde5520c1c2498e8d3c08.tar.gz |
fix
Diffstat (limited to 'include/fuse.h')
-rw-r--r-- | include/fuse.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/include/fuse.h b/include/fuse.h index a94c61a..3c3a98f 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -295,7 +295,7 @@ struct fuse_operations { * * Introduced in version 2.3 */ - void *(*init) (void); + void *(*init) (struct fuse_conn_info *conn); /** * Clean up filesystem @@ -535,13 +535,25 @@ void fuse_set_getcontext_func(struct fuse_context *(*func)(void)); * Compatibility stuff * * ----------------------------------------------------------- */ -#ifndef __FreeBSD__ +#ifdef __FreeBSD__ +# if FUSE_USE_VERSION < 25 +# error On FreeBSD API version 25 or greater must be used +# endif +#endif -#if FUSE_USE_VERSION == 22 || FUSE_USE_VERSION == 21 || FUSE_USE_VERSION == 11 +#if FUSE_USE_VERSION == 25 || FUSE_USE_VERSION == 22 || \ + FUSE_USE_VERSION == 21 || FUSE_USE_VERSION == 11 # include "fuse_compat.h" # undef FUSE_MINOR_VERSION # undef fuse_main -# if FUSE_USE_VERSION == 22 +# if FUSE_USE_VERSION == 25 +# define FUSE_MINOR_VERSION 6 +# define fuse_main(argc, argv, op) \ + fuse_main_real_compat25(argc, argv, op, sizeof(*(op))) +# define fuse_new fuse_new_compat25 +# define fuse_setup fuse_setup_compat25 +# define fuse_operations fuse_operations_compat25 +# elif FUSE_USE_VERSION == 22 # define FUSE_MINOR_VERSION 4 # define fuse_main(argc, argv, op) \ fuse_main_real_compat22(argc, argv, op, sizeof(*(op))) @@ -549,13 +561,14 @@ void fuse_set_getcontext_func(struct fuse_context *(*func)(void)); # define fuse_setup fuse_setup_compat22 # define fuse_operations fuse_operations_compat22 # define fuse_file_info fuse_file_info_compat22 +# define fuse_mount fuse_mount_compat22 # else # define fuse_dirfil_t fuse_dirfil_t_compat # define __fuse_read_cmd fuse_read_cmd # define __fuse_process_cmd fuse_process_cmd # define __fuse_loop_mt fuse_loop_mt_proc # if FUSE_USE_VERSION == 21 -# define FUSE_MAJOR_VERSION 2 +# define FUSE_MINOR_VERSION 1 # define fuse_operations fuse_operations_compat2 # define fuse_main fuse_main_compat2 # define fuse_new fuse_new_compat2 @@ -563,6 +576,7 @@ void fuse_set_getcontext_func(struct fuse_context *(*func)(void)); # define __fuse_teardown fuse_teardown # define __fuse_exited fuse_exited # define __fuse_set_getcontext_func fuse_set_getcontext_func +# define fuse_mount fuse_mount_compat22 # else # warning Compatibility with API version 11 is deprecated # undef FUSE_MAJOR_VERSION @@ -576,18 +590,10 @@ void fuse_set_getcontext_func(struct fuse_context *(*func)(void)); # define FUSE_DEBUG FUSE_DEBUG_COMPAT1 # endif # endif -#elif FUSE_USE_VERSION < 25 -# error Compatibility with API version other than 21, 22 and 11 not supported +#elif FUSE_USE_VERSION < 27 +# error Compatibility with API version other than 21, 22, 25 and 11 not supported #endif -#else /* __FreeBSD__ */ - -#if FUSE_USE_VERSION < 25 -# error On FreeBSD API version 25 or greater must be used -#endif - -#endif /* __FreeBSD__ */ - #ifdef __cplusplus } #endif |