Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-06-28 23:25:22 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-06-28 23:25:22 +0400
commitca7f6a04b3d6e407fdee0f07cc0d1d2d3739ef44 (patch)
tree6a7345fd8d15b8bf3cb908d4860f98d9fbae13d1
parent06e429fd6d6684da9ed94ee803ae75561bcb5eb3 (diff)
* fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.
* fhandler_tape.cc: Ditto. * flock.cc (allow_others_to_sync): Use PISECURITY_DESCRIPTOR since PSECURITY_DESCRIPTOR is supposed to be the opaque type. * ntdll.h: Remove CreateDisposition flags again, now that they are defined in Mingw64's ntdef.h. Ditto for Create/Open flags.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/fhandler_serial.cc5
-rw-r--r--winsup/cygwin/fhandler_tape.cc5
-rw-r--r--winsup/cygwin/flock.cc2
-rw-r--r--winsup/cygwin/ntdll.h31
5 files changed, 20 insertions, 32 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ff3d70400..3c370a5e1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,14 @@
2012-06-28 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.
+ * fhandler_tape.cc: Ditto.
+ * flock.cc (allow_others_to_sync): Use PISECURITY_DESCRIPTOR since
+ PSECURITY_DESCRIPTOR is supposed to be the opaque type.
+ * ntdll.h: Remove CreateDisposition flags again, now that they are
+ defined in Mingw64's ntdef.h. Ditto for Create/Open flags.
+
+2012-06-28 Corinna Vinschen <corinna@vinschen.de>
+
* exceptions.cc (RtlUnwind): Align declaration with MSDN.
* ntdll.h: Define CreateDisposition Flags. Add comments.
* winlean.h: Define FILE_SHARE_VALID_FLAGS if using Mingw64 headers.
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
index c9a18c3d9..96b4062f1 100644
--- a/winsup/cygwin/fhandler_serial.cc
+++ b/winsup/cygwin/fhandler_serial.cc
@@ -19,7 +19,12 @@ details. */
#include "sigproc.h"
#include "pinfo.h"
#include <asm/socket.h>
+#ifdef __MINGW64_VERSION_MAJOR
+#include <devioctl.h>
+#include <ntddser.h>
+#else
#include <ddk/ntddser.h>
+#endif
#include "cygwait.h"
/**********************************************************************/
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index c394d862d..da2458217 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -15,7 +15,12 @@ details. */
#include <stdlib.h>
#include <sys/mtio.h>
#include <sys/param.h>
+#ifdef __MINGW64_VERSION_MAJOR
+#include <devioctl.h>
+#include <ntddstor.h>
+#else
#include <ddk/ntddstor.h>
+#endif
#include "security.h"
#include "path.h"
#include "fhandler.h"
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 176e4869e..0a4bdf0d1 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -164,7 +164,7 @@ allow_others_to_sync ()
at this point because this gets called during initialization when the tls
is not really available. */
#define MAX_PROCESS_SD_SIZE 3072
- PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR) alloca (MAX_PROCESS_SD_SIZE);
+ PISECURITY_DESCRIPTOR sd = (PISECURITY_DESCRIPTOR) alloca (MAX_PROCESS_SD_SIZE);
status = NtQuerySecurityObject (NtCurrentProcess (),
DACL_SECURITY_INFORMATION, sd,
MAX_PROCESS_SD_SIZE, &len);
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 6a9122354..c486a93c1 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -23,15 +23,6 @@
#define NtCurrentProcess() ((HANDLE) 0xffffffff)
#define NtCurrentThread() ((HANDLE) 0xfffffffe)
-/* CreateDisposition in NtCreateFile call. */
-#define FILE_SUPERSEDE 0x00000000
-#define FILE_OPEN 0x00000001
-#define FILE_CREATE 0x00000002
-#define FILE_OPEN_IF 0x00000003
-#define FILE_OVERWRITE 0x00000004
-#define FILE_OVERWRITE_IF 0x00000005
-#define FILE_MAXIMUM_DISPOSITION 0x00000005
-
/* Creation information returned in IO_STATUS_BLOCK. */
#define FILE_SUPERSEDED 0
#define FILE_OPENED 1
@@ -40,28 +31,6 @@
#define FILE_EXISTS 4
#define FILE_DOES_NOT_EXIST 5
-/* CreateFile/OpenFile options */
-#define FILE_DIRECTORY_FILE 0x00000001
-#define FILE_WRITE_THROUGH 0x00000002
-#define FILE_SEQUENTIAL_ONLY 0x00000004
-#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
-#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
-#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
-#define FILE_NON_DIRECTORY_FILE 0x00000040
-#define FILE_CREATE_TREE_CONNECTION 0x00000080
-#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
-#define FILE_NO_EA_KNOWLEDGE 0x00000200
-#define FILE_OPEN_FOR_RECOVERY 0x00000400
-#define FILE_RANDOM_ACCESS 0x00000800
-#define FILE_DELETE_ON_CLOSE 0x00001000
-#define FILE_OPEN_BY_FILE_ID 0x00002000
-#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
-#define FILE_NO_COMPRESSION 0x00008000
-#define FILE_RESERVE_OPFILTER 0x00100000
-#define FILE_OPEN_REPARSE_POINT 0x00200000
-#define FILE_OPEN_NO_RECALL 0x00400000
-#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
-
/* Relative file position values in NtWriteFile call. */
#define FILE_WRITE_TO_END_OF_FILE (-1LL)
#define FILE_USE_FILE_POINTER_POSITION (-2LL)