From 7851e816be0c1d4b885eefacae04aaa238b6f7cf Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Thu, 28 Jul 2005 03:10:35 +0000 Subject: [PATCH] fixed building dosfsck svn path=/trunk/; revision=16825 --- rosapps/sysutils/dosfsck/dosfsck.c | 2 +- rosapps/sysutils/dosfsck/generic.h | 172 ----------------------- rosapps/sysutils/dosfsck/little_endian.h | 106 -------------- rosapps/sysutils/dosfsck/types.h.bak | 72 ---------- 4 files changed, 1 insertion(+), 351 deletions(-) delete mode 100644 rosapps/sysutils/dosfsck/generic.h delete mode 100644 rosapps/sysutils/dosfsck/little_endian.h delete mode 100644 rosapps/sysutils/dosfsck/types.h.bak diff --git a/rosapps/sysutils/dosfsck/dosfsck.c b/rosapps/sysutils/dosfsck/dosfsck.c index 2f5886b7e54..b0ddad1244c 100644 --- a/rosapps/sysutils/dosfsck/dosfsck.c +++ b/rosapps/sysutils/dosfsck/dosfsck.c @@ -6,7 +6,7 @@ * by Roman Hodek */ -#include "../version.h" +#include "version.h" #include #include diff --git a/rosapps/sysutils/dosfsck/generic.h b/rosapps/sysutils/dosfsck/generic.h deleted file mode 100644 index 5fde6f4d6c1..00000000000 --- a/rosapps/sysutils/dosfsck/generic.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef _LINUX_BYTEORDER_GENERIC_H -#define _LINUX_BYTEORDER_GENERIC_H - -/* - * linux/byteorder_generic.h - * Generic Byte-reordering support - * - * Francois-Rene Rideau 19970707 - * gathered all the good ideas from all asm-foo/byteorder.h into one file, - * cleaned them up. - * I hope it is compliant with non-GCC compilers. - * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h, - * because I wasn't sure it would be ok to put it in types.h - * Upgraded it to 2.1.43 - * Francois-Rene Rideau 19971012 - * Upgraded it to 2.1.57 - * to please Linus T., replaced huge #ifdef's between little/big endian - * by nestedly #include'd files. - * Francois-Rene Rideau 19971205 - * Made it to 2.1.71; now a facelift: - * Put files under include/linux/byteorder/ - * Split swab from generic support. - * - * TODO: - * = Regular kernel maintainers could also replace all these manual - * byteswap macros that remain, disseminated among drivers, - * after some grep or the sources... - * = Linus might want to rename all these macros and files to fit his taste, - * to fit his personal naming scheme. - * = it seems that a few drivers would also appreciate - * nybble swapping support... - * = every architecture could add their byteswap macro in asm/byteorder.h - * see how some architectures already do (i386, alpha, ppc, etc) - * = cpu_to_beXX and beXX_to_cpu might some day need to be well - * distinguished throughout the kernel. This is not the case currently, - * since little endian, big endian, and pdp endian machines needn't it. - * But this might be the case for, say, a port of Linux to 20/21 bit - * architectures (and F21 Linux addict around?). - */ - -/* - * The following macros are to be defined by : - * - * Conversion of long and short int between network and host format - * ntohl(__u32 x) - * ntohs(__u16 x) - * htonl(__u32 x) - * htons(__u16 x) - * It seems that some programs (which? where? or perhaps a standard? POSIX?) - * might like the above to be functions, not macros (why?). - * if that's true, then detect them, and take measures. - * Anyway, the measure is: define only ___ntohl as a macro instead, - * and in a separate file, have - * unsigned long inline ntohl(x){return ___ntohl(x);} - * - * The same for constant arguments - * __constant_ntohl(__u32 x) - * __constant_ntohs(__u16 x) - * __constant_htonl(__u32 x) - * __constant_htons(__u16 x) - * - * Conversion of XX-bit integers (16- 32- or 64-) - * between native CPU format and little/big endian format - * 64-bit stuff only defined for proper architectures - * cpu_to_[bl]eXX(__uXX x) - * [bl]eXX_to_cpu(__uXX x) - * - * The same, but takes a pointer to the value to convert - * cpu_to_[bl]eXXp(__uXX x) - * [bl]eXX_to_cpup(__uXX x) - * - * The same, but change in situ - * cpu_to_[bl]eXXs(__uXX x) - * [bl]eXX_to_cpus(__uXX x) - * - * See asm-foo/byteorder.h for examples of how to provide - * architecture-optimized versions - * - */ - - -#if defined(__KERNEL__) -/* - * inside the kernel, we can use nicknames; - * outside of it, we must avoid POSIX namespace pollution... - */ -#define cpu_to_le64 __cpu_to_le64 -#define le64_to_cpu __le64_to_cpu -#define cpu_to_le32 __cpu_to_le32 -#define le32_to_cpu __le32_to_cpu -#define cpu_to_le16 __cpu_to_le16 -#define le16_to_cpu __le16_to_cpu -#define cpu_to_be64 __cpu_to_be64 -#define be64_to_cpu __be64_to_cpu -#define cpu_to_be32 __cpu_to_be32 -#define be32_to_cpu __be32_to_cpu -#define cpu_to_be16 __cpu_to_be16 -#define be16_to_cpu __be16_to_cpu -#define cpu_to_le64p __cpu_to_le64p -#define le64_to_cpup __le64_to_cpup -#define cpu_to_le32p __cpu_to_le32p -#define le32_to_cpup __le32_to_cpup -#define cpu_to_le16p __cpu_to_le16p -#define le16_to_cpup __le16_to_cpup -#define cpu_to_be64p __cpu_to_be64p -#define be64_to_cpup __be64_to_cpup -#define cpu_to_be32p __cpu_to_be32p -#define be32_to_cpup __be32_to_cpup -#define cpu_to_be16p __cpu_to_be16p -#define be16_to_cpup __be16_to_cpup -#define cpu_to_le64s __cpu_to_le64s -#define le64_to_cpus __le64_to_cpus -#define cpu_to_le32s __cpu_to_le32s -#define le32_to_cpus __le32_to_cpus -#define cpu_to_le16s __cpu_to_le16s -#define le16_to_cpus __le16_to_cpus -#define cpu_to_be64s __cpu_to_be64s -#define be64_to_cpus __be64_to_cpus -#define cpu_to_be32s __cpu_to_be32s -#define be32_to_cpus __be32_to_cpus -#define cpu_to_be16s __cpu_to_be16s -#define be16_to_cpus __be16_to_cpus -#endif - - -#if defined(__KERNEL__) -/* - * Handle ntohl and suches. These have various compatibility - * issues - like we want to give the prototype even though we - * also have a macro for them in case some strange program - * wants to take the address of the thing or something.. - * - * Note that these used to return a "long" in libc5, even though - * long is often 64-bit these days.. Thus the casts. - * - * They have to be macros in order to do the constant folding - * correctly - if the argument passed into a inline function - * it is no longer constant according to gcc.. - */ - -#undef ntohl -#undef ntohs -#undef htonl -#undef htons - -/* - * Do the prototypes. Somebody might want to take the - * address or some such sick thing.. - */ -extern __u32 ntohl(__be32); -extern __be32 htonl(__u32); -extern __u16 ntohs(__be16); -extern __be16 htons(__u16); - -#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) - -#define ___htonl(x) __cpu_to_be32(x) -#define ___htons(x) __cpu_to_be16(x) -#define ___ntohl(x) __be32_to_cpu(x) -#define ___ntohs(x) __be16_to_cpu(x) - -#define htonl(x) ___htonl(x) -#define ntohl(x) ___ntohl(x) -#define htons(x) ___htons(x) -#define ntohs(x) ___ntohs(x) - -#endif /* OPTIMIZE */ - -#endif /* KERNEL */ - - -#endif /* _LINUX_BYTEORDER_GENERIC_H */ diff --git a/rosapps/sysutils/dosfsck/little_endian.h b/rosapps/sysutils/dosfsck/little_endian.h deleted file mode 100644 index b842881e3dd..00000000000 --- a/rosapps/sysutils/dosfsck/little_endian.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H -#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H - -#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN 1234 -#endif -#ifndef __LITTLE_ENDIAN_BITFIELD -#define __LITTLE_ENDIAN_BITFIELD -#endif - -#include "types.h" -#include "swab.h" - -#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) -#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) -#define __constant_htons(x) ((__force __be16)___constant_swab16((x))) -#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) -#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x)) -#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x)) -#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x)) -#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x)) -#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x)) -#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x)) -#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x))) -#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x)) -#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) -#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x)) -#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x))) -#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x)) -#define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) -#define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) -#define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) -#define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) -#define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) -#define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) -#define __cpu_to_be64(x) ((__force __be64)__swab64((x))) -#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) -#define __cpu_to_be32(x) ((__force __be32)__swab32((x))) -#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) -#define __cpu_to_be16(x) ((__force __be16)__swab16((x))) -#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) - -static inline __le64 __cpu_to_le64p(const __u64 *p) -{ - return (__force __le64)*p; -} -static inline __u64 __le64_to_cpup(const __le64 *p) -{ - return (__force __u64)*p; -} -static inline __le32 __cpu_to_le32p(const __u32 *p) -{ - return (__force __le32)*p; -} -static inline __u32 __le32_to_cpup(const __le32 *p) -{ - return (__force __u32)*p; -} -static inline __le16 __cpu_to_le16p(const __u16 *p) -{ - return (__force __le16)*p; -} -static inline __u16 __le16_to_cpup(const __le16 *p) -{ - return (__force __u16)*p; -} -static inline __be64 __cpu_to_be64p(const __u64 *p) -{ - return (__force __be64)__swab64p(p); -} -static inline __u64 __be64_to_cpup(const __be64 *p) -{ - return __swab64p((__u64 *)p); -} -static inline __be32 __cpu_to_be32p(const __u32 *p) -{ - return (__force __be32)__swab32p(p); -} -static inline __u32 __be32_to_cpup(const __be32 *p) -{ - return __swab32p((__u32 *)p); -} -static inline __be16 __cpu_to_be16p(const __u16 *p) -{ - return (__force __be16)__swab16p(p); -} -static inline __u16 __be16_to_cpup(const __be16 *p) -{ - return __swab16p((__u16 *)p); -} -#define __cpu_to_le64s(x) do {} while (0) -#define __le64_to_cpus(x) do {} while (0) -#define __cpu_to_le32s(x) do {} while (0) -#define __le32_to_cpus(x) do {} while (0) -#define __cpu_to_le16s(x) do {} while (0) -#define __le16_to_cpus(x) do {} while (0) -#define __cpu_to_be64s(x) __swab64s((x)) -#define __be64_to_cpus(x) __swab64s((x)) -#define __cpu_to_be32s(x) __swab32s((x)) -#define __be32_to_cpus(x) __swab32s((x)) -#define __cpu_to_be16s(x) __swab16s((x)) -#define __be16_to_cpus(x) __swab16s((x)) - -#include "generic.h" - -#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ diff --git a/rosapps/sysutils/dosfsck/types.h.bak b/rosapps/sysutils/dosfsck/types.h.bak deleted file mode 100644 index 901b77c42b8..00000000000 --- a/rosapps/sysutils/dosfsck/types.h.bak +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _I386_TYPES_H -#define _I386_TYPES_H - -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - -#endif /* __ASSEMBLY__ */ - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ -#ifdef __KERNEL__ - -#define BITS_PER_LONG 32 - -#ifndef __ASSEMBLY__ - -#include - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -/* DMA addresses come in generic and 64-bit flavours. */ - -#ifdef CONFIG_HIGHMEM64G -typedef u64 dma_addr_t; -#else -typedef u32 dma_addr_t; -#endif -typedef u64 dma64_addr_t; - -#ifdef CONFIG_LBD -typedef u64 sector_t; -#define HAVE_SECTOR_T -#endif - -typedef unsigned short kmem_bufctl_t; - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ - -#endif -- 2.17.1