From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH 13/13] xfsprogs: remove the constpp define
Date: Fri, 3 Jul 2015 12:12:21 +0200 [thread overview]
Message-ID: <1435918341-10128-14-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1435918341-10128-1-git-send-email-hch@lst.de>
This is a workaround for the long obsolete glibc 2.0.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/darwin.h | 1 -
include/freebsd.h | 2 --
include/gnukfreebsd.h | 2 --
include/irix.h | 2 --
include/linux.h | 6 ------
mkfs/xfs_mkfs.c | 16 ++++++++--------
repair/xfs_repair.c | 4 ++--
7 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/include/darwin.h b/include/darwin.h
index abdf4e3..fe533a2 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -154,7 +154,6 @@ typedef int64_t xfs_daddr_t;
#define ENOATTR 989 /* Attribute not found */
#define EFSCORRUPTED 990 /* Filesystem is corrupted */
#define EFSBADCRC 991 /* Bad CRC detected */
-#define constpp char * const *
#define HAVE_FID 1
diff --git a/include/freebsd.h b/include/freebsd.h
index 902b940..6c51d3f 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -42,8 +42,6 @@
#define fdatasync fsync
#define memalign(a,sz) valloc(sz)
-#define constpp char * const *
-
#define EFSCORRUPTED 990 /* Filesystem is corrupted */
#define EFSBADCRC 991 /* Bad CRC detected */
diff --git a/include/gnukfreebsd.h b/include/gnukfreebsd.h
index 95c4c13..6686b86 100644
--- a/include/gnukfreebsd.h
+++ b/include/gnukfreebsd.h
@@ -32,8 +32,6 @@
#include <libgen.h>
#include <paths.h>
-#define constpp char * const *
-
#define EFSCORRUPTED 990 /* Filesystem is corrupted */
#define EFSBADCRC 991 /* Bad CRC detected */
diff --git a/include/irix.h b/include/irix.h
index 28564c8..806c94f 100644
--- a/include/irix.h
+++ b/include/irix.h
@@ -183,8 +183,6 @@ typedef struct xfs_efd_log_format_32 {
#define inline __inline
#endif
-#define constpp char * const *
-
/*ARGSUSED*/
static __inline__ int xfsctl(const char *path, int fd, int cmd, void *arg)
{
diff --git a/include/linux.h b/include/linux.h
index 8804c2d..596dab4 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -130,12 +130,6 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
return 0;
}
-#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 1))
-# define constpp const char * const *
-#else
-# define constpp char * const *
-#endif
-
#define ENOATTR ENODATA /* Attribute not found */
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
#define EFSBADCRC EBADMSG /* Bad CRC detected */
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 80cdd10..95f29f3 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -1086,7 +1086,7 @@ main(
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)bopts, &value)) {
+ switch (getsubopt(&p, bopts, &value)) {
case B_LOG:
if (!value || *value == '\0')
reqval('b', bopts, B_LOG);
@@ -1127,7 +1127,7 @@ main(
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)dopts, &value)) {
+ switch (getsubopt(&p, dopts, &value)) {
case D_AGCOUNT:
if (!value || *value == '\0')
reqval('d', dopts, D_AGCOUNT);
@@ -1304,7 +1304,7 @@ main(
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)iopts, &value)) {
+ switch (getsubopt(&p, iopts, &value)) {
case I_ALIGN:
if (!value || *value == '\0')
value = "1";
@@ -1407,7 +1407,7 @@ main(
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)lopts, &value)) {
+ switch (getsubopt(&p, lopts, &value)) {
case L_AGNUM:
if (!value || *value == '\0')
reqval('l', lopts, L_AGNUM);
@@ -1555,7 +1555,7 @@ main(
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)mopts, &value)) {
+ switch (getsubopt(&p, mopts, &value)) {
case M_CRC:
if (!value || *value == '\0')
reqval('m', mopts, M_CRC);
@@ -1588,7 +1588,7 @@ _("cannot specify both crc and ftype\n"));
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)nopts, &value)) {
+ switch (getsubopt(&p, nopts, &value)) {
case N_LOG:
if (!value || *value == '\0')
reqval('n', nopts, N_LOG);
@@ -1672,7 +1672,7 @@ _("cannot specify both crc and ftype\n"));
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)ropts, &value)) {
+ switch (getsubopt(&p, ropts, &value)) {
case R_EXTSIZE:
if (!value || *value == '\0')
reqval('r', ropts, R_EXTSIZE);
@@ -1717,7 +1717,7 @@ _("cannot specify both crc and ftype\n"));
while (*p != '\0') {
char *value;
- switch (getsubopt(&p, (constpp)sopts, &value)) {
+ switch (getsubopt(&p, sopts, &value)) {
case S_LOG:
case S_SECTLOG:
if (!value || *value == '\0')
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index db703d0..9518812 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -224,7 +224,7 @@ process_args(int argc, char **argv)
while (*p != '\0') {
char *val;
- switch (getsubopt(&p, (constpp)o_opts, &val)) {
+ switch (getsubopt(&p, o_opts, &val)) {
case ASSUME_XFS:
if (val)
noval('o', o_opts, ASSUME_XFS);
@@ -275,7 +275,7 @@ process_args(int argc, char **argv)
while (*p) {
char *val;
- switch (getsubopt(&p, (constpp)c_opts, &val)) {
+ switch (getsubopt(&p, c_opts, &val)) {
case CONVERT_LAZY_COUNT:
lazy_count = (int)strtol(val, NULL, 0);
convert_lazy_count = 1;
--
1.9.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-07-03 10:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 10:12 xfsprogs: clean up installed headers Christoph Hellwig
2015-07-03 10:12 ` [PATCH 01/13] xfsprogs: don't install internal header files Christoph Hellwig
2015-07-03 10:12 ` [PATCH 02/13] xfsprogs: remove unused macros from xfs_arch.h Christoph Hellwig
2015-07-03 10:12 ` [PATCH 03/13] xfsprogs: remove swab.h Christoph Hellwig
2015-07-03 10:12 ` [PATCH 04/13] xfsprogs: only install *format.h headers in install-qa Christoph Hellwig
2015-07-03 10:12 ` [PATCH 05/13] xfsprogs: remove install-qa target Christoph Hellwig
2015-07-03 10:12 ` [PATCH 06/13] xfsprogs: use <>-style includes in installed headers Christoph Hellwig
2015-07-03 10:12 ` [PATCH 07/13] xfsprogs: simplify internal includes Christoph Hellwig
2015-07-03 10:12 ` [PATCH 08/13] xfsprogs: move __be*/__le* types and __arch_pack to xfs_arch.h Christoph Hellwig
2015-07-03 10:12 ` [PATCH 09/13] xfsprogs: move __u*/__s* typedefs to per-port headers Christoph Hellwig
2015-07-03 10:12 ` [PATCH 10/13] xfsprogs: include libxfs.h in libxfs_priv.h Christoph Hellwig
2015-07-03 23:42 ` Dave Chinner
2015-07-03 10:12 ` [PATCH 11/13] xfsprogs: don't install platform_defs.h Christoph Hellwig
2015-07-03 10:12 ` [PATCH 12/13] xfsprogs: remove filldir_t typedef Christoph Hellwig
2015-07-03 10:12 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435918341-10128-14-git-send-email-hch@lst.de \
--to=hch@lst.de \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox