summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1999-10-26 02:30:16 +0000
committerTheodore Ts'o <tytso@mit.edu>1999-10-26 02:30:16 +0000
commite6597048d9d1637c9f997363a7f45c74b98fd0e2 (patch)
tree7b815e498060d5709c5e0ce0eb1c10ce12ccd320 /misc
parent601002bd2a144da02165529743a4b1621cfe9ae3 (diff)
downloade2fsprogs-e6597048d9d1637c9f997363a7f45c74b98fd0e2.tar.gz
ChangeLog, mke2fs.c:
mke2fs.c (PRS): Use __u64 instead of long long for portability reasons. Moved #include of sys/stat.h inside #ifdef HAVE_LINUX_MAJOR_H for portability reasons. ChangeLog, util.c: util.c: For NT portability, don't redefine getchar(), since stdio defines that. Instead we introduce a new abstract macro read_a_char() which is #defined to the right function as necessary.
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog3
-rw-r--r--misc/mke2fs.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 6f380998..508aafb0 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -2,6 +2,9 @@
* mke2fs.c (show_stats): Capitalized Hurd to make the GNU types
happy.
+ (PRS): Use __u64 instead of long long for portability
+ reasons. Also moved #include of sys/stat.h inside #ifdef
+ HAVE_LINUX_MAJOR_H for portability reasons.
* fsck.c (execute): Fix really stupid bug in the linked list
management which caused fsck in parallel mode to go into
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 1c1c19aa..5ab30ebe 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -40,7 +40,6 @@
#endif
#include <sys/ioctl.h>
#include <sys/types.h>
-#include <sys/stat.h>
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
@@ -48,6 +47,7 @@
#include <linux/ext2_fs.h>
#ifdef HAVE_LINUX_MAJOR_H
#include <linux/major.h>
+#include <sys/stat.h> /* Only need sys/stat.h for major nr test */
#endif
#include "et/com_err.h"
@@ -952,7 +952,7 @@ static void PRS(int argc, char *argv[])
* Calculate number of inodes based on the inode ratio
*/
param.s_inodes_count = num_inodes ? num_inodes :
- ((long long) param.s_blocks_count * EXT2_BLOCK_SIZE(&param))
+ ((__u64) param.s_blocks_count * EXT2_BLOCK_SIZE(&param))
/ inode_ratio;
/*