aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2023-02-07 23:06:42 +0100
committerNikolaus Rath <Nikolaus@rath.org>2023-02-09 10:21:29 +0000
commitd7560cc9916b086bfe5d86459cc9f04033edd904 (patch)
treecd86f44f9ec63e666a272af3388f42f8f21d3ef6 /include
parentbecc030e94a1ac7a5af2c530cd7526aadfaac3f5 (diff)
downloadlibfuse-d7560cc9916b086bfe5d86459cc9f04033edd904.tar.gz
Split config.h into private and public config
This addresses https://github.com/libfuse/libfuse/issues/729 commit db35a37def14b72181f3630efeea0e0433103c41 introduced a public config.h (rename to fuse_config.h to avoid conflicts) that was installed with the package and included by libfuse users through fuse_common.h. Probablem is that this file does not have unique defines so that they are unique to libfuse - on including the file conflicts with libfuse users came up. In principle all defines could be prefixed, but then most of them are internal for libfuse compilation only. So this splits out publically required defines to a new file 'libfuse_config.h' and changes back to include of "fuse_config.h" only when HAVE_LIBFUSE_PRIVATE_CONFIG_H is defined. This also renames HAVE_LIBC_VERSIONED_SYMBOLS to LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS, as it actually better explains for libfuse users what that variable is for.
Diffstat (limited to 'include')
-rw-r--r--include/fuse.h10
-rw-r--r--include/fuse_common.h5
-rw-r--r--include/fuse_lowlevel.h4
3 files changed, 12 insertions, 7 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 2888d2b..6f162dd 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -948,15 +948,15 @@ struct fuse *fuse_new_30(struct fuse_args *args, const struct fuse_operations *o
size_t op_size, void *private_data);
#define fuse_new(args, op, size, data) fuse_new_30(args, op, size, data)
#else
-#if (defined(HAVE_LIBC_VERSIONED_SYMBOLS))
+#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
struct fuse *fuse_new(struct fuse_args *args, const struct fuse_operations *op,
size_t op_size, void *private_data);
-#else /* HAVE_LIBC_VERSIONED_SYMBOLS */
+#else /* LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS */
struct fuse *fuse_new_31(struct fuse_args *args,
const struct fuse_operations *op,
size_t op_size, void *user_data);
#define fuse_new(args, op, size, data) fuse_new_31(args, op, size, data)
-#endif /* HAVE_LIBC_VERSIONED_SYMBOLS */
+#endif /* LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS */
#endif
/**
@@ -1053,11 +1053,11 @@ int fuse_loop_mt_32(struct fuse *f, struct fuse_loop_config *config);
*
* See also: fuse_loop()
*/
-#if (defined(HAVE_LIBC_VERSIONED_SYMBOLS))
+#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
int fuse_loop_mt(struct fuse *f, struct fuse_loop_config *config);
#else
#define fuse_loop_mt(f, config) fuse_loop_mt_312(f, config)
-#endif /* HAVE_LIBC_VERSIONED_SYMBOLS */
+#endif /* LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS */
#endif
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 1d050bb..8ee1a34 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -14,7 +14,12 @@
#ifndef FUSE_COMMON_H_
#define FUSE_COMMON_H_
+#ifdef HAVE_LIBFUSE_PRIVATE_CONFIG_H
#include "fuse_config.h"
+#endif
+
+#include "libfuse_config.h"
+
#include "fuse_opt.h"
#include "fuse_log.h"
#include <stdint.h>
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index 96088d7..9099e45 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -1958,7 +1958,7 @@ struct fuse_cmdline_opts {
* @param opts output argument for parsed options
* @return 0 on success, -1 on failure
*/
-#if (defined(HAVE_LIBC_VERSIONED_SYMBOLS))
+#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
int fuse_parse_cmdline(struct fuse_args *args,
struct fuse_cmdline_opts *opts);
#else
@@ -2076,7 +2076,7 @@ int fuse_session_loop(struct fuse_session *se);
int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *config);
#define fuse_session_loop_mt(se, config) fuse_session_loop_mt_32(se, config)
#else
- #if (defined(HAVE_LIBC_VERSIONED_SYMBOLS))
+ #if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
/**
* Enter a multi-threaded event loop.
*