* Build system revamp, part 1
@ 2012-05-25 7:18 Jan Engelhardt
2012-05-25 7:18 ` [PATCH 1/6] build: rename to configure.ac Jan Engelhardt
` (8 more replies)
0 siblings, 9 replies; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
The following changes since commit a8decaf0cf49d3db099e8dc419390c353e2b19ad:
3.1.8 release (2012-03-20 13:52:15 -0500)
are available in the git repository at:
git://inai.de/xfsprogs master
Jan Engelhardt (6):
build: rename to configure.ac
build: use new autoconf constructs
build: remove home-baked long/ptr size detection
build: use standard type intptr_t
build: use standard type uintptr_t
Update .gitignore
.gitignore | 82 +++++++++++++++++++++---------------------
configure.in => configure.ac | 17 ++++++---
db/bit.c | 8 ++--
db/check.c | 8 ++--
db/field.c | 8 ++--
db/field.h | 6 ++--
include/platform_defs.h.in | 52 +++------------------------
include/xfs_btree.h | 12 +++---
libxfs/xfs_alloc_btree.c | 24 ++++++------
libxfs/xfs_bmap_btree.c | 24 ++++++------
libxfs/xfs_ialloc_btree.c | 24 ++++++------
logprint/log_misc.c | 2 +-
m4/package_types.m4 | 51 --------------------------
repair/agheader.c | 26 +++++++-------
repair/attr_repair.c | 6 ++--
repair/avl.c | 36 +++++++++---------
repair/avl.h | 18 +++++-----
repair/dir.c | 54 ++++++++++++++--------------
repair/dir2.c | 24 ++++++------
repair/incore_ext.c | 27 +++++++-------
repair/incore_ino.c | 10 +++---
repair/phase5.c | 5 ++-
repair/phase6.c | 64 ++++++++++++++++----------------
23 files changed, 251 insertions(+), 337 deletions(-)
rename configure.in => configure.ac (90%)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/6] build: rename to configure.ac
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:36 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 2/6] build: use new autoconf constructs Jan Engelhardt
` (7 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
This is simply the modern recommended name. (As a side note, it also
selects the right syntax coloring because .ac tells more than .in.)
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.in => configure.ac | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename configure.in => configure.ac (100%)
diff --git a/configure.in b/configure.ac
similarity index 100%
rename from configure.in
rename to configure.ac
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/6] build: use new autoconf constructs
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
2012-05-25 7:18 ` [PATCH 1/6] build: rename to configure.ac Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:36 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 3/6] build: remove home-baked long/ptr size detection Jan Engelhardt
` (6 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
Looks like AC_CONFIG_FILES existed since 2.14 already.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.ac | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 664c0e9..c1181f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,8 @@
-AC_INIT(include/libxfs.h)
+AC_INIT([xfsprogs], [3.1.8])
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([include/libxfs.h])
AC_CONFIG_HEADER(include/platform_defs.h)
AC_PREFIX_DEFAULT(/usr)
@@ -116,4 +117,5 @@ AC_TYPE_U32
AC_SIZEOF_POINTERS_AND_LONG
AC_MANUAL_FORMAT
-AC_OUTPUT(include/builddefs)
+AC_CONFIG_FILES([include/builddefs])
+AC_OUTPUT
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/6] build: remove home-baked long/ptr size detection
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
2012-05-25 7:18 ` [PATCH 1/6] build: rename to configure.ac Jan Engelhardt
2012-05-25 7:18 ` [PATCH 2/6] build: use new autoconf constructs Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:37 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 4/6] build: use standard type intptr_t Jan Engelhardt
` (5 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
autoconf can do this for us.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.ac | 3 ++-
include/platform_defs.h.in | 28 ++++++++++------------------
m4/package_types.m4 | 23 -----------------------
3 files changed, 12 insertions(+), 42 deletions(-)
diff --git a/configure.ac b/configure.ac
index c1181f4..e0237ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,10 +111,11 @@ AC_HAVE_FALLOCATE
AC_HAVE_FIEMAP
AC_HAVE_BLKID_TOPO($enable_blkid)
+AC_CHECK_SIZEOF([long])
+AC_CHECK_SIZEOF([char *])
AC_TYPE_PSINT
AC_TYPE_PSUNSIGNED
AC_TYPE_U32
-AC_SIZEOF_POINTERS_AND_LONG
AC_MANUAL_FORMAT
AC_CONFIG_FILES([include/builddefs])
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 0196cc4..4e1e0c4 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -33,6 +33,7 @@
#include <pthread.h>
#include <ctype.h>
#include <sys/types.h>
+#include <limits.h>
#undef HAVE___U32
#ifdef HAVE___U32
@@ -77,26 +78,17 @@ typedef struct filldir filldir_t;
#endif
/* long and pointer must be either 32 bit or 64 bit */
-#undef HAVE_32BIT_LONG
-#undef HAVE_64BIT_LONG
-#undef HAVE_32BIT_PTR
-#undef HAVE_64BIT_PTR
-
-#if defined(HAVE_32BIT_LONG)
-# define BITS_PER_LONG 32
-#elif defined(HAVE_64BIT_LONG)
-# define BITS_PER_LONG 64
-#else
-# error Unknown long size
-#endif
+#undef SIZEOF_LONG
+#undef SIZEOF_CHAR_P
+#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT)
/* Check if __psint_t is set to something meaningful */
#undef HAVE___PSINT_T
#ifndef HAVE___PSINT_T
-# ifdef HAVE_32BIT_PTR
+# if (SIZEOF_CHAR_P * CHAR_BIT) == 32
typedef int __psint_t;
-# elif defined HAVE_64BIT_PTR
-# ifdef HAVE_64BIT_LONG
+# elif (SIZEOF_CHAR_P * CHAR_BIT) == 64
+# if BITS_PER_LONG == 64
typedef long __psint_t;
# else
/* This is a very strange architecture, which has 64 bit pointers but */
@@ -111,10 +103,10 @@ typedef long long __psint_t;
/* Check if __psunsigned_t is set to something meaningful */
#undef HAVE___PSUNSIGNED_T
#ifndef HAVE___PSUNSIGNED_T
-# ifdef HAVE_32BIT_PTR
+# if (SIZEOF_CHAR_P * CHAR_BIT) == 32
typedef unsigned int __psunsigned_t;
-# elif defined HAVE_64BIT_PTR
-# ifdef HAVE_64BIT_LONG
+# elif (SIZEOF_CHAR_P * CHAR_BIT) == 64
+# if BITS_PER_LONG == 64
typedef long __psunsigned_t;
# else
/* This is a very strange architecture, which has 64 bit pointers but */
diff --git a/m4/package_types.m4 b/m4/package_types.m4
index 0a0e087..dfcb0d9 100644
--- a/m4/package_types.m4
+++ b/m4/package_types.m4
@@ -39,26 +39,3 @@ AC_DEFUN([AC_TYPE_U32],
__u32 u32;
], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
])
-
-#
-# Check type sizes
-#
-AC_DEFUN([AC_SIZEOF_POINTERS_AND_LONG],
- [ if test "$cross_compiling" = yes -a -z "$ac_cv_sizeof_long"; then
- AC_MSG_WARN([Cross compiling; assuming 32bit long and 32bit pointers])
- fi
- AC_CHECK_SIZEOF(long, 4)
- AC_CHECK_SIZEOF(char *, 4)
- if test $ac_cv_sizeof_long -eq 4 -o $ac_cv_sizeof_long -eq 0; then
- AC_DEFINE(HAVE_32BIT_LONG)
- fi
- if test $ac_cv_sizeof_long -eq 8; then
- AC_DEFINE(HAVE_64BIT_LONG)
- fi
- if test $ac_cv_sizeof_char_p -eq 4 -o $ac_cv_sizeof_char_p -eq 0; then
- AC_DEFINE(HAVE_32BIT_PTR)
- fi
- if test $ac_cv_sizeof_char_p -eq 8; then
- AC_DEFINE(HAVE_64BIT_PTR)
- fi
- ])
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/6] build: use standard type intptr_t
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (2 preceding siblings ...)
2012-05-25 7:18 ` [PATCH 3/6] build: remove home-baked long/ptr size detection Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:37 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 5/6] build: use standard type uintptr_t Jan Engelhardt
` (4 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
It seems that the four supported platforms have intptr_t support, for
they run with gcc, so rip out __psint_t and the size detection. If it
breaks, speak up, and will devise something.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.ac | 8 ++++-
db/bit.c | 8 +++---
db/check.c | 8 +++---
db/field.c | 8 +++---
db/field.h | 6 ++--
include/platform_defs.h.in | 18 +-----------
libxfs/xfs_alloc_btree.c | 2 +-
libxfs/xfs_bmap_btree.c | 2 +-
libxfs/xfs_ialloc_btree.c | 2 +-
logprint/log_misc.c | 2 +-
m4/package_types.m4 | 28 -------------------
| 26 +++++++++---------
repair/attr_repair.c | 6 ++--
repair/dir.c | 54 ++++++++++++++++++------------------
repair/dir2.c | 24 ++++++++--------
repair/phase5.c | 5 ++-
repair/phase6.c | 64 ++++++++++++++++++++++----------------------
17 files changed, 116 insertions(+), 155 deletions(-)
diff --git a/configure.ac b/configure.ac
index e0237ba..113c47f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,10 +111,14 @@ AC_HAVE_FALLOCATE
AC_HAVE_FIEMAP
AC_HAVE_BLKID_TOPO($enable_blkid)
+AC_CHECK_TYPES([intptr_t, __psint_t, __psunsigned_t], [], [], [
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([char *])
-AC_TYPE_PSINT
-AC_TYPE_PSUNSIGNED
AC_TYPE_U32
AC_MANUAL_FORMAT
diff --git a/db/bit.c b/db/bit.c
index ca57d31..9aecf78 100644
--- a/db/bit.c
+++ b/db/bit.c
@@ -79,24 +79,24 @@ getbitval(
p = (char *)obj + byteize(bitoff);
bit = bitoffs(bitoff);
signext = (flags & BVSIGNED) != 0;
- z4 = ((__psint_t)p & 0xf) == 0 && bit == 0;
+ z4 = ((intptr_t)p & 0xf) == 0 && bit == 0;
if (nbits == 64 && z4)
return be64_to_cpu(*(__be64 *)p);
- z3 = ((__psint_t)p & 0x7) == 0 && bit == 0;
+ z3 = ((intptr_t)p & 0x7) == 0 && bit == 0;
if (nbits == 32 && z3) {
if (signext)
return (__s32)be32_to_cpu(*(__be32 *)p);
else
return (__u32)be32_to_cpu(*(__be32 *)p);
}
- z2 = ((__psint_t)p & 0x3) == 0 && bit == 0;
+ z2 = ((intptr_t)p & 0x3) == 0 && bit == 0;
if (nbits == 16 && z2) {
if (signext)
return (__s16)be16_to_cpu(*(__be16 *)p);
else
return (__u16)be16_to_cpu(*(__be16 *)p);
}
- z1 = ((__psint_t)p & 0x1) == 0 && bit == 0;
+ z1 = ((intptr_t)p & 0x1) == 0 && bit == 0;
if (nbits == 8 && z1) {
if (signext)
return *(__s8 *)p;
diff --git a/db/check.c b/db/check.c
index e601e0a..247400f 100644
--- a/db/check.c
+++ b/db/check.c
@@ -3646,8 +3646,8 @@ process_sf_dir_v2(
sfe = xfs_dir2_sf_firstentry(sf);
offset = XFS_DIR2_DATA_FIRST_OFFSET;
for (i = sf->hdr.count - 1, i8 = 0; i >= 0; i--) {
- if ((__psint_t)sfe + xfs_dir2_sf_entsize_byentry(sf, sfe) -
- (__psint_t)sf > be64_to_cpu(dip->di_size)) {
+ if ((intptr_t)sfe + xfs_dir2_sf_entsize_byentry(sf, sfe) -
+ (intptr_t)sf > be64_to_cpu(dip->di_size)) {
if (!sflag)
dbprintf(_("dir %llu bad size in entry at %d\n"),
id->ino,
@@ -3688,7 +3688,7 @@ process_sf_dir_v2(
xfs_dir2_data_entsize(sfe->namelen);
sfe = xfs_dir2_sf_nextentry(sf, sfe);
}
- if (i < 0 && (__psint_t)sfe - (__psint_t)sf !=
+ if (i < 0 && (intptr_t)sfe - (intptr_t)sf !=
be64_to_cpu(dip->di_size)) {
if (!sflag)
dbprintf(_("dir %llu size is %lld, should be %u\n"),
@@ -3769,7 +3769,7 @@ process_shortform_dir_v1(
sfe->namelen, sfe->namelen, sfe->name, lino);
sfe = xfs_dir_sf_nextentry(sfe);
}
- if ((__psint_t)sfe - (__psint_t)sf != be64_to_cpu(dip->di_size))
+ if ((intptr_t)sfe - (intptr_t)sf != be64_to_cpu(dip->di_size))
dbprintf(_("dir %llu size is %lld, should be %d\n"),
id->ino, be64_to_cpu(dip->di_size),
(int)((char *)sfe - (char *)sf));
diff --git a/db/field.c b/db/field.c
index 6903898..8147df0 100644
--- a/db/field.c
+++ b/db/field.c
@@ -323,10 +323,10 @@ bitoffset(
abase = (f->flags & FLD_ABASE1) != 0;
ASSERT(fa->ftyp == f->ftyp);
ASSERT((fa->arg & FTARG_SIZE) == 0);
- return (int)(__psint_t)f->offset +
+ return (intptr_t)f->offset +
(idx - abase) * fsize(f, obj, startoff, idx);
} else
- return (int)(__psint_t)f->offset;
+ return (intptr_t)f->offset;
} else
return (*f->offset)(obj, startoff, idx);
}
@@ -338,7 +338,7 @@ fcount(
int startoff)
{
if (!(f->flags & FLD_COUNT))
- return (int)(__psint_t)f->count;
+ return (intptr_t)f->count;
else
return (*f->count)(obj, startoff);
}
@@ -371,7 +371,7 @@ fsize(
fa = &ftattrtab[f->ftyp];
ASSERT(fa->ftyp == f->ftyp);
if (!(fa->arg & FTARG_SIZE))
- return (int)(__psint_t)fa->size;
+ return (intptr_t)fa->size;
else
return (*fa->size)(obj, startoff, idx);
}
diff --git a/db/field.h b/db/field.h
index 6962d69..28f5767 100644
--- a/db/field.h
+++ b/db/field.h
@@ -149,10 +149,10 @@ typedef enum fldt {
} fldt_t;
typedef int (*offset_fnc_t)(void *obj, int startoff, int idx);
-#define OI(o) ((offset_fnc_t)(__psint_t)(o))
+#define OI(o) ((offset_fnc_t)(intptr_t)(o))
typedef int (*count_fnc_t)(void *obj, int startoff);
-#define CI(c) ((count_fnc_t)(__psint_t)(c))
+#define CI(c) ((count_fnc_t)(intptr_t)(c))
#define C1 CI(1)
typedef struct field
@@ -175,7 +175,7 @@ typedef struct field
#define FLD_COUNT 16 /* count value is a function pointer */
typedef int (*size_fnc_t)(void *obj, int startoff, int idx);
-#define SI(s) ((size_fnc_t)(__psint_t)(s))
+#define SI(s) ((size_fnc_t)(intptr_t)(s))
typedef struct ftattr
{
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 4e1e0c4..d05e492 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -82,23 +82,7 @@ typedef struct filldir filldir_t;
#undef SIZEOF_CHAR_P
#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT)
-/* Check if __psint_t is set to something meaningful */
-#undef HAVE___PSINT_T
-#ifndef HAVE___PSINT_T
-# if (SIZEOF_CHAR_P * CHAR_BIT) == 32
-typedef int __psint_t;
-# elif (SIZEOF_CHAR_P * CHAR_BIT) == 64
-# if BITS_PER_LONG == 64
-typedef long __psint_t;
-# else
-/* This is a very strange architecture, which has 64 bit pointers but */
-/* not 64 bit longs. So, just punt here and assume long long is OK. */
-typedef long long __psint_t;
-# endif
-# else
-# error Unknown pointer size
-# endif
-#endif
+#undef HAVE_INTPTR_T
/* Check if __psunsigned_t is set to something meaningful */
#undef HAVE___PSUNSIGNED_T
diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
index b782d9d..b292cce 100644
--- a/libxfs/xfs_alloc_btree.c
+++ b/libxfs/xfs_alloc_btree.c
@@ -321,7 +321,7 @@ xfs_allocbt_trace_enter(
__psunsigned_t a9,
__psunsigned_t a10)
{
- ktrace_enter(xfs_allocbt_trace_buf, (void *)(__psint_t)type,
+ ktrace_enter(xfs_allocbt_trace_buf, (void *)(intptr_t)type,
(void *)func, (void *)s, NULL, (void *)cur,
(void *)a0, (void *)a1, (void *)a2, (void *)a3,
(void *)a4, (void *)a5, (void *)a6, (void *)a7,
diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c
index ff51fdd..c24cc2a 100644
--- a/libxfs/xfs_bmap_btree.c
+++ b/libxfs/xfs_bmap_btree.c
@@ -736,7 +736,7 @@ xfs_bmbt_trace_enter(
int whichfork = cur->bc_private.b.whichfork;
ktrace_enter(xfs_bmbt_trace_buf,
- (void *)((__psint_t)type | (whichfork << 8) | (line << 16)),
+ (void *)((intptr_t)type | (whichfork << 8) | (line << 16)),
(void *)func, (void *)s, (void *)ip, (void *)cur,
(void *)a0, (void *)a1, (void *)a2, (void *)a3,
(void *)a4, (void *)a5, (void *)a6, (void *)a7,
diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c
index 35dd96f..5c54f75 100644
--- a/libxfs/xfs_ialloc_btree.c
+++ b/libxfs/xfs_ialloc_btree.c
@@ -207,7 +207,7 @@ xfs_inobt_trace_enter(
__psunsigned_t a9,
__psunsigned_t a10)
{
- ktrace_enter(xfs_inobt_trace_buf, (void *)(__psint_t)type,
+ ktrace_enter(xfs_inobt_trace_buf, (void *)(intptr_t)type,
(void *)func, (void *)s, NULL, (void *)cur,
(void *)a0, (void *)a1, (void *)a2, (void *)a3,
(void *)a4, (void *)a5, (void *)a6, (void *)a7,
diff --git a/logprint/log_misc.c b/logprint/log_misc.c
index e42e108..8392b45 100644
--- a/logprint/log_misc.c
+++ b/logprint/log_misc.c
@@ -873,7 +873,7 @@ xlog_print_record(int fd,
}
} else {
read_len -= *read_type;
- buf = (xfs_caddr_t)((__psint_t)(*partial_buf) + (__psint_t)(*read_type));
+ buf = (xfs_caddr_t)((intptr_t)(*partial_buf) + (intptr_t)(*read_type));
ptr = *partial_buf;
}
if ((ret = (int) read(fd, buf, read_len)) == -1) {
diff --git a/m4/package_types.m4 b/m4/package_types.m4
index dfcb0d9..4a2a90e 100644
--- a/m4/package_types.m4
+++ b/m4/package_types.m4
@@ -1,32 +1,4 @@
#
-# Check if we have a type for the pointer's size integer (__psint_t)
-#
-AC_DEFUN([AC_TYPE_PSINT],
- [ AC_MSG_CHECKING([for __psint_t ])
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stddef.h>
- ], [
- __psint_t psint;
- ], AC_DEFINE(HAVE___PSINT_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
- ])
-
-#
-# Check if we have a type for the pointer's size unsigned (__psunsigned_t)
-#
-AC_DEFUN([AC_TYPE_PSUNSIGNED],
- [ AC_MSG_CHECKING([for __psunsigned_t ])
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stddef.h>
- ], [
- __psunsigned_t psuint;
- ], AC_DEFINE(HAVE___PSUNSIGNED_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
- ])
-
-#
# Check if we have a type for __u32
#
AC_DEFUN([AC_TYPE_U32],
--git a/repair/agheader.c b/repair/agheader.c
index 769022d..957a499 100644
--- a/repair/agheader.c
+++ b/repair/agheader.c
@@ -241,22 +241,22 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
* gets rev'ed again with new fields appended.
*/
if (xfs_sb_version_hasmorebits(sb))
- size = (__psint_t)&sb->sb_features2
- + sizeof(sb->sb_features2) - (__psint_t)sb;
+ size = (intptr_t)&sb->sb_features2
+ + sizeof(sb->sb_features2) - (intptr_t)sb;
else if (xfs_sb_version_haslogv2(sb))
- size = (__psint_t)&sb->sb_logsunit
- + sizeof(sb->sb_logsunit) - (__psint_t)sb;
+ size = (intptr_t)&sb->sb_logsunit
+ + sizeof(sb->sb_logsunit) - (intptr_t)sb;
else if (xfs_sb_version_hassector(sb))
- size = (__psint_t)&sb->sb_logsectsize
- + sizeof(sb->sb_logsectsize) - (__psint_t)sb;
+ size = (intptr_t)&sb->sb_logsectsize
+ + sizeof(sb->sb_logsectsize) - (intptr_t)sb;
else if (xfs_sb_version_hasdirv2(sb))
- size = (__psint_t)&sb->sb_dirblklog
- + sizeof(sb->sb_dirblklog) - (__psint_t)sb;
+ size = (intptr_t)&sb->sb_dirblklog
+ + sizeof(sb->sb_dirblklog) - (intptr_t)sb;
else
- size = (__psint_t)&sb->sb_width
- + sizeof(sb->sb_width) - (__psint_t)sb;
- for (ip = (char *)((__psint_t)sb + size);
- ip < (char *)((__psint_t)sb + mp->m_sb.sb_sectsize);
+ size = (intptr_t)&sb->sb_width
+ + sizeof(sb->sb_width) - (intptr_t)sb;
+ for (ip = (char *)((intptr_t)sb + size);
+ ip < (char *)((intptr_t)sb + mp->m_sb.sb_sectsize);
ip++) {
if (*ip) {
do_bzero = 1;
@@ -270,7 +270,7 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
do_warn(
_("zeroing unused portion of %s superblock (AG #%u)\n"),
!i ? _("primary") : _("secondary"), i);
- memset((void *)((__psint_t)sb + size), 0,
+ memset((void *)((intptr_t)sb + size), 0,
mp->m_sb.sb_sectsize - size);
} else
do_warn(
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index bab65b1..4ec716c 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -265,7 +265,7 @@ process_shortform_attr(
_("removing attribute entry %d for inode %" PRIu64 "\n"),
i, ino);
tempentry = (xfs_attr_sf_entry_t *)
- ((__psint_t) currententry +
+ ((intptr_t)currententry +
XFS_ATTR_SF_ENTSIZE(currententry));
memmove(currententry,tempentry,remainingspace);
asf->hdr.count -= 1;
@@ -280,7 +280,7 @@ process_shortform_attr(
}
/* Let's get ready for the next entry... */
- nextentry = (xfs_attr_sf_entry_t *)((__psint_t) nextentry +
+ nextentry = (xfs_attr_sf_entry_t *)((intptr_t)nextentry +
XFS_ATTR_SF_ENTSIZE(currententry));
currentsize = currentsize + XFS_ATTR_SF_ENTSIZE(currententry);
@@ -538,7 +538,7 @@ process_leaf_attr_block(
}
/* mark the entry used */
- start = (__psint_t)&leaf->entries[i] - (__psint_t)leaf;
+ start = (intptr_t)&leaf->entries[i] - (intptr_t)leaf;
stop = start + sizeof(xfs_attr_leaf_entry_t);
if (set_da_freemap(mp, attr_freemap, start, stop)) {
do_warn(
diff --git a/repair/dir.c b/repair/dir.c
index 01c8f10..cbcd4ea 100644
--- a/repair/dir.c
+++ b/repair/dir.c
@@ -124,7 +124,7 @@ process_shortform_dir(
*/
sf_entry = next_sfe = &sf->list[0];
for (i = 0; i < num_entries && ino_dir_size >
- (__psint_t)next_sfe - (__psint_t)sf; i++) {
+ (intptr_t)next_sfe - (intptr_t)sf; i++) {
tmp_sfe = NULL;
sf_entry = next_sfe;
junkit = 0;
@@ -229,8 +229,8 @@ process_shortform_dir(
if (i == num_entries - 1) {
namelen = ino_dir_size -
- ((__psint_t) &sf_entry->name[0] -
- (__psint_t) sf);
+ ((intptr_t)&sf_entry->name[0] -
+ (intptr_t)sf);
if (!no_modify) {
do_warn(
_("zero length entry in shortform dir %" PRIu64 ", resetting to %d\n"),
@@ -257,15 +257,15 @@ process_shortform_dir(
*/
break;
}
- } else if ((__psint_t) sf_entry - (__psint_t) sf +
+ } else if ((intptr_t)sf_entry - (intptr_t)sf +
+ xfs_dir_sf_entsize_byentry(sf_entry)
> ino_dir_size) {
bad_sfnamelen = 1;
if (i == num_entries - 1) {
namelen = ino_dir_size -
- ((__psint_t) &sf_entry->name[0] -
- (__psint_t) sf);
+ ((intptr_t)&sf_entry->name[0] -
+ (intptr_t)sf);
do_warn(
_("size of last entry overflows space left in in shortform dir %" PRIu64 ", "),
ino);
@@ -342,15 +342,15 @@ process_shortform_dir(
ino_dir_size -= tmp_elen;
tmp_sfe = (xfs_dir_sf_entry_t *)
- ((__psint_t) sf_entry + tmp_elen);
- tmp_len = max_size - ((__psint_t) tmp_sfe
- - (__psint_t) sf);
+ ((intptr_t)sf_entry + tmp_elen);
+ tmp_len = max_size - ((intptr_t)tmp_sfe
+ - (intptr_t)sf);
memmove(sf_entry, tmp_sfe, tmp_len);
sf->hdr.count -= 1;
num_entries--;
- memset((void *)((__psint_t)sf_entry + tmp_len),
+ memset((void *)((intptr_t)sf_entry + tmp_len),
0, tmp_elen);
/*
@@ -388,7 +388,7 @@ process_shortform_dir(
* calculate size based on next_sfe.
*/
next_sfe = (tmp_sfe == NULL)
- ? (xfs_dir_sf_entry_t *) ((__psint_t) sf_entry
+ ? (xfs_dir_sf_entry_t *) ((intptr_t)sf_entry
+ ((!bad_sfnamelen)
? xfs_dir_sf_entsize_byentry(sf_entry)
: sizeof(xfs_dir_sf_entry_t) - 1
@@ -413,20 +413,20 @@ process_shortform_dir(
}
}
- if ((__psint_t) next_sfe - (__psint_t) sf != ino_dir_size) {
+ if ((intptr_t)next_sfe - (intptr_t)sf != ino_dir_size) {
if (no_modify) {
do_warn(
_("would have corrected directory %" PRIu64 " size from %" PRId64 "to %" PRIdPTR "\n"),
ino, ino_dir_size,
- (intptr_t)next_sfe - (intptr_t )sf);
+ (intptr_t)next_sfe - (intptr_t)sf);
} else {
do_warn(
_("corrected directory %" PRIu64 " size, was %" PRId64 ", now %" PRIdPTR "\n"),
ino, ino_dir_size,
(intptr_t)next_sfe - (intptr_t)sf);
- dip->di_size = cpu_to_be64((__psint_t)next_sfe
- - (__psint_t)sf);
+ dip->di_size = cpu_to_be64((intptr_t)next_sfe
+ - (intptr_t)sf);
*dino_dirty = 1;
*repair = 1;
}
@@ -1393,7 +1393,7 @@ _("nameidx %d for entry #%d, bno %d, ino %" PRIu64 " > fs blocksize, deleting en
memmove(entry, entry + 1,
bytes);
memset((void *)
- ((__psint_t) entry + bytes), 0,
+ ((intptr_t)entry + bytes), 0,
sizeof(xfs_dir_leaf_entry_t));
} else {
memset(entry, 0,
@@ -1625,7 +1625,7 @@ _("entry references free inode %" PRIu64 " in directory %" PRIu64 ", would clear
*/
if (bytes > sizeof(xfs_dir_leaf_entry_t)) {
memmove(entry, entry + 1, bytes);
- memset((void *)((__psint_t) entry +
+ memset((void *)((intptr_t)entry +
bytes), 0,
sizeof(xfs_dir_leaf_entry_t));
} else {
@@ -1667,7 +1667,7 @@ _("bad size, entry #%d in dir inode %" PRIu64 ", block %u -- entry overflows blo
goto out;
}
- start = (__psint_t)&leaf->entries[i] - (__psint_t)leaf;;
+ start = (intptr_t)&leaf->entries[i] - (intptr_t)leaf;
stop = start + sizeof(xfs_dir_leaf_entry_t);
if (set_da_freemap(mp, dir_freemap, start, stop)) {
@@ -2084,7 +2084,7 @@ _("- existing hole info for block %d, dir inode %" PRIu64 " (base, size) - \n"),
num_entries = 0;
first_used = XFS_LBSIZE(mp);
first_byte = (char *) new_leaf
- + (__psint_t) XFS_LBSIZE(mp);
+ + (intptr_t)XFS_LBSIZE(mp);
/*
* copy entry table and pack names starting from the end
@@ -2103,9 +2103,9 @@ _("- existing hole info for block %d, dir inode %" PRIu64 " (base, size) - \n"),
bytes = sizeof(xfs_dir_leaf_name_t)
+ s_entry->namelen - 1;
- if ((__psint_t) first_byte - bytes <
+ if ((intptr_t)first_byte - bytes <
sizeof(xfs_dir_leaf_entry_t)
- + (__psint_t) d_entry) {
+ + (intptr_t)d_entry) {
do_warn(
_("not enough space in block %u of dir inode %" PRIu64 " for all entries\n"),
da_bno, ino);
@@ -2134,8 +2134,8 @@ _("- existing hole info for block %d, dir inode %" PRIu64 " (base, size) - \n"),
/*
* zero space between end of table and top of heap
*/
- memset(d_entry, 0, (__psint_t) first_byte
- - (__psint_t) d_entry);
+ memset(d_entry, 0, (intptr_t)first_byte
+ - (intptr_t)d_entry);
/*
* reset header info
@@ -2148,14 +2148,14 @@ _("- existing hole info for block %d, dir inode %" PRIu64 " (base, size) - \n"),
new_leaf->hdr.pad1 = 0;
new_leaf->hdr.freemap[0].base = cpu_to_be16(
- (__psint_t) d_entry - (__psint_t) new_leaf);
+ (intptr_t)d_entry - (intptr_t)new_leaf);
new_leaf->hdr.freemap[0].size = cpu_to_be16(
- (__psint_t) first_byte - (__psint_t) d_entry);
+ (intptr_t)first_byte - (intptr_t)d_entry);
ASSERT(be16_to_cpu(new_leaf->hdr.freemap[0].base) < first_used);
ASSERT(be16_to_cpu(new_leaf->hdr.freemap[0].base) ==
- (__psint_t) (&new_leaf->entries[0])
- - (__psint_t) new_leaf
+ (intptr_t)(&new_leaf->entries[0])
+ - (intptr_t)new_leaf
+ i * sizeof(xfs_dir_leaf_entry_t));
ASSERT(be16_to_cpu(new_leaf->hdr.freemap[0].base) < XFS_LBSIZE(mp));
ASSERT(be16_to_cpu(new_leaf->hdr.freemap[0].size) < XFS_LBSIZE(mp));
diff --git a/repair/dir2.c b/repair/dir2.c
index f9562d7..3d5e1eb 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -776,7 +776,7 @@ process_sf_dir2_fixi8(
int oldsize;
newsfp = sfp;
- oldsize = (__psint_t)*next_sfep - (__psint_t)sfp;
+ oldsize = (intptr_t)*next_sfep - (intptr_t)sfp;
oldsfp = malloc(oldsize);
if (oldsfp == NULL) {
do_error(_("couldn't malloc dir2 shortform copy\n"));
@@ -988,8 +988,8 @@ _("entry \"%*.*s\" in shortform directory %" PRIu64 " references %s inode %" PRI
if (i == num_entries - 1) {
namelen = ino_dir_size -
- ((__psint_t) &sfep->name[0] -
- (__psint_t) sfp);
+ ((intptr_t)&sfep->name[0] -
+ (intptr_t)sfp);
if (!no_modify) {
do_warn(
_("zero length entry in shortform dir %" PRIu64 ", resetting to %d\n"),
@@ -1016,15 +1016,15 @@ _("zero length entry in shortform dir %" PRIu64 ""),
*/
break;
}
- } else if ((__psint_t) sfep - (__psint_t) sfp +
+ } else if ((intptr_t)sfep - (intptr_t)sfp +
xfs_dir2_sf_entsize_byentry(sfp, sfep)
> ino_dir_size) {
bad_sfnamelen = 1;
if (i == num_entries - 1) {
namelen = ino_dir_size -
- ((__psint_t) &sfep->name[0] -
- (__psint_t) sfp);
+ ((intptr_t)&sfep->name[0] -
+ (intptr_t)sfp);
do_warn(
_("size of last entry overflows space left in in shortform dir %" PRIu64 ", "),
ino);
@@ -1111,15 +1111,15 @@ _("entry contains offset out of order in shortform dir %" PRIu64 "\n"),
ino_dir_size -= tmp_elen;
tmp_sfep = (xfs_dir2_sf_entry_t *)
- ((__psint_t) sfep + tmp_elen);
- tmp_len = max_size - ((__psint_t) tmp_sfep
- - (__psint_t) sfp);
+ ((intptr_t)sfep + tmp_elen);
+ tmp_len = max_size - ((intptr_t)tmp_sfep
+ - (intptr_t)sfp);
memmove(sfep, tmp_sfep, tmp_len);
sfp->hdr.count -= 1;
num_entries--;
- memset((void *) ((__psint_t) sfep + tmp_len), 0,
+ memset((void *) ((intptr_t)sfep + tmp_len), 0,
tmp_elen);
/*
@@ -1157,7 +1157,7 @@ _("would have junked entry \"%s\" in directory inode %" PRIu64 "\n"),
* calculate size based on next_sfep.
*/
next_sfep = (tmp_sfep == NULL)
- ? (xfs_dir2_sf_entry_t *) ((__psint_t) sfep
+ ? (xfs_dir2_sf_entry_t *) ((intptr_t)sfep
+ ((!bad_sfnamelen)
? xfs_dir2_sf_entsize_byentry(sfp,
sfep)
@@ -1214,7 +1214,7 @@ _("corrected directory %" PRIu64 " size, was %" PRId64 ", now %" PRIdPTR "\n"),
(intptr_t)next_sfep - (intptr_t)sfp);
dip->di_size = cpu_to_be64(
- (__psint_t)next_sfep - (__psint_t)sfp);
+ (intptr_t)next_sfep - (intptr_t)sfp);
*dino_dirty = 1;
*repair = 1;
}
diff --git a/repair/phase5.c b/repair/phase5.c
index 7d5cd49..1dc0e47 100644
--- a/repair/phase5.c
+++ b/repair/phase5.c
@@ -1216,8 +1216,9 @@ build_agf_agfl(xfs_mount_t *mp,
memset(agf, 0, mp->m_sb.sb_sectsize);
#ifdef XR_BLD_FREE_TRACE
- fprintf(stderr, "agf = 0x%x, agf_buf->b_un.b_addr = 0x%x\n",
- (__psint_t) agf, (__psint_t) agf_buf->b_un.b_addr);
+ fprintf(stderr, "agf = 0x%lx, agf_buf->b_un.b_addr = 0x%lx\n",
+ (unsigned long)(intptr_t)agf,
+ (unsigned long)(intptr_t)agf_buf->b_un.b_addr);
#endif
/*
diff --git a/repair/phase6.c b/repair/phase6.c
index cbe0b35..c4b52cc 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -568,7 +568,7 @@ _("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime bitmap inode %
libxfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1);
- bmp = (xfs_rtword_t *)((__psint_t) bmp + mp->m_sb.sb_blocksize);
+ bmp = (xfs_rtword_t *)((intptr_t)bmp + mp->m_sb.sb_blocksize);
bno++;
}
@@ -637,7 +637,7 @@ _("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime summary inode
libxfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1);
- smp = (xfs_suminfo_t *)((__psint_t)smp + mp->m_sb.sb_blocksize);
+ smp = (xfs_suminfo_t *)((intptr_t)smp + mp->m_sb.sb_blocksize);
bno++;
}
@@ -2642,7 +2642,7 @@ shortform_dir_entry_check(xfs_mount_t *mp,
}
else {
for (i = 0; i < sf->hdr.count && max_size >
- (__psint_t)next_sfe - (__psint_t)sf;
+ (intptr_t)next_sfe - (intptr_t)sf;
sf_entry = next_sfe, i++) {
junkit = 0;
bad_sfnamelen = 0;
@@ -2667,8 +2667,8 @@ shortform_dir_entry_check(xfs_mount_t *mp,
if (i == sf->hdr.count - 1) {
namelen = ip->i_d.di_size -
- ((__psint_t) &sf_entry->name[0] -
- (__psint_t) sf);
+ ((intptr_t)&sf_entry->name[0] -
+ (intptr_t)sf);
} else {
/*
* don't process the rest of the directory,
@@ -2676,15 +2676,15 @@ shortform_dir_entry_check(xfs_mount_t *mp,
*/
break;
}
- } else if (no_modify && (__psint_t) sf_entry - (__psint_t) sf +
+ } else if (no_modify && (intptr_t)sf_entry - (intptr_t)sf +
+ xfs_dir_sf_entsize_byentry(sf_entry)
> ip->i_d.di_size) {
bad_sfnamelen = 1;
if (i == sf->hdr.count - 1) {
namelen = ip->i_d.di_size -
- ((__psint_t) &sf_entry->name[0] -
- (__psint_t) sf);
+ ((intptr_t)&sf_entry->name[0] -
+ (intptr_t)sf);
} else {
/*
* don't process the rest of the directory,
@@ -2759,7 +2759,7 @@ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
*/
add_inode_reached(irec, ino_offset);
- next_sfe = (xfs_dir_sf_entry_t *)((__psint_t)sf_entry +
+ next_sfe = (xfs_dir_sf_entry_t *)((intptr_t)sf_entry +
xfs_dir_sf_entsize_byentry(sf_entry));
continue;
} else {
@@ -2801,16 +2801,16 @@ do_junkit:
if (!no_modify) {
tmp_elen = xfs_dir_sf_entsize_byentry(sf_entry);
tmp_sfe = (xfs_dir_sf_entry_t *)
- ((__psint_t) sf_entry + tmp_elen);
- tmp_len = max_size - ((__psint_t) tmp_sfe
- - (__psint_t) sf);
+ ((intptr_t)sf_entry + tmp_elen);
+ tmp_len = max_size - ((intptr_t)tmp_sfe
+ - (intptr_t)sf);
max_size -= tmp_elen;
bytes_deleted += tmp_elen;
memmove(sf_entry, tmp_sfe, tmp_len);
sf->hdr.count -= 1;
- memset((void *)((__psint_t)sf_entry + tmp_len),
+ memset((void *)((intptr_t)sf_entry + tmp_len),
0, tmp_elen);
/*
@@ -2848,7 +2848,7 @@ do_junkit:
ASSERT(no_modify || bad_sfnamelen == 0);
next_sfe = (tmp_sfe == NULL)
- ? (xfs_dir_sf_entry_t *) ((__psint_t) sf_entry
+ ? (xfs_dir_sf_entry_t *) ((intptr_t)sf_entry
+ ((!bad_sfnamelen)
? xfs_dir_sf_entsize_byentry(sf_entry)
: sizeof(xfs_dir_sf_entry_t) - 1
@@ -2869,9 +2869,9 @@ do_junkit:
if (ip->i_d.di_size != ip->i_df.if_bytes) {
ASSERT(ip->i_df.if_bytes == (xfs_fsize_t)
- ((__psint_t) next_sfe - (__psint_t) sf));
+ ((intptr_t)next_sfe - (intptr_t)sf));
ip->i_d.di_size = (xfs_fsize_t)
- ((__psint_t) next_sfe - (__psint_t) sf);
+ ((intptr_t)next_sfe - (intptr_t)sf);
do_warn(
_("setting size to %" PRId64 " bytes to reflect junked entries\n"),
ip->i_d.di_size);
@@ -2959,7 +2959,7 @@ shortform_dir2_entry_check(xfs_mount_t *mp,
sfep = next_sfep = xfs_dir2_sf_firstentry(sfp);
for (i = 0; i < sfp->hdr.count && max_size >
- (__psint_t)next_sfep - (__psint_t)sfp;
+ (intptr_t)next_sfep - (intptr_t)sfp;
sfep = next_sfep, i++) {
junkit = 0;
bad_sfnamelen = 0;
@@ -2984,8 +2984,8 @@ shortform_dir2_entry_check(xfs_mount_t *mp,
if (i == sfp->hdr.count - 1) {
namelen = ip->i_d.di_size -
- ((__psint_t) &sfep->name[0] -
- (__psint_t) sfp);
+ ((intptr_t)&sfep->name[0] -
+ (intptr_t)sfp);
} else {
/*
* don't process the rest of the directory,
@@ -2993,15 +2993,15 @@ shortform_dir2_entry_check(xfs_mount_t *mp,
*/
break;
}
- } else if (no_modify && (__psint_t) sfep - (__psint_t) sfp +
+ } else if (no_modify && (intptr_t)sfep - (intptr_t)sfp +
+ xfs_dir2_sf_entsize_byentry(sfp, sfep)
> ip->i_d.di_size) {
bad_sfnamelen = 1;
if (i == sfp->hdr.count - 1) {
namelen = ip->i_d.di_size -
- ((__psint_t) &sfep->name[0] -
- (__psint_t) sfp);
+ ((intptr_t)&sfep->name[0] -
+ (intptr_t)sfp);
} else {
/*
* don't process the rest of the directory,
@@ -3023,7 +3023,7 @@ shortform_dir2_entry_check(xfs_mount_t *mp,
*/
if (no_modify && verify_inum(mp, lino)) {
- next_sfep = (xfs_dir2_sf_entry_t *)((__psint_t)sfep +
+ next_sfep = (xfs_dir2_sf_entry_t *)((intptr_t)sfep +
xfs_dir2_sf_entsize_byentry(sfp, sfep));
continue;
}
@@ -3134,16 +3134,16 @@ do_junkit:
if (!no_modify) {
tmp_elen = xfs_dir2_sf_entsize_byentry(sfp, sfep);
tmp_sfep = (xfs_dir2_sf_entry_t *)
- ((__psint_t) sfep + tmp_elen);
- tmp_len = max_size - ((__psint_t) tmp_sfep
- - (__psint_t) sfp);
+ ((intptr_t)sfep + tmp_elen);
+ tmp_len = max_size - ((intptr_t)tmp_sfep
+ - (intptr_t)sfp);
max_size -= tmp_elen;
bytes_deleted += tmp_elen;
memmove(sfep, tmp_sfep, tmp_len);
sfp->hdr.count -= 1;
- memset((void *)((__psint_t)sfep + tmp_len), 0,
+ memset((void *)((intptr_t)sfep + tmp_len), 0,
tmp_elen);
/*
@@ -3182,7 +3182,7 @@ do_junkit:
ASSERT(no_modify || bad_sfnamelen == 0);
next_sfep = (tmp_sfep == NULL)
- ? (xfs_dir2_sf_entry_t *) ((__psint_t) sfep
+ ? (xfs_dir2_sf_entry_t *) ((intptr_t)sfep
+ ((!bad_sfnamelen)
? xfs_dir2_sf_entsize_byentry(sfp, sfep)
: xfs_dir2_sf_entsize_byname(sfp, namelen)))
@@ -3198,8 +3198,8 @@ do_junkit:
tmp_sfep = next_sfep;
process_sf_dir2_fixi8(sfp, &tmp_sfep);
bytes_deleted +=
- (__psint_t)next_sfep -
- (__psint_t)tmp_sfep;
+ (intptr_t)next_sfep -
+ (intptr_t)tmp_sfep;
next_sfep = tmp_sfep;
} else
sfp->hdr.i8count = i8;
@@ -3221,9 +3221,9 @@ do_junkit:
if (ip->i_d.di_size != ip->i_df.if_bytes) {
ASSERT(ip->i_df.if_bytes == (xfs_fsize_t)
- ((__psint_t) next_sfep - (__psint_t) sfp));
+ ((intptr_t)next_sfep - (intptr_t)sfp));
ip->i_d.di_size = (xfs_fsize_t)
- ((__psint_t) next_sfep - (__psint_t) sfp);
+ ((intptr_t)next_sfep - (intptr_t)sfp);
do_warn(
_("setting size to %" PRId64 " bytes to reflect junked entries\n"),
ip->i_d.di_size);
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 5/6] build: use standard type uintptr_t
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (3 preceding siblings ...)
2012-05-25 7:18 ` [PATCH 4/6] build: use standard type intptr_t Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:38 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 6/6] Update .gitignore Jan Engelhardt
` (3 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
Same as prior commit, but for __psunsigned_t.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
include/platform_defs.h.in | 18 ------------------
include/xfs_btree.h | 12 ++++++------
libxfs/xfs_alloc_btree.c | 22 +++++++++++-----------
libxfs/xfs_bmap_btree.c | 22 +++++++++++-----------
libxfs/xfs_ialloc_btree.c | 22 +++++++++++-----------
repair/avl.c | 36 ++++++++++++++++++------------------
repair/avl.h | 18 +++++++++---------
repair/incore_ext.c | 27 +++++++++++++--------------
repair/incore_ino.c | 10 +++++-----
9 files changed, 84 insertions(+), 103 deletions(-)
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index d05e492..9101cca 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -84,24 +84,6 @@ typedef struct filldir filldir_t;
#undef HAVE_INTPTR_T
-/* Check if __psunsigned_t is set to something meaningful */
-#undef HAVE___PSUNSIGNED_T
-#ifndef HAVE___PSUNSIGNED_T
-# if (SIZEOF_CHAR_P * CHAR_BIT) == 32
-typedef unsigned int __psunsigned_t;
-# elif (SIZEOF_CHAR_P * CHAR_BIT) == 64
-# if BITS_PER_LONG == 64
-typedef long __psunsigned_t;
-# else
-/* This is a very strange architecture, which has 64 bit pointers but */
-/* not 64 bit longs. So, just punt here and assume long long is OK. */
-typedef unsigned long long __psunsigned_t;
-# endif
-# else
-# error Unknown pointer size
-# endif
-#endif
-
/* Define if you want gettext (I18N) support */
#undef ENABLE_GETTEXT
#ifdef ENABLE_GETTEXT
diff --git a/include/xfs_btree.h b/include/xfs_btree.h
index 82fafc6..43b1641 100644
--- a/include/xfs_btree.h
+++ b/include/xfs_btree.h
@@ -203,12 +203,12 @@ struct xfs_btree_ops {
/* btree tracing */
#ifdef XFS_BTREE_TRACE
void (*trace_enter)(struct xfs_btree_cur *, const char *,
- char *, int, int, __psunsigned_t,
- __psunsigned_t, __psunsigned_t,
- __psunsigned_t, __psunsigned_t,
- __psunsigned_t, __psunsigned_t,
- __psunsigned_t, __psunsigned_t,
- __psunsigned_t, __psunsigned_t);
+ char *, int, int, uintptr_t,
+ uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t);
void (*trace_cursor)(struct xfs_btree_cur *, __uint32_t *,
__uint64_t *, __uint64_t *);
void (*trace_key)(struct xfs_btree_cur *,
diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
index b292cce..c250bab 100644
--- a/libxfs/xfs_alloc_btree.c
+++ b/libxfs/xfs_alloc_btree.c
@@ -309,17 +309,17 @@ xfs_allocbt_trace_enter(
char *s,
int type,
int line,
- __psunsigned_t a0,
- __psunsigned_t a1,
- __psunsigned_t a2,
- __psunsigned_t a3,
- __psunsigned_t a4,
- __psunsigned_t a5,
- __psunsigned_t a6,
- __psunsigned_t a7,
- __psunsigned_t a8,
- __psunsigned_t a9,
- __psunsigned_t a10)
+ uintptr_t a0,
+ uintptr_t a1,
+ uintptr_t a2,
+ uintptr_t a3,
+ uintptr_t a4,
+ uintptr_t a5,
+ uintptr_t a6,
+ uintptr_t a7,
+ uintptr_t a8,
+ uintptr_t a9,
+ uintptr_t a10)
{
ktrace_enter(xfs_allocbt_trace_buf, (void *)(intptr_t)type,
(void *)func, (void *)s, NULL, (void *)cur,
diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c
index c24cc2a..fad8416 100644
--- a/libxfs/xfs_bmap_btree.c
+++ b/libxfs/xfs_bmap_btree.c
@@ -720,17 +720,17 @@ xfs_bmbt_trace_enter(
char *s,
int type,
int line,
- __psunsigned_t a0,
- __psunsigned_t a1,
- __psunsigned_t a2,
- __psunsigned_t a3,
- __psunsigned_t a4,
- __psunsigned_t a5,
- __psunsigned_t a6,
- __psunsigned_t a7,
- __psunsigned_t a8,
- __psunsigned_t a9,
- __psunsigned_t a10)
+ uintptr_t a0,
+ uintptr_t a1,
+ uintptr_t a2,
+ uintptr_t a3,
+ uintptr_t a4,
+ uintptr_t a5,
+ uintptr_t a6,
+ uintptr_t a7,
+ uintptr_t a8,
+ uintptr_t a9,
+ uintptr_t a10)
{
struct xfs_inode *ip = cur->bc_private.b.ip;
int whichfork = cur->bc_private.b.whichfork;
diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c
index 5c54f75..43611a0 100644
--- a/libxfs/xfs_ialloc_btree.c
+++ b/libxfs/xfs_ialloc_btree.c
@@ -195,17 +195,17 @@ xfs_inobt_trace_enter(
char *s,
int type,
int line,
- __psunsigned_t a0,
- __psunsigned_t a1,
- __psunsigned_t a2,
- __psunsigned_t a3,
- __psunsigned_t a4,
- __psunsigned_t a5,
- __psunsigned_t a6,
- __psunsigned_t a7,
- __psunsigned_t a8,
- __psunsigned_t a9,
- __psunsigned_t a10)
+ uintptr_t a0,
+ uintptr_t a1,
+ uintptr_t a2,
+ uintptr_t a3,
+ uintptr_t a4,
+ uintptr_t a5,
+ uintptr_t a6,
+ uintptr_t a7,
+ uintptr_t a8,
+ uintptr_t a9,
+ uintptr_t a10)
{
ktrace_enter(xfs_inobt_trace_buf, (void *)(intptr_t)type,
(void *)func, (void *)s, NULL, (void *)cur,
diff --git a/repair/avl.c b/repair/avl.c
index eabecc3..88f4c44 100644
--- a/repair/avl.c
+++ b/repair/avl.c
@@ -69,8 +69,8 @@ avl_checktree(
register avlnode_t *root)
{
register avlnode_t *nlast, *nnext, *np;
- __psunsigned_t offset = 0;
- __psunsigned_t end;
+ uintptr_t offset = 0;
+ uintptr_t end;
nlast = nnext = root;
@@ -589,8 +589,8 @@ attach:
avlnode_t *
avl_findanyrange(
register avltree_desc_t *tree,
- register __psunsigned_t start,
- register __psunsigned_t end,
+ register uintptr_t start,
+ register uintptr_t end,
int checklen)
{
register avlnode_t *np = tree->avl_root;
@@ -660,10 +660,10 @@ avl_findanyrange(
avlnode_t *
avl_find(
register avltree_desc_t *tree,
- register __psunsigned_t value)
+ register uintptr_t value)
{
register avlnode_t *np = tree->avl_root;
- register __psunsigned_t nvalue;
+ register uintptr_t nvalue;
while (np) {
nvalue = AVL_START(tree, np);
@@ -887,8 +887,8 @@ static
avlnode_t *
avl_insert_find_growth(
register avltree_desc_t *tree,
- register __psunsigned_t start, /* range start at start, */
- register __psunsigned_t end, /* exclusive */
+ register uintptr_t start, /* range start at start, */
+ register uintptr_t end, /* exclusive */
register int *growthp) /* OUT */
{
avlnode_t *root = tree->avl_root;
@@ -941,7 +941,7 @@ avl_insert_grow(
register int growth)
{
register avlnode_t *nnext;
- register __psunsigned_t start = AVL_START(tree, newnode);
+ register uintptr_t start = AVL_START(tree, newnode);
if (growth == AVL_BACK) {
@@ -983,8 +983,8 @@ avl_insert(
register avlnode_t *newnode)
{
register avlnode_t *np;
- register __psunsigned_t start = AVL_START(tree, newnode);
- register __psunsigned_t end = AVL_END(tree, newnode);
+ register uintptr_t start = AVL_START(tree, newnode);
+ register uintptr_t end = AVL_END(tree, newnode);
int growth;
ASSERT(newnode);
@@ -1138,16 +1138,16 @@ avlops_t avl_debug_ops = {
avl_debug_end,
}
-static __psunsigned_t
+static uintptr_t
avl_debug_start(avlnode_t *node)
{
- return (__psunsigned_t)(struct avl_debug_node *)node->avl_start;
+ return (uintptr_t)(struct avl_debug_node *)node->avl_start;
}
-static __psunsigned_t
+static uintptr_t
avl_debug_end(avlnode_t *node)
{
- return (__psunsigned_t)
+ return (uintptr_t)
((struct avl_debug_node *)node->avl_start +
(struct avl_debug_node *)node->avl_size);
}
@@ -1283,7 +1283,7 @@ main()
avlnode_t *
avl_findadjacent(
register avltree_desc_t *tree,
- register __psunsigned_t value,
+ register uintptr_t value,
register int dir)
{
register avlnode_t *np = tree->avl_root;
@@ -1357,8 +1357,8 @@ avl_findadjacent(
void
avl_findranges(
register avltree_desc_t *tree,
- register __psunsigned_t start,
- register __psunsigned_t end,
+ register uintptr_t start,
+ register uintptr_t end,
avlnode_t **startp,
avlnode_t **endp)
{
diff --git a/repair/avl.h b/repair/avl.h
index 2fad1ec..3b27915 100644
--- a/repair/avl.h
+++ b/repair/avl.h
@@ -31,8 +31,8 @@ typedef struct avlnode {
* avl-tree operations
*/
typedef struct avlops {
- __psunsigned_t (*avl_start)(avlnode_t *);
- __psunsigned_t (*avl_end)(avlnode_t *);
+ uintptr_t (*avl_start)(avlnode_t *);
+ uintptr_t (*avl_end)(avlnode_t *);
} avlops_t;
#define AVL_START(tree, n) (*(tree)->avl_ops->avl_start)(n)
@@ -87,7 +87,7 @@ avl_init_tree(
static inline avlnode_t *
avl_findrange(
avltree_desc_t *tree,
- __psunsigned_t value)
+ uintptr_t value)
{
register avlnode_t *np = tree->avl_root;
@@ -110,27 +110,27 @@ avl_findrange(
avlnode_t *
avl_find(
avltree_desc_t *tree,
- __psunsigned_t value);
+ uintptr_t value);
avlnode_t *
avl_findanyrange(
avltree_desc_t *tree,
- __psunsigned_t start,
- __psunsigned_t end,
+ uintptr_t start,
+ uintptr_t end,
int checklen);
avlnode_t *
avl_findadjacent(
avltree_desc_t *tree,
- __psunsigned_t value,
+ uintptr_t value,
int dir);
void
avl_findranges(
register avltree_desc_t *tree,
- register __psunsigned_t start,
- register __psunsigned_t end,
+ register uintptr_t start,
+ register uintptr_t end,
avlnode_t **startp,
avlnode_t **endp);
diff --git a/repair/incore_ext.c b/repair/incore_ext.c
index a7d61e0..ff498b6 100644
--- a/repair/incore_ext.c
+++ b/repair/incore_ext.c
@@ -498,43 +498,42 @@ get_bcnt_extent(xfs_agnumber_t agno, xfs_agblock_t startblock,
return(ext);
}
-static __psunsigned_t
+static uintptr_t
avl_ext_start(avlnode_t *node)
{
- return((__psunsigned_t)
- ((extent_tree_node_t *) node)->ex_startblock);
+ return (uintptr_t) ((extent_tree_node_t *)node)->ex_startblock;
}
-static __psunsigned_t
+static uintptr_t
avl_ext_end(avlnode_t *node)
{
- return((__psunsigned_t) (
+ return (uintptr_t) (
((extent_tree_node_t *) node)->ex_startblock +
- ((extent_tree_node_t *) node)->ex_blockcount));
+ ((extent_tree_node_t *) node)->ex_blockcount);
}
/*
* convert size to an address for the AVL tree code -- the bigger the size,
* the lower the address so the biggest extent will be first in the tree
*/
-static __psunsigned_t
+static uintptr_t
avl_ext_bcnt_start(avlnode_t *node)
{
/*
- return((__psunsigned_t) (BCNT_ADDR(((extent_tree_node_t *)
- node)->ex_blockcount)));
+ return (uintptr_t) (BCNT_ADDR(((extent_tree_node_t *)
+ node)->ex_blockcount));
*/
- return((__psunsigned_t) ((extent_tree_node_t *)node)->ex_blockcount);
+ return (uintptr_t) ((extent_tree_node_t *)node)->ex_blockcount;
}
-static __psunsigned_t
+static uintptr_t
avl_ext_bcnt_end(avlnode_t *node)
{
/*
- return((__psunsigned_t) (BCNT_ADDR(((extent_tree_node_t *)
- node)->ex_blockcount)));
+ return (uintptr_t) (BCNT_ADDR(((extent_tree_node_t *)
+ node)->ex_blockcount));
*/
- return((__psunsigned_t) ((extent_tree_node_t *)node)->ex_blockcount);
+ return (uintptr_t) ((extent_tree_node_t *)node)->ex_blockcount;
}
avlops_t avl_extent_bcnt_tree_ops = {
diff --git a/repair/incore_ino.c b/repair/incore_ino.c
index 2a40727..55d4b4b 100644
--- a/repair/incore_ino.c
+++ b/repair/incore_ino.c
@@ -747,18 +747,18 @@ add_ino_ex_data(xfs_mount_t *mp)
full_ino_ex_data = 1;
}
-static __psunsigned_t
+static uintptr_t
avl_ino_start(avlnode_t *node)
{
- return((__psunsigned_t) ((ino_tree_node_t *) node)->ino_startnum);
+ return (uintptr_t) ((ino_tree_node_t *)node)->ino_startnum;
}
-static __psunsigned_t
+static uintptr_t
avl_ino_end(avlnode_t *node)
{
- return((__psunsigned_t) (
+ return (uintptr_t) (
((ino_tree_node_t *) node)->ino_startnum +
- XFS_INODES_PER_CHUNK));
+ XFS_INODES_PER_CHUNK);
}
avlops_t avl_ino_tree_ops = {
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6/6] Update .gitignore
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (4 preceding siblings ...)
2012-05-25 7:18 ` [PATCH 5/6] build: use standard type uintptr_t Jan Engelhardt
@ 2012-05-25 7:18 ` Jan Engelhardt
2012-05-25 10:39 ` Christoph Hellwig
2012-05-25 10:39 ` Build system revamp, part 1 Christoph Hellwig
` (2 subsequent siblings)
8 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 7:18 UTC (permalink / raw)
To: xfs; +Cc: jengelh
Root entries to where they only can occur.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
.gitignore | 82 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/.gitignore b/.gitignore
index 22b4f65..525b9b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,64 +5,64 @@
# build system
.census
-include/platform_defs.h
-include/builddefs
-install-sh
+/include/platform_defs.h
+/include/builddefs
+/install-sh
# magic directory symlinks
-include/disk
-include/xfs
+/include/disk
+/include/xfs
# packaging
-doc/CHANGES.gz
-xfsprogs-*
-xfsprogs_*
-xfslibs-dev_*
+/doc/CHANGES.gz
+/xfsprogs-*
+/xfsprogs_*
+/xfslibs-dev_*
# autoconf generated files
-aclocal.m4
-m4/libtool.m4
-m4/ltoptions.m4
-m4/ltsugar.m4
-m4/ltversion.m4
-m4/lt~obsolete.m4
-autom4te.cache/
-config.guess
-config.log
-config.status
-config.sub
-configure
+/aclocal.m4
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+/autom4te.cache/
+/config.guess
+/config.log
+/config.status
+/config.sub
+/configure
# libtool
-libtool
-ltmain.sh
+/libtool
+/ltmain.sh
*.lo
*.la
.libs
# gettext
-po/de.mo
-po/pl.mo
-po/xfsprogs.pot
+/po/de.mo
+/po/pl.mo
+/po/xfsprogs.pot
# cscope stuff
cscope.*
# quilt stuff
-.pc/
-patches/
+/.pc/
+/patches/
# binaries
-copy/xfs_copy
-db/xfs_db
-estimate/xfs_estimate
-fsr/xfs_fsr
-growfs/xfs_growfs
-io/xfs_io
-logprint/xfs_logprint
-mdrestore/xfs_mdrestore
-mkfs/fstyp
-mkfs/mkfs.xfs
-quota/xfs_quota
-repair/xfs_repair
-rtcp/xfs_rtcp
+/copy/xfs_copy
+/db/xfs_db
+/estimate/xfs_estimate
+/fsr/xfs_fsr
+/growfs/xfs_growfs
+/io/xfs_io
+/logprint/xfs_logprint
+/mdrestore/xfs_mdrestore
+/mkfs/fstyp
+/mkfs/mkfs.xfs
+/quota/xfs_quota
+/repair/xfs_repair
+/rtcp/xfs_rtcp
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 1/6] build: rename to configure.ac
2012-05-25 7:18 ` [PATCH 1/6] build: rename to configure.ac Jan Engelhardt
@ 2012-05-25 10:36 ` Christoph Hellwig
2012-05-25 14:43 ` Jan Engelhardt
0 siblings, 1 reply; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:36 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:38AM +0200, Jan Engelhardt wrote:
> This is simply the modern recommended name. (As a side note, it also
> selects the right syntax coloring because .ac tells more than .in.)
>
> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Looks good, but you'll need to send it as a proper patch.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/6] build: use new autoconf constructs
2012-05-25 7:18 ` [PATCH 2/6] build: use new autoconf constructs Jan Engelhardt
@ 2012-05-25 10:36 ` Christoph Hellwig
0 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:36 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:39AM +0200, Jan Engelhardt wrote:
> Looks like AC_CONFIG_FILES existed since 2.14 already.
>
> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/6] build: remove home-baked long/ptr size detection
2012-05-25 7:18 ` [PATCH 3/6] build: remove home-baked long/ptr size detection Jan Engelhardt
@ 2012-05-25 10:37 ` Christoph Hellwig
0 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:37 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:40AM +0200, Jan Engelhardt wrote:
> autoconf can do this for us.
>
> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 4/6] build: use standard type intptr_t
2012-05-25 7:18 ` [PATCH 4/6] build: use standard type intptr_t Jan Engelhardt
@ 2012-05-25 10:37 ` Christoph Hellwig
2012-05-25 15:52 ` xfsprogs/build: " Jan Engelhardt
0 siblings, 1 reply; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:37 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:41AM +0200, Jan Engelhardt wrote:
> It seems that the four supported platforms have intptr_t support, for
> they run with gcc, so rip out __psint_t and the size detection. If it
> breaks, speak up, and will devise something.
The libxfs bits should also go into the kernel tree, can you send a
patch for it as well?
Otherwise looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 5/6] build: use standard type uintptr_t
2012-05-25 7:18 ` [PATCH 5/6] build: use standard type uintptr_t Jan Engelhardt
@ 2012-05-25 10:38 ` Christoph Hellwig
0 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:38 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:42AM +0200, Jan Engelhardt wrote:
> Same as prior commit, but for __psunsigned_t.
Looks good, same comment as for the previous one.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 6/6] Update .gitignore
2012-05-25 7:18 ` [PATCH 6/6] Update .gitignore Jan Engelhardt
@ 2012-05-25 10:39 ` Christoph Hellwig
0 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:39 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
On Fri, May 25, 2012 at 09:18:43AM +0200, Jan Engelhardt wrote:
> Root entries to where they only can occur.
>
> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Build system revamp, part 1
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (5 preceding siblings ...)
2012-05-25 7:18 ` [PATCH 6/6] Update .gitignore Jan Engelhardt
@ 2012-05-25 10:39 ` Christoph Hellwig
2012-10-26 8:42 ` Christoph Hellwig
2012-10-31 18:28 ` Ben Myers
8 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-05-25 10:39 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
Thanks a lot for help with the built system!
Any way we could trick you to apply these changes to the other
repositories (xfsdump, xfstests, dmapi) as well?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/6] build: rename to configure.ac
2012-05-25 10:36 ` Christoph Hellwig
@ 2012-05-25 14:43 ` Jan Engelhardt
2012-05-25 14:46 ` [PATCH] " Jan Engelhardt
0 siblings, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 14:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Friday 2012-05-25 12:36, Christoph Hellwig wrote:
>On Fri, May 25, 2012 at 09:18:38AM +0200, Jan Engelhardt wrote:
>> This is simply the modern recommended name. (As a side note, it also
>> selects the right syntax coloring because .ac tells more than .in.)
>>
>> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
>
>Looks good, but you'll need to send it as a proper patch.
git-am does not take unified diff with git extensions (like renames)?
If you are ok with all six patches, you could also use a
git fetch+merge/pull, and add any *-by: tags in the merge commit.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH] build: rename to configure.ac
2012-05-25 14:43 ` Jan Engelhardt
@ 2012-05-25 14:46 ` Jan Engelhardt
0 siblings, 0 replies; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 14:46 UTC (permalink / raw)
To: xfs; +Cc: hch, jengelh
This is simply the modern recommended name. (As a side note, it also
selects the right syntax coloring because .ac tells more than .in.)
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
configure.ac | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 119 ----------------------------------------------------------
2 files changed, 119 insertions(+), 119 deletions(-)
create mode 100644 configure.ac
delete mode 100644 configure.in
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..664c0e9
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,119 @@
+AC_INIT(include/libxfs.h)
+AC_PREREQ(2.50)
+AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER(include/platform_defs.h)
+AC_PREFIX_DEFAULT(/usr)
+
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(shared,
+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
+ enable_shared=yes)
+AC_SUBST(enable_shared)
+
+AC_ARG_ENABLE(gettext,
+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+AC_SUBST(enable_gettext)
+
+AC_ARG_ENABLE(readline,
+[ --enable-readline=[yes/no] Enable readline command editing [default=no]],
+ test $enable_readline = yes && libreadline="-lreadline",
+ enable_readline=no)
+AC_SUBST(libreadline)
+AC_SUBST(enable_readline)
+
+AC_ARG_ENABLE(editline,
+[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
+ test $enable_editline = yes && libeditline="-ledit",
+ enable_editline=no)
+AC_SUBST(libeditline)
+AC_SUBST(enable_editline)
+
+AC_ARG_ENABLE(termcap,
+[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
+ test $enable_termcap = yes && libtermcap="-ltermcap",)
+AC_SUBST(libtermcap)
+
+# AC_HAVE_BLKID_TOPO below wil find the library & check for topo support
+AC_ARG_ENABLE(blkid,
+[ --enable-blkid=[yes/no] Enable block device id library [default=yes]],,
+ enable_blkid=yes)
+
+AC_ARG_ENABLE(lib64,
+[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
+ enable_lib64=yes)
+AC_SUBST(enable_lib64)
+
+#
+# If the user specified a libdir ending in lib64 do not append another
+# 64 to the library names.
+#
+base_libdir=`basename "$libdir"`
+case $base_libdir in
+lib64)
+ enable_lib64=no
+esac
+
+#
+# Some important tools should be installed into the root partitions.
+#
+# Check whether exec_prefix=/usr: and install them to /sbin in that
+# case. If the user choses a different prefix assume he just wants
+# a local install for testing and not a system install.
+#
+case $exec_prefix:$prefix in
+NONE:NONE | NONE:/usr | /usr:*)
+ root_sbindir='/sbin'
+ root_libdir="/${base_libdir}"
+ ;;
+*)
+ root_sbindir="${sbindir}"
+ root_libdir="${libdir}"
+ ;;
+esac
+
+AC_SUBST([root_sbindir])
+AC_SUBST([root_libdir])
+
+# Find localized files. Don't descend into any "dot directories"
+# (like .git or .pc from quilt). Strangely, the "-print" argument
+# to "find" is required, to avoid including such directories in the
+# list.
+LOCALIZED_FILES=""
+for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
+ LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
+done
+AC_SUBST(LOCALIZED_FILES)
+
+AC_PACKAGE_GLOBALS(xfsprogs)
+AC_PACKAGE_UTILITIES(xfsprogs)
+AC_MULTILIB($enable_lib64)
+
+AC_PACKAGE_NEED_AIO_H
+AC_PACKAGE_NEED_LIO_LISTIO
+
+AC_PACKAGE_NEED_UUID_H
+AC_PACKAGE_NEED_UUIDCOMPARE
+
+AC_PACKAGE_NEED_PTHREAD_H
+AC_PACKAGE_NEED_PTHREADMUTEXINIT
+
+AC_HAVE_FADVISE
+AC_HAVE_MADVISE
+AC_HAVE_MINCORE
+AC_HAVE_SENDFILE
+AC_HAVE_GETMNTENT
+AC_HAVE_GETMNTINFO
+AC_HAVE_FALLOCATE
+AC_HAVE_FIEMAP
+AC_HAVE_BLKID_TOPO($enable_blkid)
+
+AC_TYPE_PSINT
+AC_TYPE_PSUNSIGNED
+AC_TYPE_U32
+AC_SIZEOF_POINTERS_AND_LONG
+AC_MANUAL_FORMAT
+
+AC_OUTPUT(include/builddefs)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 664c0e9..0000000
--- a/configure.in
+++ /dev/null
@@ -1,119 +0,0 @@
-AC_INIT(include/libxfs.h)
-AC_PREREQ(2.50)
-AC_CONFIG_AUX_DIR([.])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADER(include/platform_defs.h)
-AC_PREFIX_DEFAULT(/usr)
-
-AC_PROG_LIBTOOL
-
-AC_ARG_ENABLE(shared,
-[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
- enable_shared=yes)
-AC_SUBST(enable_shared)
-
-AC_ARG_ENABLE(gettext,
-[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
- enable_gettext=yes)
-AC_SUBST(enable_gettext)
-
-AC_ARG_ENABLE(readline,
-[ --enable-readline=[yes/no] Enable readline command editing [default=no]],
- test $enable_readline = yes && libreadline="-lreadline",
- enable_readline=no)
-AC_SUBST(libreadline)
-AC_SUBST(enable_readline)
-
-AC_ARG_ENABLE(editline,
-[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
- test $enable_editline = yes && libeditline="-ledit",
- enable_editline=no)
-AC_SUBST(libeditline)
-AC_SUBST(enable_editline)
-
-AC_ARG_ENABLE(termcap,
-[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
- test $enable_termcap = yes && libtermcap="-ltermcap",)
-AC_SUBST(libtermcap)
-
-# AC_HAVE_BLKID_TOPO below wil find the library & check for topo support
-AC_ARG_ENABLE(blkid,
-[ --enable-blkid=[yes/no] Enable block device id library [default=yes]],,
- enable_blkid=yes)
-
-AC_ARG_ENABLE(lib64,
-[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
- enable_lib64=yes)
-AC_SUBST(enable_lib64)
-
-#
-# If the user specified a libdir ending in lib64 do not append another
-# 64 to the library names.
-#
-base_libdir=`basename "$libdir"`
-case $base_libdir in
-lib64)
- enable_lib64=no
-esac
-
-#
-# Some important tools should be installed into the root partitions.
-#
-# Check whether exec_prefix=/usr: and install them to /sbin in that
-# case. If the user choses a different prefix assume he just wants
-# a local install for testing and not a system install.
-#
-case $exec_prefix:$prefix in
-NONE:NONE | NONE:/usr | /usr:*)
- root_sbindir='/sbin'
- root_libdir="/${base_libdir}"
- ;;
-*)
- root_sbindir="${sbindir}"
- root_libdir="${libdir}"
- ;;
-esac
-
-AC_SUBST([root_sbindir])
-AC_SUBST([root_libdir])
-
-# Find localized files. Don't descend into any "dot directories"
-# (like .git or .pc from quilt). Strangely, the "-print" argument
-# to "find" is required, to avoid including such directories in the
-# list.
-LOCALIZED_FILES=""
-for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
- LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
-done
-AC_SUBST(LOCALIZED_FILES)
-
-AC_PACKAGE_GLOBALS(xfsprogs)
-AC_PACKAGE_UTILITIES(xfsprogs)
-AC_MULTILIB($enable_lib64)
-
-AC_PACKAGE_NEED_AIO_H
-AC_PACKAGE_NEED_LIO_LISTIO
-
-AC_PACKAGE_NEED_UUID_H
-AC_PACKAGE_NEED_UUIDCOMPARE
-
-AC_PACKAGE_NEED_PTHREAD_H
-AC_PACKAGE_NEED_PTHREADMUTEXINIT
-
-AC_HAVE_FADVISE
-AC_HAVE_MADVISE
-AC_HAVE_MINCORE
-AC_HAVE_SENDFILE
-AC_HAVE_GETMNTENT
-AC_HAVE_GETMNTINFO
-AC_HAVE_FALLOCATE
-AC_HAVE_FIEMAP
-AC_HAVE_BLKID_TOPO($enable_blkid)
-
-AC_TYPE_PSINT
-AC_TYPE_PSUNSIGNED
-AC_TYPE_U32
-AC_SIZEOF_POINTERS_AND_LONG
-AC_MANUAL_FORMAT
-
-AC_OUTPUT(include/builddefs)
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: xfsprogs/build: use standard type intptr_t
2012-05-25 10:37 ` Christoph Hellwig
@ 2012-05-25 15:52 ` Jan Engelhardt
2012-05-25 15:52 ` [PATCH 1/2] types.h: implement intptr_t and uintptr_t Jan Engelhardt
2012-05-25 15:52 ` [PATCH 2/2] xfs: use standard (u)intptr_t types Jan Engelhardt
0 siblings, 2 replies; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 15:52 UTC (permalink / raw)
To: xfs; +Cc: hch, joe
The following changes since commit 14c26c6a05de138a4fd9a0c05ff8e7435a618324:
xfs: add trace points for log forces (2012-05-21 10:45:44 -0500)
are available in the git repository at:
git://inai.de/linux xfs
Jan Engelhardt (2):
types.h: implement intptr_t and uintptr_t
xfs: use standard (u)intptr_t types
arch/avr32/include/asm/posix_types.h | 2 +
arch/blackfin/include/asm/posix_types.h | 2 +
arch/cris/include/asm/posix_types.h | 2 +
arch/mn10300/include/asm/posix_types.h | 2 +
arch/powerpc/include/asm/posix_types.h | 2 +
arch/s390/include/asm/posix_types.h | 4 +++
arch/sh/include/asm/posix_types_64.h | 2 +
arch/sparc/include/asm/posix_types.h | 2 +
arch/xtensa/include/asm/posix_types.h | 2 +
fs/xfs/xfs_extfree_item.c | 2 +-
fs/xfs/xfs_filestream.c | 34 +++++++++++++++---------------
fs/xfs/xfs_log.c | 10 ++++----
fs/xfs/xfs_trans_ail.c | 6 ++--
fs/xfs/xfs_types.h | 11 ----------
include/asm-generic/posix_types.h | 4 +++
include/linux/types.h | 5 ++-
16 files changed, 53 insertions(+), 39 deletions(-)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/2] types.h: implement intptr_t and uintptr_t
2012-05-25 15:52 ` xfsprogs/build: " Jan Engelhardt
@ 2012-05-25 15:52 ` Jan Engelhardt
2012-05-31 17:59 ` Ben Myers
2012-05-25 15:52 ` [PATCH 2/2] xfs: use standard (u)intptr_t types Jan Engelhardt
1 sibling, 1 reply; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 15:52 UTC (permalink / raw)
To: xfs; +Cc: hch, joe
intptr_t and uintptr_t designate an (un)signed integer type capable of
holding void* pointers.
(http://pubs.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html )
Notes: In linux/types.h, there are a handful of guards like "#ifdef
_PTRDIFF_T", but a git grep reveals that this is never ever defined
anywhere, so I omitted a corresponding "#ifdef _INTPTR_T" guard.
Same goes for "#define __kernel_ptrdiff_t" in
arch/sh/include/asm/posix_types_64.h.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
arch/avr32/include/asm/posix_types.h | 2 ++
arch/blackfin/include/asm/posix_types.h | 2 ++
arch/cris/include/asm/posix_types.h | 2 ++
arch/mn10300/include/asm/posix_types.h | 2 ++
arch/powerpc/include/asm/posix_types.h | 2 ++
arch/s390/include/asm/posix_types.h | 4 ++++
arch/sh/include/asm/posix_types_64.h | 2 ++
arch/sparc/include/asm/posix_types.h | 2 ++
arch/xtensa/include/asm/posix_types.h | 2 ++
include/asm-generic/posix_types.h | 4 ++++
include/linux/types.h | 5 +++--
11 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/arch/avr32/include/asm/posix_types.h b/arch/avr32/include/asm/posix_types.h
index 74667bf..9670c32 100644
--- a/arch/avr32/include/asm/posix_types.h
+++ b/arch/avr32/include/asm/posix_types.h
@@ -26,6 +26,8 @@ typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned long __kernel_size_t;
typedef long __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_old_uid_t;
diff --git a/arch/blackfin/include/asm/posix_types.h b/arch/blackfin/include/asm/posix_types.h
index 41bc187..b4da8fa 100644
--- a/arch/blackfin/include/asm/posix_types.h
+++ b/arch/blackfin/include/asm/posix_types.h
@@ -19,6 +19,8 @@ typedef unsigned int __kernel_ipc_pid_t;
typedef unsigned long __kernel_size_t;
typedef long __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_old_uid_t;
diff --git a/arch/cris/include/asm/posix_types.h b/arch/cris/include/asm/posix_types.h
index 72b3cd6..241d188 100644
--- a/arch/cris/include/asm/posix_types.h
+++ b/arch/cris/include/asm/posix_types.h
@@ -28,6 +28,8 @@ typedef unsigned short __kernel_gid_t;
typedef __SIZE_TYPE__ __kernel_size_t;
typedef long __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_old_dev_t;
diff --git a/arch/mn10300/include/asm/posix_types.h b/arch/mn10300/include/asm/posix_types.h
index ab50618..5f43928 100644
--- a/arch/mn10300/include/asm/posix_types.h
+++ b/arch/mn10300/include/asm/posix_types.h
@@ -38,6 +38,8 @@ typedef unsigned long __kernel_size_t;
typedef signed long __kernel_ssize_t;
#endif
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_old_dev_t;
diff --git a/arch/powerpc/include/asm/posix_types.h b/arch/powerpc/include/asm/posix_types.h
index f139325..6f8d25c 100644
--- a/arch/powerpc/include/asm/posix_types.h
+++ b/arch/powerpc/include/asm/posix_types.h
@@ -14,6 +14,8 @@ typedef unsigned long __kernel_old_dev_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef long __kernel_ptrdiff_t;
+typedef long __kernel_intptr_t;
+typedef unsigned long __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_nlink_t;
diff --git a/arch/s390/include/asm/posix_types.h b/arch/s390/include/asm/posix_types.h
index edf8527..8c89e7a 100644
--- a/arch/s390/include/asm/posix_types.h
+++ b/arch/s390/include/asm/posix_types.h
@@ -30,6 +30,8 @@ typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#else /* __s390x__ */
@@ -41,6 +43,8 @@ typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
typedef long __kernel_ssize_t;
typedef long __kernel_ptrdiff_t;
+typedef long __kernel_intptr_t;
+typedef unsigned long __kernel_uintptr_t;
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
#endif /* __s390x__ */
diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/asm/posix_types_64.h
index fcda07b..0224785 100644
--- a/arch/sh/include/asm/posix_types_64.h
+++ b/arch/sh/include/asm/posix_types_64.h
@@ -17,6 +17,8 @@ typedef int __kernel_ssize_t;
#define __kernel_ssize_t __kernel_ssize_t
typedef int __kernel_ptrdiff_t;
#define __kernel_ptrdiff_t __kernel_ptrdiff_t
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
typedef unsigned short __kernel_old_uid_t;
#define __kernel_old_uid_t __kernel_old_uid_t
diff --git a/arch/sparc/include/asm/posix_types.h b/arch/sparc/include/asm/posix_types.h
index 3070f25..2f2c90d 100644
--- a/arch/sparc/include/asm/posix_types.h
+++ b/arch/sparc/include/asm/posix_types.h
@@ -26,6 +26,8 @@ typedef int __kernel_suseconds_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef long int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_ipc_pid_t;
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/asm/posix_types.h
index 6e96be0..d35f53e 100644
--- a/arch/xtensa/include/asm/posix_types.h
+++ b/arch/xtensa/include/asm/posix_types.h
@@ -25,6 +25,8 @@ typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef long __kernel_ptrdiff_t;
+typedef long __kernel_intptr_t;
+typedef unsigned long __kernel_uintptr_t;
#define __kernel_size_t __kernel_size_t
typedef unsigned short __kernel_old_uid_t;
diff --git a/include/asm-generic/posix_types.h b/include/asm-generic/posix_types.h
index 91d44bd..c0b9107 100644
--- a/include/asm-generic/posix_types.h
+++ b/include/asm-generic/posix_types.h
@@ -71,10 +71,14 @@ typedef unsigned int __kernel_old_dev_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
+typedef int __kernel_intptr_t;
+typedef unsigned int __kernel_uintptr_t;
#else
typedef __kernel_ulong_t __kernel_size_t;
typedef __kernel_long_t __kernel_ssize_t;
typedef __kernel_long_t __kernel_ptrdiff_t;
+typedef __kernel_long_t __kernel_intptr_t;
+typedef __kernel_ulong_t __kernel_uintptr_t;
#endif
#endif
diff --git a/include/linux/types.h b/include/linux/types.h
index e5fa503..03c355f 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -42,8 +42,6 @@ typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;
-typedef unsigned long uintptr_t;
-
#ifdef CONFIG_UID16
/* This is defined by include/asm-{arch}/posix_types.h */
typedef __kernel_old_uid_t old_uid_t;
@@ -73,6 +71,9 @@ typedef __kernel_ssize_t ssize_t;
typedef __kernel_ptrdiff_t ptrdiff_t;
#endif
+typedef __kernel_intptr_t intptr_t;
+typedef __kernel_uintptr_t uintptr_t;
+
#ifndef _TIME_T
#define _TIME_T
typedef __kernel_time_t time_t;
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/2] xfs: use standard (u)intptr_t types
2012-05-25 15:52 ` xfsprogs/build: " Jan Engelhardt
2012-05-25 15:52 ` [PATCH 1/2] types.h: implement intptr_t and uintptr_t Jan Engelhardt
@ 2012-05-25 15:52 ` Jan Engelhardt
1 sibling, 0 replies; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-25 15:52 UTC (permalink / raw)
To: xfs; +Cc: hch, joe
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
fs/xfs/xfs_extfree_item.c | 2 +-
fs/xfs/xfs_filestream.c | 34 +++++++++++++++++-----------------
fs/xfs/xfs_log.c | 10 +++++-----
fs/xfs/xfs_trans_ail.c | 6 +++---
fs/xfs/xfs_types.h | 11 -----------
5 files changed, 26 insertions(+), 37 deletions(-)
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index feb36d7..2dfef98 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -239,7 +239,7 @@ xfs_efi_init(
xfs_log_item_init(mp, &efip->efi_item, XFS_LI_EFI, &xfs_efi_item_ops);
efip->efi_format.efi_nextents = nextents;
- efip->efi_format.efi_id = (__psint_t)(void*)efip;
+ efip->efi_format.efi_id = (intptr_t)(void*)efip;
atomic_set(&efip->efi_next_extent, 0);
return efip;
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index 5170306..a05595e 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -42,24 +42,24 @@ xfs_filestreams_trace(
int type, /* type of trace */
const char *func, /* source function */
int line, /* source line number */
- __psunsigned_t arg0,
- __psunsigned_t arg1,
- __psunsigned_t arg2,
- __psunsigned_t arg3,
- __psunsigned_t arg4,
- __psunsigned_t arg5)
+ uintptr_t arg0,
+ uintptr_t arg1,
+ uintptr_t arg2,
+ uintptr_t arg3,
+ uintptr_t arg4,
+ uintptr_t arg5)
{
ktrace_enter(xfs_filestreams_trace_buf,
- (void *)(__psint_t)(type | (line << 16)),
+ (void *)(intptr_t)(type | (line << 16)),
(void *)func,
- (void *)(__psunsigned_t)current_pid(),
+ (void *)(uintptr_t)current_pid(),
(void *)mp,
- (void *)(__psunsigned_t)arg0,
- (void *)(__psunsigned_t)arg1,
- (void *)(__psunsigned_t)arg2,
- (void *)(__psunsigned_t)arg3,
- (void *)(__psunsigned_t)arg4,
- (void *)(__psunsigned_t)arg5,
+ (void *)(uintptr_t)arg0,
+ (void *)(uintptr_t)arg1,
+ (void *)(uintptr_t)arg2,
+ (void *)(uintptr_t)arg3,
+ (void *)(uintptr_t)arg4,
+ (void *)(uintptr_t)arg5,
NULL, NULL, NULL, NULL, NULL, NULL);
}
@@ -71,9 +71,9 @@ xfs_filestreams_trace(
#define TRACE5(mp,t,a0,a1,a2,a3,a4) TRACE6(mp,t,a0,a1,a2,a3,a4,0)
#define TRACE6(mp,t,a0,a1,a2,a3,a4,a5) \
xfs_filestreams_trace(mp, t, __func__, __LINE__, \
- (__psunsigned_t)a0, (__psunsigned_t)a1, \
- (__psunsigned_t)a2, (__psunsigned_t)a3, \
- (__psunsigned_t)a4, (__psunsigned_t)a5)
+ (uintptr_t)a0, (uintptr_t)a1, \
+ (uintptr_t)a2, (uintptr_t)a3, \
+ (uintptr_t)a4, (uintptr_t)a5)
#define TRACE_AG_SCAN(mp, ag, ag2) \
TRACE2(mp, XFS_FSTRM_KTRACE_AGSCAN, ag, ag2);
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 6b965bf..70f6f73 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3382,7 +3382,7 @@ xlog_verify_iclog(xlog_t *log,
xlog_in_core_2_t *xhdr;
xfs_caddr_t ptr;
xfs_caddr_t base_ptr;
- __psint_t field_offset;
+ intptr_t field_offset;
__uint8_t clientid;
int len, i, j, k, op_len;
int idx;
@@ -3421,7 +3421,7 @@ xlog_verify_iclog(xlog_t *log,
ophead = (xlog_op_header_t *)ptr;
/* clientid is only 1 byte */
- field_offset = (__psint_t)
+ field_offset = (intptr_t)
((xfs_caddr_t)&(ophead->oh_clientid) - base_ptr);
if (syncing == B_FALSE || (field_offset & 0x1ff)) {
clientid = ophead->oh_clientid;
@@ -3444,13 +3444,13 @@ xlog_verify_iclog(xlog_t *log,
(unsigned long)field_offset);
/* check length */
- field_offset = (__psint_t)
+ field_offset = (intptr_t)
((xfs_caddr_t)&(ophead->oh_len) - base_ptr);
if (syncing == B_FALSE || (field_offset & 0x1ff)) {
op_len = be32_to_cpu(ophead->oh_len);
} else {
- idx = BTOBBT((__psint_t)&ophead->oh_len -
- (__psint_t)iclog->ic_datap);
+ idx = BTOBBT((intptr_t)&ophead->oh_len -
+ (intptr_t)iclog->ic_datap);
if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 9c51448..def28e0 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -187,7 +187,7 @@ xfs_trans_ail_cursor_next(
{
struct xfs_log_item *lip = cur->item;
- if ((__psint_t)lip & 1)
+ if ((intptr_t)lip & 1)
lip = xfs_ail_min(ailp);
if (lip)
cur->item = xfs_ail_next(ailp, lip);
@@ -225,7 +225,7 @@ xfs_trans_ail_cursor_clear(
list_for_each_entry(cur, &ailp->xa_cursors, list) {
if (cur->item == lip)
cur->item = (struct xfs_log_item *)
- ((__psint_t)cur->item | 1);
+ ((intptr_t)cur->item | 1);
}
}
@@ -316,7 +316,7 @@ xfs_ail_splice(
* find the place in the AIL where the items belong.
*/
lip = cur ? cur->item : NULL;
- if (!lip || (__psint_t) lip & 1)
+ if (!lip || (intptr_t)lip & 1)
lip = __xfs_trans_ail_cursor_last(ailp, lsn);
/*
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h
index 398cf68..7e0639a 100644
--- a/fs/xfs/xfs_types.h
+++ b/fs/xfs/xfs_types.h
@@ -43,17 +43,6 @@ typedef char * xfs_caddr_t; /* <core address> type */
typedef __u32 xfs_dev_t;
typedef __u32 xfs_nlink_t;
-/* __psint_t is the same size as a pointer */
-#if (BITS_PER_LONG == 32)
-typedef __int32_t __psint_t;
-typedef __uint32_t __psunsigned_t;
-#elif (BITS_PER_LONG == 64)
-typedef __int64_t __psint_t;
-typedef __uint64_t __psunsigned_t;
-#else
-#error BITS_PER_LONG must be 32 or 64
-#endif
-
#endif /* __KERNEL__ */
typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
--
1.7.7
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 1/2] types.h: implement intptr_t and uintptr_t
2012-05-25 15:52 ` [PATCH 1/2] types.h: implement intptr_t and uintptr_t Jan Engelhardt
@ 2012-05-31 17:59 ` Ben Myers
2012-05-31 18:05 ` Jan Engelhardt
0 siblings, 1 reply; 23+ messages in thread
From: Ben Myers @ 2012-05-31 17:59 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: hch, joe, xfs
Hey Jan,
On Fri, May 25, 2012 at 05:52:26PM +0200, Jan Engelhardt wrote:
> intptr_t and uintptr_t designate an (un)signed integer type capable of
> holding void* pointers.
> (http://pubs.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html )
>
> Notes: In linux/types.h, there are a handful of guards like "#ifdef
> _PTRDIFF_T", but a git grep reveals that this is never ever defined
> anywhere, so I omitted a corresponding "#ifdef _INTPTR_T" guard.
> Same goes for "#define __kernel_ptrdiff_t" in
> arch/sh/include/asm/posix_types_64.h.
Would it be appropriate to CC linux-kernel on this one given the nature of the
change?
-Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/2] types.h: implement intptr_t and uintptr_t
2012-05-31 17:59 ` Ben Myers
@ 2012-05-31 18:05 ` Jan Engelhardt
0 siblings, 0 replies; 23+ messages in thread
From: Jan Engelhardt @ 2012-05-31 18:05 UTC (permalink / raw)
To: Ben Myers; +Cc: hch, joe, xfs
On Thursday 2012-05-31 19:59, Ben Myers wrote:
>Hey Jan,
>
>On Fri, May 25, 2012 at 05:52:26PM +0200, Jan Engelhardt wrote:
>> intptr_t and uintptr_t designate an (un)signed integer type capable of
>> holding void* pointers.
>> (http://pubs.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html )
>
>Would it be appropriate to CC linux-kernel on this one given the nature of the
>change?
Occurred now.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Build system revamp, part 1
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (6 preceding siblings ...)
2012-05-25 10:39 ` Build system revamp, part 1 Christoph Hellwig
@ 2012-10-26 8:42 ` Christoph Hellwig
2012-10-31 18:28 ` Ben Myers
8 siblings, 0 replies; 23+ messages in thread
From: Christoph Hellwig @ 2012-10-26 8:42 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 201 bytes --]
Re þhe push for a new releae I'd love to pull Jan's bits in.
Patch 1 already got sent from Mike, 2, 3 and 6 should go in (and into
the other repos), 4 ans 5 need to be done in the kernel tree first.
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Build system revamp, part 1
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
` (7 preceding siblings ...)
2012-10-26 8:42 ` Christoph Hellwig
@ 2012-10-31 18:28 ` Ben Myers
8 siblings, 0 replies; 23+ messages in thread
From: Ben Myers @ 2012-10-31 18:28 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: xfs
Jan,
On Fri, May 25, 2012 at 09:18:37AM +0200, Jan Engelhardt wrote:
>
> The following changes since commit a8decaf0cf49d3db099e8dc419390c353e2b19ad:
>
> 3.1.8 release (2012-03-20 13:52:15 -0500)
>
> are available in the git repository at:
> git://inai.de/xfsprogs master
>
> Jan Engelhardt (6):
> build: rename to configure.ac
> build: use new autoconf constructs
> build: remove home-baked long/ptr size detection
> build: use standard type intptr_t
> build: use standard type uintptr_t
> Update .gitignore
Patches 2, 3, and 6 have been committed to git://oss.sgi.com/xfs/cmds/xfsprogs.git, master branch.
Thanks,
Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2012-10-31 18:26 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 7:18 Build system revamp, part 1 Jan Engelhardt
2012-05-25 7:18 ` [PATCH 1/6] build: rename to configure.ac Jan Engelhardt
2012-05-25 10:36 ` Christoph Hellwig
2012-05-25 14:43 ` Jan Engelhardt
2012-05-25 14:46 ` [PATCH] " Jan Engelhardt
2012-05-25 7:18 ` [PATCH 2/6] build: use new autoconf constructs Jan Engelhardt
2012-05-25 10:36 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 3/6] build: remove home-baked long/ptr size detection Jan Engelhardt
2012-05-25 10:37 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 4/6] build: use standard type intptr_t Jan Engelhardt
2012-05-25 10:37 ` Christoph Hellwig
2012-05-25 15:52 ` xfsprogs/build: " Jan Engelhardt
2012-05-25 15:52 ` [PATCH 1/2] types.h: implement intptr_t and uintptr_t Jan Engelhardt
2012-05-31 17:59 ` Ben Myers
2012-05-31 18:05 ` Jan Engelhardt
2012-05-25 15:52 ` [PATCH 2/2] xfs: use standard (u)intptr_t types Jan Engelhardt
2012-05-25 7:18 ` [PATCH 5/6] build: use standard type uintptr_t Jan Engelhardt
2012-05-25 10:38 ` Christoph Hellwig
2012-05-25 7:18 ` [PATCH 6/6] Update .gitignore Jan Engelhardt
2012-05-25 10:39 ` Christoph Hellwig
2012-05-25 10:39 ` Build system revamp, part 1 Christoph Hellwig
2012-10-26 8:42 ` Christoph Hellwig
2012-10-31 18:28 ` Ben Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox