]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix up the irix build with the log format 32/64 packed changes being
authorTim Shimmin <tes@sgi.com>
Tue, 4 Jul 2006 03:50:40 +0000 (03:50 +0000)
committerTim Shimmin <tes@sgi.com>
Tue, 4 Jul 2006 03:50:40 +0000 (03:50 +0000)
put into irix.h and GCCFLAGS separated out.
Merge of master-melb:xfs-cmds:26404a by kenmcd.

  fix up compiler flags for irix - don't want gcc ones

include/builddefs.in
include/irix.h
include/xfs_extfree_item.h
include/xfs_inode_item.h

index 59533eb1df2dbee59b47f76a2042d95475293fed..21edfb7c70ba6204a0cb517f9821e570164ad084 100644 (file)
@@ -91,21 +91,23 @@ HAVE_SENDFILE = @have_sendfile@
 HAVE_GETMNTENT = @have_getmntent@
 HAVE_GETMNTINFO = @have_getmntinfo@
 
+GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
+
 ifeq ($(PKG_PLATFORM),linux)
-PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
 endif
 ifeq ($(PKG_PLATFORM),darwin)
-PCFLAGS = -traditional-cpp
+PCFLAGS = -traditional-cpp $(GCCFLAGS)
 endif
 ifeq ($(PKG_PLATFORM),irix)
 PLDLIBS = -ldisk -lgen
 endif
 ifeq ($(PKG_PLATFORM),freebsd)
 PLDLIBS = -L/usr/local/lib -lintl
-PCFLAGS = -I/usr/local/include
+PCFLAGS = -I/usr/local/include $(GCCFLAGS)
 endif
 
-GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
+GCFLAGS = $(OPTIMIZER) $(DEBUG) \
          -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
          -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
 
index 3003988099fbc8a6f0224e24d38ecd2510d16575..28904e5c1ddd2c3e1adf35fa101c8f7b80034cc3 100644 (file)
@@ -117,6 +117,48 @@ typedef struct xfs_fsop_attrmulti_handlereq {
        struct xfs_attr_multiop         *ops; /* attr_multi data */
 } xfs_fsop_attrmulti_handlereq_t;
 
+/* start doing packed stuctures here */
+#define HAVE_FORMAT32  1
+#pragma pack 1
+typedef struct xfs_inode_log_format_32 {
+       __u16                   ilf_type;       /* inode log item type */
+       __u16                   ilf_size;       /* size of this item */
+       __u32                   ilf_fields;     /* flags for fields logged */
+       __u16                   ilf_asize;      /* size of attr d/ext/root */
+       __u16                   ilf_dsize;      /* size of data/ext/root */
+       __u64                   ilf_ino;        /* inode number */
+       union {
+               __u32           ilfu_rdev;      /* rdev value for dev inode*/
+               uuid_t          ilfu_uuid;      /* mount point value */
+       } ilf_u;
+       __s64                   ilf_blkno;      /* blkno of inode buffer */
+       __s32                   ilf_len;        /* len of inode buffer */
+       __s32                   ilf_boffset;    /* off of inode in buffer */
+} xfs_inode_log_format_32_t;
+
+typedef struct xfs_extent_32 {
+       __u64   ext_start;
+       __u32   ext_len;
+} xfs_extent_32_t;
+
+typedef struct xfs_efi_log_format_32 {
+       __u16                   efi_type;       /* efi log item type */
+       __u16                   efi_size;       /* size of this item */
+       __u32                   efi_nextents;   /* # extents to free */
+       __u64                   efi_id;         /* efi identifier */
+       xfs_extent_32_t         efi_extents[1]; /* array of extents to free */
+} xfs_efi_log_format_32_t;
+
+typedef struct xfs_efd_log_format_32 {
+       __u16                   efd_type;       /* efd log item type */
+       __u16                   efd_size;       /* size of this item */
+       __u32                   efd_nextents;   /* # of extents freed */
+       __u64                   efd_efi_id;     /* id of corresponding efi */
+       xfs_extent_32_t         efd_extents[1]; /* array of extents freed */
+} xfs_efd_log_format_32_t;
+
+#pragma pack 0
+/* end of packed stuctures */
 
 #include <sys/endian.h>
 #define __BYTE_ORDER   BYTE_ORDER
@@ -371,4 +413,6 @@ static __inline__ char * strsep(char **s, const char *ct)
 
 #define        _AIOCB64_T_DEFINED              1
 
+#define        XFS_XFLAG_NODEFRAG              0x00002000
+
 #endif /* __XFS_IRIX_H__ */
index 0ea45edaab033b31ba258b2cc39c3f48634f0d70..2f049f63e85f73ea3ae1763c5eb66e6798368635 100644 (file)
@@ -33,14 +33,16 @@ typedef struct xfs_extent {
  * conversion routine.
  */
 
+#ifndef HAVE_FORMAT32
 typedef struct xfs_extent_32 {
-       xfs_dfsbno_t    ext_start;
-       xfs_extlen_t    ext_len;
+       __uint64_t      ext_start;
+       __uint32_t      ext_len;
 } __attribute__((packed)) xfs_extent_32_t;
+#endif
 
 typedef struct xfs_extent_64 {
-       xfs_dfsbno_t    ext_start;
-       xfs_extlen_t    ext_len;
+       __uint64_t      ext_start;
+       __uint32_t      ext_len;
        __uint32_t      ext_pad;
 } xfs_extent_64_t;
 
@@ -50,25 +52,27 @@ typedef struct xfs_extent_64 {
  * size is given by efi_nextents.
  */
 typedef struct xfs_efi_log_format {
-       unsigned short          efi_type;       /* efi log item type */
-       unsigned short          efi_size;       /* size of this item */
-       uint                    efi_nextents;   /* # extents to free */
+       __uint16_t              efi_type;       /* efi log item type */
+       __uint16_t              efi_size;       /* size of this item */
+       __uint32_t              efi_nextents;   /* # extents to free */
        __uint64_t              efi_id;         /* efi identifier */
        xfs_extent_t            efi_extents[1]; /* array of extents to free */
 } xfs_efi_log_format_t;
 
+#ifndef HAVE_FORMAT32
 typedef struct xfs_efi_log_format_32 {
-       unsigned short          efi_type;       /* efi log item type */
-       unsigned short          efi_size;       /* size of this item */
-       uint                    efi_nextents;   /* # extents to free */
+       __uint16_t              efi_type;       /* efi log item type */
+       __uint16_t              efi_size;       /* size of this item */
+       __uint32_t              efi_nextents;   /* # extents to free */
        __uint64_t              efi_id;         /* efi identifier */
        xfs_extent_32_t         efi_extents[1]; /* array of extents to free */
 } __attribute__((packed)) xfs_efi_log_format_32_t;
+#endif
 
 typedef struct xfs_efi_log_format_64 {
-       unsigned short          efi_type;       /* efi log item type */
-       unsigned short          efi_size;       /* size of this item */
-       uint                    efi_nextents;   /* # extents to free */
+       __uint16_t              efi_type;       /* efi log item type */
+       __uint16_t              efi_size;       /* size of this item */
+       __uint32_t              efi_nextents;   /* # extents to free */
        __uint64_t              efi_id;         /* efi identifier */
        xfs_extent_64_t         efi_extents[1]; /* array of extents to free */
 } xfs_efi_log_format_64_t;
@@ -79,25 +83,27 @@ typedef struct xfs_efi_log_format_64 {
  * size is given by efd_nextents;
  */
 typedef struct xfs_efd_log_format {
-       unsigned short          efd_type;       /* efd log item type */
-       unsigned short          efd_size;       /* size of this item */
-       uint                    efd_nextents;   /* # of extents freed */
+       __uint16_t              efd_type;       /* efd log item type */
+       __uint16_t              efd_size;       /* size of this item */
+       __uint32_t              efd_nextents;   /* # of extents freed */
        __uint64_t              efd_efi_id;     /* id of corresponding efi */
        xfs_extent_t            efd_extents[1]; /* array of extents freed */
 } xfs_efd_log_format_t;
 
+#ifndef HAVE_FORMAT32
 typedef struct xfs_efd_log_format_32 {
-       unsigned short          efd_type;       /* efd log item type */
-       unsigned short          efd_size;       /* size of this item */
-       uint                    efd_nextents;   /* # of extents freed */
+       __uint16_t              efd_type;       /* efd log item type */
+       __uint16_t              efd_size;       /* size of this item */
+       __uint32_t              efd_nextents;   /* # of extents freed */
        __uint64_t              efd_efi_id;     /* id of corresponding efi */
        xfs_extent_32_t         efd_extents[1]; /* array of extents freed */
 } __attribute__((packed)) xfs_efd_log_format_32_t;
+#endif
 
 typedef struct xfs_efd_log_format_64 {
-       unsigned short          efd_type;       /* efd log item type */
-       unsigned short          efd_size;       /* size of this item */
-       uint                    efd_nextents;   /* # of extents freed */
+       __uint16_t              efd_type;       /* efd log item type */
+       __uint16_t              efd_size;       /* size of this item */
+       __uint32_t              efd_nextents;   /* # of extents freed */
        __uint64_t              efd_efi_id;     /* id of corresponding efi */
        xfs_extent_64_t         efd_extents[1]; /* array of extents freed */
 } xfs_efd_log_format_64_t;
index 5db6cd1b4cf3278fec78975c7969492f96d67dde..bfe92ea17952a3764ffe284231ebb87120f38751 100644 (file)
  * must be added on to the end.
  */
 typedef struct xfs_inode_log_format {
-       unsigned short          ilf_type;       /* inode log item type */
-       unsigned short          ilf_size;       /* size of this item */
-       uint                    ilf_fields;     /* flags for fields logged */
-       ushort                  ilf_asize;      /* size of attr d/ext/root */
-       ushort                  ilf_dsize;      /* size of data/ext/root */
-       xfs_ino_t               ilf_ino;        /* inode number */
+       __uint16_t              ilf_type;       /* inode log item type */
+       __uint16_t              ilf_size;       /* size of this item */
+       __uint32_t              ilf_fields;     /* flags for fields logged */
+       __uint16_t              ilf_asize;      /* size of attr d/ext/root */
+       __uint16_t              ilf_dsize;      /* size of data/ext/root */
+       __uint64_t              ilf_ino;        /* inode number */
        union {
-               xfs_dev_t       ilfu_rdev;      /* rdev value for dev inode*/
+               __uint32_t      ilfu_rdev;      /* rdev value for dev inode*/
                uuid_t          ilfu_uuid;      /* mount point value */
        } ilf_u;
        __int64_t               ilf_blkno;      /* blkno of inode buffer */
-       int                     ilf_len;        /* len of inode buffer */
-       int                     ilf_boffset;    /* off of inode in buffer */
+       __int32_t               ilf_len;        /* len of inode buffer */
+       __int32_t               ilf_boffset;    /* off of inode in buffer */
 } xfs_inode_log_format_t;
 
+#ifndef HAVE_FORMAT32
 typedef struct xfs_inode_log_format_32 {
-       unsigned short          ilf_type;       /* 16: inode log item type */
-       unsigned short          ilf_size;       /* 16: size of this item */
-       uint                    ilf_fields;     /* 32: flags for fields logged */
-       ushort                  ilf_asize;      /* 32: size of attr d/ext/root */
-       ushort                  ilf_dsize;      /* 32: size of data/ext/root */
-       xfs_ino_t               ilf_ino;        /* 64: inode number */
+       __uint16_t              ilf_type;       /* inode log item type */
+       __uint16_t              ilf_size;       /* size of this item */
+       __uint32_t              ilf_fields;     /* flags for fields logged */
+       __uint16_t              ilf_asize;      /* size of attr d/ext/root */
+       __uint16_t              ilf_dsize;      /* size of data/ext/root */
+       __uint64_t              ilf_ino;        /* inode number */
        union {
-               xfs_dev_t       ilfu_rdev;      /* 32: rdev value for dev inode*/
-               uuid_t          ilfu_uuid;      /* 128: mount point value */
+               __uint32_t      ilfu_rdev;      /* rdev value for dev inode*/
+               uuid_t          ilfu_uuid;      /* mount point value */
        } ilf_u;
-       __int64_t               ilf_blkno;      /* 64: blkno of inode buffer */
-       int                     ilf_len;        /* 32: len of inode buffer */
-       int                     ilf_boffset;    /* 32: off of inode in buffer */
+       __int64_t               ilf_blkno;      /* blkno of inode buffer */
+       __int32_t               ilf_len;        /* len of inode buffer */
+       __int32_t               ilf_boffset;    /* off of inode in buffer */
 } __attribute__((packed)) xfs_inode_log_format_32_t;
+#endif
 
 typedef struct xfs_inode_log_format_64 {
-       unsigned short          ilf_type;       /* 16: inode log item type */
-       unsigned short          ilf_size;       /* 16: size of this item */
-       uint                    ilf_fields;     /* 32: flags for fields logged */
-       ushort                  ilf_asize;      /* 32: size of attr d/ext/root */
-       ushort                  ilf_dsize;      /* 32: size of data/ext/root */
-       __uint32_t              ilf_pad;        /* 32: pad for 64 bit boundary */
-       xfs_ino_t               ilf_ino;        /* 64: inode number */
+       __uint16_t              ilf_type;       /* inode log item type */
+       __uint16_t              ilf_size;       /* size of this item */
+       __uint32_t              ilf_fields;     /* flags for fields logged */
+       __uint16_t              ilf_asize;      /* size of attr d/ext/root */
+       __uint16_t              ilf_dsize;      /* size of data/ext/root */
+       __uint32_t              ilf_pad;        /* pad for 64 bit boundary */
+       __uint64_t              ilf_ino;        /* inode number */
        union {
-               xfs_dev_t       ilfu_rdev;      /* 32: rdev value for dev inode*/
-               uuid_t          ilfu_uuid;      /* 128: mount point value */
+               __uint32_t      ilfu_rdev;      /* rdev value for dev inode*/
+               uuid_t          ilfu_uuid;      /* mount point value */
        } ilf_u;
-       __int64_t               ilf_blkno;      /* 64: blkno of inode buffer */
-       int                     ilf_len;        /* 32: len of inode buffer */
-       int                     ilf_boffset;    /* 32: off of inode in buffer */
+       __int64_t               ilf_blkno;      /* blkno of inode buffer */
+       __int32_t               ilf_len;        /* len of inode buffer */
+       __int32_t               ilf_boffset;    /* off of inode in buffer */
 } xfs_inode_log_format_64_t;
 
 /*