Remove workaround for getsubopt() on <glibc-2.2
PATCH 1/2 Remove workaround for getsubopt() on <glibc-2.2
The workaround addressed only a const-correctness warning. It was wrongly applied also to alternative c libraries on linux.
Signed-off-by Felix Janda <[email protected]>
--- include/darwin.h | 1 - include/freebsd.h | 2 -- include/gnukfreebsd.h | 2 -- include/irix.h | 2 -- include/linux.h | 6 ------ mkfs/xfs_mkfs.c | 24 ++++++++---------------- repair/xfs_repair.c | 4 ++-- 7 files changed, 10 insertions(+), 31 deletions(-)
include/darwin.h +0 -1
@@ -160,7 +160,6 @@ typedef int64_t xfs_daddr_t;#define EFSCORRUPTED 990/* Filesystem is corrupted */ #define EFSBADCRC 991/* Bad CRC detected */ -#define constpp char * const *#define HAVE_FID 1
include/freebsd.h +0 -2
@@ -43,8 +43,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 */
include/gnukfreebsd.h +0 -2
@@ -33,8 +33,6 @@#include <paths.h> #include <mntent.h> -#define constpp char * const * -#define EFSCORRUPTED 990/* Filesystem is corrupted */ #define EFSBADCRC 991/* Bad CRC detected */
include/irix.h +0 -2
@@ -184,8 +184,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) {
include/linux.h +0 -6
@@ -133,12 +133,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 */
mkfs/xfs_mkfs.c +8 -16
@@ -1521,8 +1521,7 @@ main(char **subopts = (char **)bopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case B_LOG : blocklog =getnum (value, &bopts,B_LOG ); blocksize =1 << blocklog;
@@ -1545,8 +1544,7 @@ main(char **subopts = (char **)dopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case D_AGCOUNT : agcount =getnum (value, &dopts,D_AGCOUNT );
@@ -1625,8 +1623,7 @@ main(char **subopts = (char **)iopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case I_ALIGN : sb_feat.inode_align =getnum (value, &iopts,I_ALIGN );
@@ -1675,8 +1672,7 @@ main(char **subopts = (char **)lopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case L_AGNUM : logagno =getnum (value, &lopts,L_AGNUM ); laflag =1 ;
@@ -1747,8 +1743,7 @@ main(char **subopts = (char **)mopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case M_CRC : sb_feat.crcs_enabled =getnum (value, &mopts,M_CRC );
@@ -1776,8 +1771,7 @@ main(char **subopts = (char **)nopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case N_LOG : dirblocklog =getnum (value, &nopts,N_LOG );
@@ -1832,8 +1826,7 @@ main(char **subopts = (char **)ropts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case R_EXTSIZE : rtextsize =getstr (value, &ropts,R_EXTSIZE );
@@ -1865,8 +1858,7 @@ main(char **subopts = (char **)sopts.subopts;char *value; -switch (getsubopt (&p, (constpp )subopts, - &value)) { +switch (getsubopt (&p, subopts, &value)) {case S_LOG :case S_SECTLOG :if (lssflag)
repair/xfs_repair.c +2 -2
@@ -225,7 +225,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 );
@@ -276,7 +276,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 ;
Signature · 6 lines
2.7.3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Felix Janda
The workaround addressed only a const-correctness warning. It was wrongly applied also to alternative c libraries on linux.
Signed-off-by Felix Janda <[email protected]>
Didn't I ACK this before?
Reviewed-by Christoph Hellwig <[email protected]>
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs