1999-10-25 <tytso@valinux.com>
+ * 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.
+
* problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
* pass2.c (check_dir_block): Require that the length of the
#ifdef HAVE_CONIO_H
#undef HAVE_TERMIOS_H
#include <conio.h>
-#define getchar() getch()
+#define read_a_char() getch()
#else
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
+#else /* !HAVE_CONIO_H */
+#include <stdio.h>
+#define read_a_char getchar()
#endif
#ifdef HAVE_MALLOC_H
printf("%s%s? ", string, defstr);
while (1) {
fflush (stdout);
- if ((c = getchar()) == EOF)
+ if ((c = read_a_char()) == EOF)
break;
c = toupper(c);
if (c == 'Y') {
* 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
#endif
#include <sys/ioctl.h>
#include <sys/types.h>
-#include <sys/stat.h>
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
#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"
* 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(¶m))
+ ((__u64) param.s_blocks_count * EXT2_BLOCK_SIZE(¶m))
/ inode_ratio;
/*