bash_completion/radosgw-admin \
mount/canonicalize.c \
mount/mtab.c \
- objclass/objclass.h \
- porting.h
+ objclass/objclass.h
# coverage
include/cmp.h \
include/color.h \
include/compat.h \
+ include/sock_compat.h \
include/crc32c.h \
include/encoding.h \
include/err.h \
#define MSG_MORE 0
#endif /* !__FreeBSD__ */
+#if defined(__APPLE__)
+/* PATH_MAX */
+#include <limits.h>
+
+/* O_LARGEFILE is not defined/required on OS X */
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+/* Could be relevant for other platforms */
+#ifndef ERESTART
+#define ERESTART EINTR
+#endif
+#endif /* __APPLE__ */
+
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(expression) ({ \
typeof(expression) __result; \
--- /dev/null
+#ifndef CEPH_SOCK_COMPAT_H
+#define CEPH_SOCK_COMPAT_H
+
+#include "include/compat.h"
+
+/*
+ * This optimization may not be available on all platforms (e.g. OSX).
+ * Apparently a similar approach based on TCP_CORK can be used.
+ */
+#ifndef MSG_MORE
+# define MSG_MORE 0
+#endif
+
+/*
+ * On BSD SO_NOSIGPIPE can be set via setsockopt to block SIGPIPE.
+ */
+#ifndef MSG_NOSIGNAL
+# define MSG_NOSIGNAL 0
+# ifdef SO_NOSIGPIPE
+# define CEPH_USE_SO_NOSIGPIPE
+# else
+# error "Cannot block SIGPIPE!"
+# endif
+#endif
+
+#endif
#include "include/xlist.h"
/* DARWIN Missing ERESTART */
-#include "porting.h"
+#include "include/compat.h"
namespace librbd {
#include "AsyncMessenger.h"
#include "AsyncConnection.h"
-#include "porting.h"
+#include "include/sock_compat.h"
// Constant to limit starting sequence number to 2^31. Nothing special about it, just a big number. PLR
#define SEQ_MASK 0x7fffffff
#include "auth/cephx/CephxProtocol.h"
#include "auth/AuthSessionHandler.h"
-#include "porting.h"
+#include "include/sock_compat.h"
// Constant to limit starting sequence number to 2^31. Nothing special about it, just a big number. PLR
#define SEQ_MASK 0x7fffffff
+++ /dev/null
-
-#ifndef PORTING_H
-#define PORTING_H
-#include "acconfig.h"
-
-/* TODO: move these into include/compat.h */
-
-#if defined(DARWIN)
-#include <sys/socket.h>
-
-/* O_LARGEFILE is not defined/required on OS X */
-#define O_LARGEFILE 0
-
-/* Wonder why this is missing */
-#define PATH_MAX 1024
-
-/* Could be relevant for other platforms */
-#ifndef ERESTART
-#define ERESTART EINTR
-#endif
-
-/*
- * This optimization may not be available on all platforms (e.g. OSX).
- * Apparently a similar approach based on TCP_CORK can be used.
- */
-#ifndef MSG_MORE
-# define MSG_MORE 0
-#endif
-
-/*
- * On BSD SO_NOSIGPIPE can be set via setsockopt to block SIGPIPE.
- */
-#ifndef MSG_NOSIGNAL
-# define MSG_NOSIGNAL 0
-# ifdef SO_NOSIGPIPE
-# define CEPH_USE_SO_NOSIGPIPE
-# else
-# error "Cannot block SIGPIPE!"
-# endif
-#endif
-
-#endif /* DARWIN */
-#endif /* PORTING_H */
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#if defined(DARWIN)
#include <fuse.h>
-#include "porting.h"
-#else
-#include <fuse.h>
-#endif
#include <pthread.h>
#include <string.h>
#include <sys/types.h>
#include <getopt.h>
#include <assert.h>
+#include "include/compat.h"
#include "include/rbd/librbd.h"
static int gotrados = 0;
#include "json_spirit/json_spirit_reader.h"
#include "ceph_objectstore_tool.h"
-#include "porting.h"
namespace po = boost::program_options;
using namespace std;