Make it work on Cygwin.

(Logical change 1.188)
edge.strict_endians
cantab.net!aia21 2003-10-06 11:38:25 +00:00
parent 3d3b853379
commit aa247f5101
2 changed files with 30 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* endians.h - Definitions related to handling of byte ordering. Part of the
* Linux-NTFS project.
*
* Copyright (c) 2000-2002 Anton Altaparmakov
* Copyright (c) 2000-2003 Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@ -35,6 +35,28 @@
#include <asm/byteorder.h>
/* The following are not defined on Cygwin... Luckily Cygwin is LE already. */
#ifdef __CYGWIN32__
#define __le16_to_cpu(x) (x)
#define __le32_to_cpu(x) (x)
#define __le64_to_cpu(x) (x)
#define __cpu_to_le16(x) (x)
#define __cpu_to_le32(x) (x)
#define __cpu_to_le64(x) (x)
#define __constant_le16_to_cpu(x) (x)
#define __constant_le32_to_cpu(x) (x)
#define __constant_le64_to_cpu(x) (x)
#define __constant_cpu_to_le16(x) (x)
#define __constant_cpu_to_le32(x) (x)
#define __constant_cpu_to_le64(x) (x)
#endif /* __CYGWIN32__ */
/* Unsigned from LE to CPU conversion. */
#define le16_to_cpu(x) (u16)__le16_to_cpu((u16)(x))

View File

@ -30,6 +30,13 @@
# include <mntent.h>
#endif
/* Cygwin doesn't seem to have MS_RDONLY, so we define it here. */
#if defined(__CYGWIN32__) && !defined(MS_RDONLY)
typedef enum {
MS_RDONLY = 1,
} MS_MOUNT;
#endif
/* Forward declaration */
typedef struct _ntfs_volume ntfs_volume;