We needn't to duplicate stuff from <sys/param.h>.
Signed-off-by: Karel Zak <kzak@redhat.com>
fsck.minix.8 mkfs.minix.8 mkfs.bfs.8
sbin_PROGRAMS = mkfs mkswap fsck.minix mkfs.minix mkfs.bfs
-fsck_minix_SOURCES = fsck.minix.c minix_bitops.h minix.h
-mkfs_minix_SOURCES = mkfs.minix.c minix_bitops.h minix.h $(utils_common)
+fsck_minix_SOURCES = fsck.minix.c minix.h
+mkfs_minix_SOURCES = mkfs.minix.c minix.h $(utils_common)
mkfs_bfs_SOURCES = mkfs.bfs.c $(utils_common)
mkswap_SOURCES = mkswap.c $(utils_common)
#include <termios.h>
#include <mntent.h>
#include <sys/stat.h>
+#include <sys/param.h>
#include <signal.h>
#include "minix.h"
static void recursive_check(unsigned int ino);
static void recursive_check2(unsigned int ino);
-#include "minix_bitops.h"
-
-#define inode_in_use(x) (bit(inode_map,(x)))
-#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1))
+#define inode_in_use(x) (isset(inode_map,(x)))
+#define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1))
#define mark_inode(x) (setbit(inode_map,(x)),changed=1)
#define unmark_inode(x) (clrbit(inode_map,(x)),changed=1)
#define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1),changed=1)
#define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1),changed=1)
-
static void
reset(void) {
if (termios_set)
+++ /dev/null
-#ifdef __i386__
-
-#define bitop(name,op) \
-static inline int name(char * addr,unsigned int nr) \
-{ \
-int __res; \
-__asm__ __volatile__("bt" op " %1,%2; adcl $0,%0" \
-:"=g" (__res) \
-:"r" (nr),"m" (*(addr)),"0" (0)); \
-return __res; \
-}
-
-bitop(bit,"")
-bitop(setbit,"s")
-bitop(clrbit,"r")
-
-#elif defined(__mc68000__)
-
-#define bitop(name,op) \
-static inline int name (char *addr, unsigned int nr) \
-{ \
- char __res; \
- __asm__ __volatile__("bf" op " %2@{%1:#1}; sne %0" \
- : "=d" (__res) \
- : "d" (nr ^ 15), "a" (addr)); \
- return __res != 0; \
-}
-
-bitop (bit, "tst")
-bitop (setbit, "set")
-bitop (clrbit, "clr")
-
-#else
-static inline int bit(char * addr,unsigned int nr)
-{
- return (addr[nr >> 3] & (1<<(nr & 7))) != 0;
-}
-
-static inline int setbit(char * addr,unsigned int nr)
-{
- int __res = bit(addr, nr);
- addr[nr >> 3] |= (1<<(nr & 7));
- return __res != 0; \
-}
-
-static inline int clrbit(char * addr,unsigned int nr)
-{
- int __res = bit(addr, nr);
- addr[nr >> 3] &= ~(1<<(nr & 7));
- return __res != 0;
-}
-
-#endif
-
#include <termios.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <mntent.h>
#include <getopt.h>
#include "nls.h"
#include "pathnames.h"
-#ifndef __GNUC__
-#error "needs gcc for the bitop-__asm__'s"
-#endif
-
#define MINIX_ROOT_INO 1
#define MINIX_BAD_INO 2
static int used_good_blocks = 0;
static unsigned long req_nr_inodes = 0;
-#include "minix_bitops.h"
-
-#define inode_in_use(x) (bit(inode_map,(x)))
-#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1))
+#define inode_in_use(x) (isset(inode_map,(x)))
+#define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1))
#define mark_inode(x) (setbit(inode_map,(x)))
#define unmark_inode(x) (clrbit(inode_map,(x)))