Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Kai Tietz
Hi Corinna,

patch is ok.  Well, I am not opposed to replace WINAPI here in that
header by NTAPI.  Ozkan, any objections?

Thanks,
Kai


2012/10/11 Corinna Vinschen vinsc...@redhat.com:
 Hi,

 the below patch adds a bit of file and file system releated stuff
 to winternl.h.  This is quite useful functionality and used by a
 few Cygwin tools I'd like to keep compilable when we switch to mingw64
 headers.

 Ok to apply?

 Btw., most function declarations in winternl.h use the WINAPI
 decoration.  Since all these functions are ntdll.dll functions, this
 should actually be NTAPI.  Granted, it's the same thing, but it's
 the more correct name for the same thing...
 If you agree, I'd replace WINAPI with NTAPI throughout as well.  Is
 that ok?


 Thanks,
 Corinna

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Ozkan Sezer
On 10/11/12, Kai Tietz ktiet...@googlemail.com wrote:
 Hi Corinna,

 patch is ok.  Well, I am not opposed to replace WINAPI here in that
 header by NTAPI.  Ozkan, any objections?


NTAPI in winternl.h would be suitable, yes. That's OK by me.


 Thanks,
 Kai


 2012/10/11 Corinna Vinschen vinsc...@redhat.com:
 Hi,

 the below patch adds a bit of file and file system releated stuff
 to winternl.h.  This is quite useful functionality and used by a
 few Cygwin tools I'd like to keep compilable when we switch to mingw64
 headers.

 Ok to apply?

 Btw., most function declarations in winternl.h use the WINAPI
 decoration.  Since all these functions are ntdll.dll functions, this
 should actually be NTAPI.  Granted, it's the same thing, but it's
 the more correct name for the same thing...
 If you agree, I'd replace WINAPI with NTAPI throughout as well.  Is
 that ok?


 Thanks,
 Corinna


--
O.S.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Corinna Vinschen
On Oct 11 18:10, Ozkan Sezer wrote:
 On 10/11/12, Kai Tietz ktiet...@googlemail.com wrote:
  Hi Corinna,
 
  patch is ok.  Well, I am not opposed to replace WINAPI here in that
  header by NTAPI.  Ozkan, any objections?
 
 
 NTAPI in winternl.h would be suitable, yes. That's OK by me.
 
  Thanks,
  Kai
 
 
  2012/10/11 Corinna Vinschen vinsc...@redhat.com:
  Hi,
 
  the below patch adds a bit of file and file system releated stuff
  to winternl.h.  This is quite useful functionality and used by a
  few Cygwin tools I'd like to keep compilable when we switch to mingw64
  headers.
 
  Ok to apply?
 
  Btw., most function declarations in winternl.h use the WINAPI
  decoration.  Since all these functions are ntdll.dll functions, this
  should actually be NTAPI.  Granted, it's the same thing, but it's
  the more correct name for the same thing...
  If you agree, I'd replace WINAPI with NTAPI throughout as well.  Is
  that ok?
 
 
  Thanks,
  Corinna
 
 
 --
 O.S.

Thanks guys.  Patch applied.


Corinna

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Rainer Emrich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This patch causes an issue compiling winpthreads!

/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
- -I/opt/devel/gnu/src/gcc-mingw-w64/winpthreads
- -I/opt/devel/gnu/src/gcc-mingw-w64/winpthreads/include -DIN_WINPTHREAD  -Wall
- -DWIN32_LEAN_AND_MEAN -g -O2 -MT src/libwinpthread_la-mutex.lo -MD -MP -MF
src/.deps/libwinpthread_la-mutex.Tpo -c -o src/libwinpthread_la-mutex.lo `test
- -f 'src/mutex.c' || echo
'/opt/devel/gnu/src/gcc-mingw-w64/winpthreads/'`src/mutex.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I.
- -I/opt/devel/gnu/src/gcc-mingw-w64/winpthreads
- -I/opt/devel/gnu/src/gcc-mingw-w64/winpthreads/include -DIN_WINPTHREAD -Wall
- -DWIN32_LEAN_AND_MEAN -g -O2 -MT src/libwinpthread_la-mutex.lo -MD -MP -MF
src/.deps/libwinpthread_la-mutex.Tpo -c
/opt/devel/gnu/src/gcc-mingw-w64/winpthreads/src/mutex.c  -DDLL_EXPORT -DPIC
- -o src/.libs/libwinpthread_la-mutex.o
In file included from
d:/opt/devel/gnu/src/gcc-mingw-w64/winpthreads/src/mutex.c:24:0:
D:/x86_64-w64-trunk/mingw/include/winternl.h:513:5: error: unknown type name
'DEVICE_TYPE'
make[1]: *** [src/libwinpthread_la-mutex.lo] Error 1
make[1]: Leaving directory
`/home/rainer/software/build/winpthreads/x86_64-w64-mingw32/trunk'
make: *** [all] Error 2

Rainer

Am 11.10.2012 15:27, schrieb Corinna Vinschen:
 Hi,
 
 the below patch adds a bit of file and file system releated stuff to 
 winternl.h.  This is quite useful functionality and used by a few Cygwin 
 tools I'd like to keep compilable when we switch to mingw64 headers.
 
 Ok to apply?
 
 Btw., most function declarations in winternl.h use the WINAPI decoration. 
 Since all these functions are ntdll.dll functions, this should actually be 
 NTAPI.  Granted, it's the same thing, but it's the more correct name for 
 the same thing... If you agree, I'd replace WINAPI with NTAPI throughout
 as well.  Is that ok?
 
 
 Thanks, Corinna
 
 
 * winternl.h (enum _FSINFOCLASS): Define. (struct 
 _FILE_FS_VOLUME_INFORMATION): Define. (struct _FILE_FS_LABEL_INFORMATION): 
 Define. (struct _FILE_FS_SIZE_INFORMATION): Define. (struct 
 _FILE_FS_DEVICE_INFORMATION): Define. (struct 
 _FILE_FS_ATTRIBUTE_INFORMATION): Define. (struct 
 _FILE_FS_FULL_SIZE_INFORMATION): Define. (struct 
 _FILE_FS_OBJECTID_INFORMATION): Define. (NtFsControlFile): Declare. 
 (NtQueryVolumeInformationFile): Declare. (NtSetInformationFile): Declare. 
 (NtSetVolumeInformationFile): Declare. (RtlDosPathNameToNtPathName_U): 
 Declare.
 
 
 Index: include/winternl.h 
 === --- 
 include/winternl.h(revision 5428) +++ include/winternl.h  (working copy)
 @@ -474,7 +474,66 @@ FILE_ALIGNMENT_INFORMATION AlignmentInformation; 
 FILE_NAME_INFORMATION  NameInformation; } FILE_ALL_INFORMATION, 
 *PFILE_ALL_INFORMATION; - + +  typedef enum _FSINFOCLASS { + 
 FileFsVolumeInformation = 1, +FileFsLabelInformation, + 
 FileFsSizeInformation, +FileFsDeviceInformation, + 
 FileFsAttributeInformation, +FileFsControlInformation, + 
 FileFsFullSizeInformation, +FileFsObjectIdInformation, + 
 FileFsDriverPathInformation, +FileFsVolumeFlagsInformation, + 
 FileFsMaximumInformation +  } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
 + +  typedef struct _FILE_FS_VOLUME_INFORMATION { + LARGE_INTEGER
 VolumeCreationTime; +ULONG VolumeSerialNumber; +ULONG 
 VolumeLabelLength; +BOOLEAN SupportsObjects; +WCHAR VolumeLabel[1];
 +  } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION; + +  typedef
 struct _FILE_FS_LABEL_INFORMATION { +ULONG VolumeLabelLength; +
 WCHAR VolumeLabel[1]; +  } FILE_FS_LABEL_INFORMATION, 
 *PFILE_FS_LABEL_INFORMATION; + +  typedef struct _FILE_FS_SIZE_INFORMATION 
 { +LARGE_INTEGER TotalAllocationUnits; +LARGE_INTEGER 
 AvailableAllocationUnits; +ULONG SectorsPerAllocationUnit; +ULONG 
 BytesPerSector; +  } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
  + +  typedef struct _FILE_FS_DEVICE_INFORMATION { +DEVICE_TYPE 
 DeviceType; +ULONG Characteristics; +  } FILE_FS_DEVICE_INFORMATION, 
 *PFILE_FS_DEVICE_INFORMATION; + +  typedef struct 
 _FILE_FS_ATTRIBUTE_INFORMATION { +ULONG FileSystemAttributes; + ULONG
 MaximumComponentNameLength; +ULONG FileSystemNameLength; + WCHAR
 FileSystemName[1]; +  } FILE_FS_ATTRIBUTE_INFORMATION, 
 *PFILE_FS_ATTRIBUTE_INFORMATION; + +  typedef struct 
 _FILE_FS_FULL_SIZE_INFORMATION { +LARGE_INTEGER TotalAllocationUnits;
 + LARGE_INTEGER CallerAvailableAllocationUnits; +LARGE_INTEGER 
 ActualAvailableAllocationUnits; +ULONG SectorsPerAllocationUnit; + 
 ULONG BytesPerSector; +  } FILE_FS_FULL_SIZE_INFORMATION, 
 *PFILE_FS_FULL_SIZE_INFORMATION; + +  typedef struct 
 _FILE_FS_OBJECTID_INFORMATION { +UCHAR ObjectId[16]; +UCHAR 
 ExtendedInfo[48]; +  } FILE_FS_OBJECTID_INFORMATION, 
 *PFILE_FS_OBJECTID_INFORMATION; + typedef struct _IO_STATUS_BLOCK { 
 __C89_NAMELESS union { 

Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Corinna Vinschen
On Oct 11 18:39, Rainer Emrich wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 This patch causes an issue compiling winpthreads!
 [...]
 D:/x86_64-w64-trunk/mingw/include/winternl.h:513:5: error: unknown type name
 'DEVICE_TYPE'

Sorry.  I didn't see this because winioctl.h was included as well when
I tested that.  I see two ways to fix this:

- Either change winioctl.h and winternl.h to define DEVICE_TYPE like
  this:

#ifndef DEVICE_TYPE
#define DEVICE_TYPE DWORD
#endif

- Or simply change winioctl.h to use ULONG instead.

Whatever is preferred.


Corinna

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Kai Tietz
2012/10/11 Corinna Vinschen vinsc...@redhat.com:
 On Oct 11 18:39, Rainer Emrich wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 This patch causes an issue compiling winpthreads!
 [...]
 D:/x86_64-w64-trunk/mingw/include/winternl.h:513:5: error: unknown type name
 'DEVICE_TYPE'

 Sorry.  I didn't see this because winioctl.h was included as well when
 I tested that.  I see two ways to fix this:

 - Either change winioctl.h and winternl.h to define DEVICE_TYPE like
   this:

 #ifndef DEVICE_TYPE
 #define DEVICE_TYPE DWORD
 #endif

I prefer this variant.

 - Or simply change winioctl.h to use ULONG instead.

 Whatever is preferred.


 Corinna

Thanks,
Kai

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Corinna Vinschen
On Oct 11 19:23, Kai Tietz wrote:
 2012/10/11 Corinna Vinschen vinsc...@redhat.com:
  On Oct 11 18:39, Rainer Emrich wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  This patch causes an issue compiling winpthreads!
  [...]
  D:/x86_64-w64-trunk/mingw/include/winternl.h:513:5: error: unknown type 
  name
  'DEVICE_TYPE'
 
  Sorry.  I didn't see this because winioctl.h was included as well when
  I tested that.  I see two ways to fix this:
 
  - Either change winioctl.h and winternl.h to define DEVICE_TYPE like
this:
 
  #ifndef DEVICE_TYPE
  #define DEVICE_TYPE DWORD
  #endif
 
 I prefer this variant.

Applied.  I used ULONG in winternl.h, though, since DWORD is (correctly)
not used at all in that file.


Corinna

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch] winternl.h: Add file and filesystem related functionality

2012-10-11 Thread Rainer Emrich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 11.10.2012 19:34, schrieb Corinna Vinschen:
 On Oct 11 19:23, Kai Tietz wrote:
 2012/10/11 Corinna Vinschen vinsc...@redhat.com:
 On Oct 11 18:39, Rainer Emrich wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
 This patch causes an issue compiling winpthreads! [...] 
 D:/x86_64-w64-trunk/mingw/include/winternl.h:513:5: error: unknown
 type name 'DEVICE_TYPE'
 
 Sorry.  I didn't see this because winioctl.h was included as well when 
 I tested that.  I see two ways to fix this:
 
 - Either change winioctl.h and winternl.h to define DEVICE_TYPE like 
 this:
 
 #ifndef DEVICE_TYPE #define DEVICE_TYPE DWORD #endif
 
 I prefer this variant.
 
 Applied.  I used ULONG in winternl.h, though, since DWORD is (correctly) 
 not used at all in that file.

Looks good now!

Rainer



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQdwvIAAoJEB3HOsWs+KJb+hAH/AldAVBlEBlxTuTHs6yQjfsp
+2r36g1wpaaIMcDtAcGJDNKNZQbGUD2FxIC+NvRx/gmN0N7yHQEdbbUum/WFq/rz
ZS2vTqqz5ANXwfii7hqIef+SJZmTVKQBFXtbVurRjzCKnirH8DXPyPSIH+C5UfGE
m6n+eoiviYDNn7PchciyHA05c5SdlZT3VTDfho6w2xuLSc+XfvtoBtqgkVpj8fbj
w2DnUFsW1x3GKihja2hBM08Q2H//5qLvX5TBdY9xcGSUgenmk8j/5Ckscajx7D2E
8Kn4cUX9V9dnNI5FF5JbGcF8dJc+ffrjIZdfFM3qTI6XQVSugvrrexzGXrLYSJs=
=2X9h
-END PGP SIGNATURE-

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public