Browse Source

libfuse cleanup: extern cplusplus cleanup

pull/809/head
Antonio SJ Musumeci 4 years ago
parent
commit
a925fbe59c
  1. 9
      libfuse/include/extern_c.h
  2. 9
      libfuse/include/fuse.h
  3. 10
      libfuse/include/fuse_common.h
  4. 9
      libfuse/include/fuse_lowlevel.h
  5. 10
      libfuse/include/fuse_opt.h
  6. 24
      libfuse/include/ulockmgr.h

9
libfuse/include/extern_c.h

@ -0,0 +1,9 @@
#pragma once
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
#define EXTERN_C_END }
#else
#define EXTERN_C_BEGIN
#define EXTERN_C_END
#endif

9
libfuse/include/fuse.h

@ -23,6 +23,7 @@
#define FUSE_USE_VERSION 21
#endif
#include "extern_c.h"
#include "fuse_common.h"
#include "fuse_dirents.h"
@ -34,9 +35,7 @@
#include <sys/statvfs.h>
#include <sys/uio.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_C_BEGIN
/* ----------------------------------------------------------- *
* Basic FUSE API *
@ -918,8 +917,6 @@ extern "C" {
/** Get session from fuse object */
struct fuse_session *fuse_get_session(struct fuse *f);
#ifdef __cplusplus
}
#endif
EXTERN_C_END
#endif /* _FUSE_H_ */

10
libfuse/include/fuse_common.h

@ -15,8 +15,10 @@
#ifndef _FUSE_COMMON_H_
#define _FUSE_COMMON_H_
#include "extern_c.h"
#include "fuse_opt.h"
#include "fuse_timeouts.h"
#include <stdint.h>
#include <sys/types.h>
@ -37,9 +39,7 @@
#define FUSE_DEFAULT_MAX_PAGES_PER_REQ 32
#define FUSE_MAX_MAX_PAGES 256
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_C_BEGIN
/**
* Information about open files
@ -478,8 +478,6 @@ extern "C" {
*/
void fuse_remove_signal_handlers(struct fuse_session *se);
#ifdef __cplusplus
}
#endif
EXTERN_C_END
#endif /* _FUSE_COMMON_H_ */

9
libfuse/include/fuse_lowlevel.h

@ -23,6 +23,7 @@
#define FUSE_USE_VERSION 24
#endif
#include "extern_c.h"
#include "fuse_common.h"
#include <fcntl.h>
@ -33,9 +34,7 @@
#include <sys/uio.h>
#include <utime.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_C_BEGIN
/* ----------------------------------------------------------- *
* Miscellaneous definitions *
@ -1826,8 +1825,6 @@ extern "C" {
*/
void fuse_chan_destroy(struct fuse_chan *ch);
#ifdef __cplusplus
}
#endif
EXTERN_C_END
#endif /* _FUSE_LOWLEVEL_H_ */

10
libfuse/include/fuse_opt.h

@ -9,14 +9,14 @@
#ifndef _FUSE_OPT_H_
#define _FUSE_OPT_H_
#include "extern_c.h"
/** @file
*
* This file defines the option parsing interface of FUSE
*/
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_C_BEGIN
/**
* Option description
@ -265,8 +265,6 @@ extern "C" {
*/
int fuse_opt_match(const struct fuse_opt opts[], const char *opt);
#ifdef __cplusplus
}
#endif
EXTERN_C_END
#endif /* _FUSE_OPT_H_ */

24
libfuse/include/ulockmgr.h

@ -1,24 +0,0 @@
/*
libulockmgr: Userspace Lock Manager Library
Copyright (C) 2006 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU LGPLv2.
See the file COPYING.LIB.
*/
#include <stdint.h>
#include <fcntl.h>
#include <sys/types.h>
/**
* Perform POSIX locking operation
*
* @param fd the file descriptor
* @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW)
* @param lock the lock parameters
* @param owner the lock owner ID cookie
* @param owner_len length of the lock owner ID cookie
* @return 0 on success -errno on error
*/
int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
size_t owner_len);
Loading…
Cancel
Save