aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-06-25 21:05:19 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2002-06-25 21:05:19 +0000
commit8e8a913ff10f75adafbb959bfe78d229c10895d7 (patch)
treece69a9905671698a7e69d0ce49c58326e010c038
parentfc067ba5b86a710737b7d7a8385603a5b4318f8f (diff)
downloadnewlib-8e8a913ff10f75adafbb959bfe78d229c10895d7.zip
newlib-8e8a913ff10f75adafbb959bfe78d229c10895d7.tar.gz
newlib-8e8a913ff10f75adafbb959bfe78d229c10895d7.tar.bz2
2002-06-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/winbase.h (WINBASEAPI): Don't define if prior definition. * include/winioctl.h (PARTITION_FAT32, PARTITION_FAT32_XINT13, PARTITION_XINT13, PARTITION_XINT13_EXTENDED, PARTITION_LDM, PARTITION_UNIX): Add defines. (PDRIVE_LAYOUT_INFORMATION): Add typedef. (IsRecognizedPartition): Also check for PARTITION_FAT32, PARTITION_FAT32_XINT13 and PARTITION_XINT13. (IsContainerPartition): Add macro.
-rw-r--r--winsup/w32api/ChangeLog13
-rw-r--r--winsup/w32api/include/winbase.h2
-rw-r--r--winsup/w32api/include/winioctl.h29
3 files changed, 38 insertions, 6 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index f523042..186345e 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,3 +1,16 @@
+2002-06-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
+
+ * include/winbase.h (WINBASEAPI): Don't define if prior
+ definition.
+
+ * include/winioctl.h (PARTITION_FAT32, PARTITION_FAT32_XINT13,
+ PARTITION_XINT13, PARTITION_XINT13_EXTENDED, PARTITION_LDM,
+ PARTITION_UNIX): Add defines.
+ (PDRIVE_LAYOUT_INFORMATION): Add typedef.
+ (IsRecognizedPartition): Also check for PARTITION_FAT32,
+ PARTITION_FAT32_XINT13 and PARTITION_XINT13.
+ (IsContainerPartition): Add macro.
+
2002-06-25 Ken Fitlike <kenfitlike@hotmail.com>
* include/commctrl.h: (CBEIF_*): Add defines.
diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h
index 6a7dd2c..1ab63d0 100644
--- a/winsup/w32api/include/winbase.h
+++ b/winsup/w32api/include/winbase.h
@@ -4,7 +4,9 @@
#pragma GCC system_header
#endif
+#ifndef WINBASEAPI
#define WINBASEAPI DECLSPEC_IMPORT
+#endif
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winioctl.h b/winsup/w32api/include/winioctl.h
index faf0cdf..b779c29 100644
--- a/winsup/w32api/include/winioctl.h
+++ b/winsup/w32api/include/winioctl.h
@@ -134,7 +134,12 @@ extern "C" {
#define PARTITION_EXTENDED 5
#define PARTITION_HUGE 6
#define PARTITION_IFS 7
+#define PARTITION_FAT32 0x0B
+#define PARTITION_FAT32_XINT13 0x0C
+#define PARTITION_XINT13 0x0E
+#define PARTITION_XINT13_EXTENDED 0x0F
#define PARTITION_PREP 0x41
+#define PARTITION_LDM 0x42
#define PARTITION_UNIX 0x63
#define PARTITION_NTFT 128
#define VALID_NTFT 0xC0
@@ -261,7 +266,7 @@ typedef struct _DRIVE_LAYOUT_INFORMATION {
DWORD PartitionCount;
DWORD Signature;
PARTITION_INFORMATION PartitionEntry[1];
-} DRIVE_LAYOUT_INFORMATION;
+} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
typedef struct _PERF_BIN {
DWORD NumberOfBins;
DWORD TypeOfBin;
@@ -282,14 +287,26 @@ typedef struct _VERIFY_INFORMATION {
LARGE_INTEGER StartingOffset;
DWORD Length;
} VERIFY_INFORMATION,*PVERIFY_INFORMATION;
-#define IsRecognizedPartition(t) (((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_FAT_12))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_FAT_16))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_IFS))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_HUGE))||\
+#define IsRecognizedPartition(t)\
+ (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_16))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_IFS))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_HUGE))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
((t&~PARTITION_NTFT)==PARTITION_IFS)||\
- ((t&~PARTITION_NTFT)==PARTITION_HUGE))
+ ((t&~PARTITION_NTFT)==PARTITION_HUGE)||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
+ ((t&~PARTITION_NTFT)==PARTITION_XINT13))
+#define IsContainerPartition(t)\
+ (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_EXTENDED))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\
+ ((t&~PARTITION_NTFT)==PARTITION_EXTENDED)||\
+ ((t&~PARTITION_NTFT)==PARTITION_XINT13_EXTENDED))
#ifdef __cplusplus
}
#endif