]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: don't install platform_defs.h
authorChristoph Hellwig <hch@lst.de>
Sun, 2 Aug 2015 23:58:33 +0000 (09:58 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 2 Aug 2015 23:58:33 +0000 (09:58 +1000)
platform_defs.h is a generated header file, which causes all kinds
of problems when installed on multiarch systems, and requires
workarounds in distribution packages.  Instead move the small parts
of it needed in the installed xfs.h into xfs.h and keep
platform_defs.h private to xfsprogs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
45 files changed:
include/Makefile
include/libxfs.h
include/linux.h
include/path.h
include/platform_defs.h.in
include/project.h
include/xfs.h
io/attr.c
io/bmap.c
io/fadvise.c
io/fiemap.c
io/file.c
io/freeze.c
io/fsync.c
io/getrusage.c
io/imap.c
io/init.c
io/inject.c
io/io.h
io/link.c
io/madvise.c
io/mincore.c
io/mmap.c
io/open.c
io/parent.c
io/pread.c
io/prealloc.c
io/pwrite.c
io/readdir.c
io/resblks.c
io/seek.c
io/sendfile.c
io/shutdown.c
io/sync.c
io/sync_file_range.c
io/truncate.c
libhandle/handle.c
libhandle/jdm.c
libxcmd/command.c
libxcmd/help.c
libxcmd/input.c
libxcmd/quit.c
libxfs/crc32.c
libxfs/libxfs_priv.h
libxfs/radix-tree.c

index 46209cea12274c5a207382771a32f697527a2871..8ffd2f2228b30c5400018d7a38bafc0a37cfa81e 100644 (file)
@@ -38,12 +38,12 @@ LIBHFILES = libxfs.h \
        command.h \
        input.h \
        path.h \
-       project.h
+       project.h \
+       platform_defs.h \
 
 HFILES = handle.h \
        jdm.h \
        $(PKG_PLATFORM).h \
-       platform_defs.h \
        xfs.h \
        xqm.h \
        xfs_arch.h
index 1fb2d6dd53ecc8aaab78640c9bb42e9cbdb32491..b1604e2e15bb1fd7c6bfadec576dc83911122c7d 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "libxfs_api_defs.h"
 #include "platform_defs.h"
+#include "xfs.h"
 
 #include "list.h"
 #include "hlist.h"
index cb6298f5dc9de2b153a62ed9b26b584b39c6eada..8804c2d41dda3e3b8c602a023879f7c927d2dd7b 100644 (file)
@@ -26,6 +26,7 @@
 #include <inttypes.h>
 #include <malloc.h>
 #include <getopt.h>
+#include <errno.h>
 #include <endian.h>
 #include <stdbool.h>
 #include <asm/types.h>
index 58955efa80aa610e5bcc5787b8f589a0c56e58f9..46a887e51d7cad3c9e4a3b1f1e658e8bf6462a14 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __PATH_H__
 #define __PATH_H__
 
-#include "xfs.h"
+#include "platform_defs.h"
 
 /*
  * XFS Filesystem Paths
index db6cb2e98187de8ccc69a1cf6b74a72052ab1ce4..fc7e01abb7560edbe920f2ddb8d07e7bd9b82ffd 100644 (file)
 
 typedef struct filldir         filldir_t;
 
-#if defined(__linux__)
-#include <xfs/linux.h>
-#elif defined(__FreeBSD__)
-#include <xfs/freebsd.h>
-#elif defined(__FreeBSD_kernel__)
-#include <xfs/gnukfreebsd.h>
-#elif defined(__APPLE__)
-#include <xfs/darwin.h>
-#elif defined(__sgi__) || defined(__sgi)
-#include <xfs/irix.h>
-#else
-# error unknown platform... have fun porting!
-#endif
-
 /* long and pointer must be either 32 bit or 64 bit */
 #undef SIZEOF_LONG
 #undef SIZEOF_CHAR_P
@@ -76,19 +62,6 @@ typedef unsigned short umode_t;
 #endif
 #include <locale.h>
 
-#ifdef DEBUG
-# define ASSERT(EX)    assert(EX)
-#else
-# define ASSERT(EX)    ((void) 0)
-#endif
-
-/*
- * sparse kernel source annotations
- */
-#ifndef __user
-#define __user
-#endif
-
 #define IRIX_DEV_BITSMAJOR      14
 #define IRIX_DEV_BITSMINOR      18
 #define IRIX_DEV_MAXMAJ         0x1ff
index 63bdffd3e0c1bebe76d6e943a66f3bbe75672edb..77ed06b715ef720de78ac052269e698cfb716168 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef __PROJECT_H__
 #define __PROJECT_H__
 
+#include "platform_defs.h"
 #include "xfs.h"
 
 extern int setprojid(const char *__name, int __fd, prid_t __id);
index e32c4a8db43f434385a23fca63b94df618455eec..bc940685e03c45f8a4194bf55af73e079c0a98ef 100644 (file)
 #ifndef __XFS_H__
 #define __XFS_H__
 
-#include <xfs/platform_defs.h>
+#if defined(__linux__)
+#include <xfs/linux.h>
+#elif defined(__FreeBSD__)
+#include <xfs/freebsd.h>
+#elif defined(__FreeBSD_kernel__)
+#include <xfs/gnukfreebsd.h>
+#elif defined(__APPLE__)
+#include <xfs/darwin.h>
+#elif defined(__sgi__) || defined(__sgi)
+#include <xfs/irix.h>
+#else
+# error unknown platform... have fun porting!
+#endif
+
+#ifdef DEBUG
+# define ASSERT(EX)    assert(EX)
+#else
+# define ASSERT(EX)    ((void) 0)
+#endif
+
+/*
+ * sparse kernel source annotations
+ */
+#ifndef __user
+#define __user
+#endif
+
 #include <xfs/xfs_types.h>
 #include <xfs/xfs_fs.h>
 
index bc1ab56e5d6022f81a9f17edb1bf58b6411f7453..7cbcc3c88543d786eaf733a7bed24f751380d130 100644 (file)
--- a/io/attr.c
+++ b/io/attr.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 432ddb7fa6e29cab176f3f5917fc0fdb431640ae..cbeed3bb0c2c0d090ee3e906fd4e1592bae64662 100644 (file)
--- a/io/bmap.c
+++ b/io/bmap.c
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include "init.h"
 #include "io.h"
index fa586d3e097872ffb0f8f7fb4740f6a1c5e086d5..d59d1ff28e5bd4b64b084664cf871fc1936852e4 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 8482c9920ea3a006f410b319f52244ea7f3e2984..17b38a4fe528a0ebf145839904241881de17d3a9 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include <linux/fiemap.h>
 #include <linux/fs.h>
index 91dd38e2f6266b8b5dc8fdf5fbad2f27ef92a21e..d4bc4f8fc1d585cd6fc8017d6243b89ff0f7a973 100644 (file)
--- a/io/file.c
+++ b/io/file.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/mman.h>
index 90f5b664e2358b6443537472e915f2a7b4fe8f26..3d0d2a4b56011c14df387334a62b5daabb9ce275 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 6c93dffbefccf60898ef68e71de6489f0298404f..9fe5e2f50c62025f9820d4a0eeb4e9ce6c1938c6 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include "init.h"
 #include "io.h"
index 28b8453d7e5c7b57605c008133dafe6d47aa5fd9..bccf94cbc3020a6bb9adb2b5d0dbd48ef7ce3a70 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/time.h>
index 7c24bcd332ed2c2e0c81b8b3c63d7e2359a7b048..34901cb9dc44fd8c9dfb2a746f449e2004baf3ab 100644 (file)
--- a/io/imap.c
+++ b/io/imap.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 70214f9a230f136767ca7f14b590e3ec04f010e5..13f35c40e9aa21b343866de681d46b9452dc76aa 100644 (file)
--- a/io/init.c
+++ b/io/init.c
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 23eb4a20862071438e18f6296717e83b6465953e..90ccda8c8293bef3d4eef2bc278124e888bf6b9c 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
diff --git a/io/io.h b/io/io.h
index db8b5138c207c81f00add4ddffdfa95cb839c161..b115e4ad8bff4b611fb27a863491fb5481f86705 100644 (file)
--- a/io/io.h
+++ b/io/io.h
@@ -16,6 +16,8 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include "xfs.h"
+
 /*
  * Read/write patterns (default is always "forward")
  */
index 7fb81e13f56b72ed43680f4e65916950a4b0b904..ccf8e691bb1dba61a7971c549b7466c3e632a37f 100644 (file)
--- a/io/link.c
+++ b/io/link.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index b30d28babd3ad187a8445444e1cad27eaef4036a..1d8b53cb516f618bf289b066f4f5a4b251d07337 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/mman.h>
index 670d4c8d55052b4bf0660865210e084b17cc600c..9e0d3a620319ac331c065f5a1632c7598668f59a 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/mman.h>
index 33747c17d6c969a2cd41fa9ade3ea38508a19d36..f26276e520f619d7f5b2a6bff56642cb67a6491b 100644 (file)
--- a/io/mmap.c
+++ b/io/mmap.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/mman.h>
index 33d9f8dfe3acd4d4da18720d4e0ccea79375d5ec..ac5a5e0f3a4eabc599fe299ecb38cd03394f6a0e 100644 (file)
--- a/io/open.c
+++ b/io/open.c
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index a374b3e9df6b9e42ee785d82c3e0de6da5962ef6..abc3402b36aa18d090b8f8372dd4699dbcc7276a 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "path.h"
index 9205e34e55061de2cbe75b5c88a302e701515c35..1c77c41349b0928069d537f59f68c4a19aa5c39c 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <sys/uio.h>
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <ctype.h>
index b60d2dc580810e4e6681e61317aff96cf6cc03c8..713ea7bcb6885a8b2f7e1ed24a2a914713af6c1c 100644 (file)
@@ -19,7 +19,6 @@
 #if defined(HAVE_FALLOCATE)
 #include <linux/falloc.h>
 #endif
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index c9d2b1ac6e11efdde0a4028032eb905f2320103f..10f78e42aeb14e475482d1230f56fcaec6bc673f 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <sys/uio.h>
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index f8b2755dce02113f68e5f1d1fccfbc8a73eac039..7b0edbc61fed54e42b74c77c249e80c21d341b2e 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index df032d590c3069bdbccd6e6c631617541a0330b2..73318ae03fd267120f0fb4083236c6de217fa3d8 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 39dab61d8066f080bb0c230dea62c6682e4b41ac..35a369e6a355458d85da6ed717625f8424767e16 100644 (file)
--- a/io/seek.c
+++ b/io/seek.c
@@ -16,7 +16,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/types.h>
index 744b6187f5b139c9116decd68b8da5f298ae7127..5c1638ff8e403bb49d160ab373ee58e6613e810d 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include <sys/sendfile.h>
index b75278ada49e229a1f5fcda3b09bd51eff208185..d8507cc78af70a09e840aef717fc0e93bfb2647b 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 0e7b82d912b3c26694df6b08512d2fa284f8c349..28e3a15e0a96c274733d22220a6681a0ea032bc3 100644 (file)
--- a/io/sync.c
+++ b/io/sync.c
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include "init.h"
 #include "io.h"
index 8e66773590ce7e166df7d2ac77f71d6188c6f2b5..7e4f3e6da39783bf55c87ae7ff141ee7615b035d 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 5b2ac018b0857568419221c5bea7474d6a9716f4..f2df16834c723d3d7850d5095e7a2a8a74bdd6aa 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 7313e3b9c663ddfa64e2af7fadbc98c1cc8d7450..b1c0c104918b28fbc2cf8e7ec131cb8aede0f2f4 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <libgen.h>
+#include "platform_defs.h"
 #include "xfs.h"
 #include "handle.h"
 #include "parent.h"
index 13196d145276fc3aacd4cffcfd701da64d150d15..d8044237bf69e2c8db33797486eb5282660196ba 100644 (file)
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include "platform_defs.h"
 #include "xfs.h"
 #include "handle.h"
 #include "jdm.h"
index 5d0649b7026928c2e79482ace76ee0021385457d..42a77e997927708a1ac2c034e647e5b3080ab3d7 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 #include "input.h"
 
index 023b830885c6ed9e386166b7e8671e3a691d0c5e..fad0ab98f8b71e765d8f61d0fae7438437b16a31 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 
 static cmdinfo_t help_cmd;
index 966a7ff8859f76014be565e5863d565c612d3cc5..c505ab3d4c313452def972fabb07ba6e0b68b808 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "input.h"
 #include <ctype.h>
 #include <stdbool.h>
index 0a2dd409ac41e75d63faecb4fb7ca1a213fe156b..0183b8f78882c3375728c8b6ccf447de4a9e35de 100644 (file)
@@ -16,7 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "xfs.h"
+#include "platform_defs.h"
 #include "command.h"
 
 static cmdinfo_t quit_cmd;
index b2c7ec07189bceab8f1aa750ba4447fd7e0f614f..783d62e9a13f4ab1700dfffd6bfbb4182a44997c 100644 (file)
@@ -34,6 +34,7 @@
  */
 
 #include "platform_defs.h"
+#include "xfs.h"
 #include "xfs_arch.h"
 #include "crc32defs.h"
 
index 7a29fd74ef571026e80a0cd494fcfd897d07af4f..1b017642e8895fc5954eed61a3b733b2aede04d2 100644 (file)
@@ -59,6 +59,7 @@
 
 #include "libxfs_api_defs.h"
 #include "platform_defs.h"
+#include "xfs.h"
 
 #include "list.h"
 #include "hlist.h"
index 9e395be159e04df43db13837b541fc58c16ad673..4d44ab4d7568fe335e3bdd3eb4e934231cde3b39 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "platform_defs.h"
+#include "xfs.h"
 #include "radix-tree.h"
 
 #ifndef ARRAY_SIZE