mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 14:36:36 -05:00
Convert all C source files in vendored/libfuse/ to C++17: - lib/crc32b.c -> crc32b.cpp (const void* cast) - lib/fuse_opt.c -> fuse_opt.cpp (designated init, void* arithmetic) - lib/fuse_signals.c -> fuse_signals.cpp - lib/helper.c -> helper.cpp (void* data cast) - lib/mount.c -> mount.cpp (thin wrapper) - lib/mount_generic.c -> mount_generic.h (static inline, #pragma once) - lib/mount_bsd.c -> mount_bsd.h (static inline, #pragma once) - lib/mount_util.c -> mount_util.h (static inline, #pragma once) - util/fusermount.c -> fusermount.cpp - util/mount.mergerfs.c -> mount.mergerfs.cpp Key changes: - Replace C99 designated initializer in fuse_opt_parse with field-by-field init - Fix void* pointer arithmetic via char* base + offset pattern - All C-style (T*)voidptr casts replaced with static_cast/reinterpret_cast - Remove redundant #define _GNU_SOURCE (already in FUSE_FLAGS) - Wrap __clone2 declaration in extern "C" for ia64 path - Update Makefile: empty SRC_C, build utils with $(CXX) instead of $(CC) - Remove stale .c files now replaced by .cpp/.h counterparts All binaries build cleanly: mergerfs, mergerfs-fusermount, mount.mergerfs |
||
|---|---|---|
| .. | ||
| cpu.cpp | ||
| cpu.hpp | ||
| crc32b.cpp | ||
| crc32b.h | ||
| debug.cpp | ||
| format.cpp | ||
| fuse.cpp | ||
| fuse_cfg.cpp | ||
| fuse_dirents.cpp | ||
| fuse_i.hpp | ||
| fuse_loop.cpp | ||
| fuse_lowlevel.cpp | ||
| fuse_msgbuf.cpp | ||
| fuse_opt.cpp | ||
| fuse_req.cpp | ||
| fuse_session.cpp | ||
| fuse_signals.cpp | ||
| helper.cpp | ||
| lock.h | ||
| maintenance_thread.cpp | ||
| mount.cpp | ||
| mount.hpp | ||
| mount_bsd.h | ||
| mount_generic.h | ||
| mount_util.h | ||
| node.cpp | ||
| node.hpp | ||
| pin_threads.cpp | ||
| pin_threads.hpp | ||