From: Theodore Ts'o Date: Tue, 23 Nov 1999 02:23:30 +0000 (+0000) Subject: ChangeLog, mke2fs.c: X-Git-Tag: E2FSPROGS-1_19~106 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=6733c2fd0046c525203034f58fc0a8c69fdf480b;p=tools%2Fe2fsprogs.git ChangeLog, mke2fs.c: mke2fs.c: Change log2() and log10() to int_log2() and int_log10() to avoid namespace collisions. Change #ifdef sparc to #ifdef __sparc__. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 6ac29ee..b5ea9e0 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +1999-11-22 + + * mke2fs.c: Change log2() and log10() to int_log2() and + int_log10() to avoid namespace collisions. Change #ifdef + sparc to #ifdef __sparc__. + 1999-11-19 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 44c40b8..df0b878 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -61,7 +61,7 @@ #define STRIDE_LENGTH 8 -#ifndef sparc +#ifndef __sparc__ #define ZAP_BOOTBLOCK #endif @@ -101,7 +101,7 @@ static void usage(NOARGS) exit(1); } -static int log2(int arg) +static int int_log2(int arg) { int l = 0; @@ -113,7 +113,7 @@ static int log2(int arg) return l; } -static int log10(unsigned int arg) +static int int_log10(unsigned int arg) { int l; @@ -237,7 +237,7 @@ static void set_fs_defaults(char *fs_type, struct ext2fs_sb *super, *inode_ratio = p->inode_ratio; if (blocksize == 0) { super->s_log_frag_size = super->s_log_block_size = - log2(p->blocksize >> EXT2_MIN_BLOCK_LOG_SIZE); + int_log2(p->blocksize >> EXT2_MIN_BLOCK_LOG_SIZE); } } if (blocksize == 0) @@ -402,7 +402,7 @@ static void write_inode_tables(ext2_filsys fs) /* * Figure out how many digits we need */ - i = log10(fs->group_desc_count); + i = int_log10(fs->group_desc_count); sprintf(format, "%%%dd/%%%dld", i, i); memset(backup, '\b', sizeof(backup)-1); backup[sizeof(backup)-1] = 0; @@ -602,7 +602,7 @@ static void show_stats(ext2_filsys fs) continue; if (i != 1) printf(", "); - need = log10(group_block) + 2; + need = int_log10(group_block) + 2; if (need > col_left) { printf("\n\t"); col_left = 72; @@ -772,7 +772,7 @@ static void PRS(int argc, char *argv[]) exit(1); } param.s_log_block_size = - log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE); + int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE); max = blocksize * 8; break; case 'c': @@ -787,7 +787,7 @@ static void PRS(int argc, char *argv[]) exit(1); } param.s_log_frag_size = - log2(size >> EXT2_MIN_BLOCK_LOG_SIZE); + int_log2(size >> EXT2_MIN_BLOCK_LOG_SIZE); printf("Warning: fragments not supported. " "Ignoring -f option\n"); break;