VirtualBox

source: vbox/trunk/src/VBox/ImageMounter/vboximg-mount/fuse-calls.h@ 80776

Last change on this file since 80776 was 80776, checked in by vboxsync, 5 years ago

vboximg-mount: scm fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/** @file
2 * Stubs for dynamically loading libfuse/libosxfuse and the symbols which are needed by
3 * VirtualBox.
4 */
5
6/*
7 * Copyright (C) 2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17#ifndef VBOX_INCLUDED_SRC_vboximg_mount_fuse_calls_h
18#define VBOX_INCLUDED_SRC_vboximg_mount_fuse_calls_h
19#ifndef RT_WITHOUT_PRAGMA_ONCE
20# pragma once
21#endif
22
23/** The file name of the fuse library */
24#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_SOLARIS)
25# define RT_RUNTIME_LOADER_LIB_NAME "libfuse.so.2"
26#elif defined(RT_OS_DARWIN)
27# define RT_RUNTIME_LOADER_LIB_NAME "libosxfuse.dylib"
28#else
29# error "Unsupported host OS, manual work required"
30#endif
31
32/** The name of the loader function */
33#define RT_RUNTIME_LOADER_FUNCTION RTFuseLoadLib
34
35/** The following are the symbols which we need from the fuse library. */
36#define RT_RUNTIME_LOADER_INSERT_SYMBOLS \
37 RT_PROXY_STUB(fuse_main_real, int, (int argc, char **argv, struct fuse_operations *fuse_ops, size_t op_size, void *pv), \
38 (argc, argv, fuse_ops, op_size, pv)) \
39 RT_PROXY_STUB(fuse_opt_parse, int, (struct fuse_args *args, void *data, const struct fuse_opt opts[], fuse_opt_proc_t proc), \
40 (args, data, opts, proc)) \
41 RT_PROXY_STUB(fuse_opt_add_arg, int, (struct fuse_args *args, const char *arg), \
42 (args, arg)) \
43
44#ifdef VBOX_FUSE_GENERATE_HEADER
45# define RT_RUNTIME_LOADER_GENERATE_HEADER
46# define RT_RUNTIME_LOADER_GENERATE_DECLS
47# include <iprt/runtime-loader.h>
48# undef RT_RUNTIME_LOADER_GENERATE_HEADER
49# undef RT_RUNTIME_LOADER_GENERATE_DECLS
50
51#elif defined(VBOX_FUSE_GENERATE_BODY)
52# define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
53# include <iprt/runtime-loader.h>
54# undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
55
56#else
57# error This file should only be included to generate stubs for loading the Fuse library at runtime
58#endif
59
60#undef RT_RUNTIME_LOADER_LIB_NAME
61#undef RT_RUNTIME_LOADER_INSERT_SYMBOLS
62
63#endif /* !VBOX_INCLUDED_SRC_vboximg_mount_fuse_calls_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette