This is the mail archive of the cygwin-apps mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 6/2/2012 08:24, Yaakov (Cygwin/X) wrote: > On 2012-06-01 18:45, JonY wrote: >> Some of these errors might be related to ntdef.h use, try removing it. > > This stops the duplication errors, but NT_SUCCESS is defined in ntdef.h, > leading to some undeclared errors. > > There appear to be some bugs in winternl.h. According to MSDN[1], > winternl.h is wrong wrt the fourth argument type of > NtQueryInformationFile (should be ULONG, not LONG). Also, the member > names in struct FILE_RENAME_INFORMATION do not match MSDN[2]. > MSDN is known to contain errors, I can't say which is correct. I'll ask Kai about this. > With those changes, the results are: > > CXX filemanip.o > filemanip.cc: In function ‘DWORD GetFileAttributesW(const WCHAR*)’: > filemanip.cc:296:10: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > filemanip.cc:297:24: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not > declared in this scope > filemanip.cc:297:54: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared > in this scope > filemanip.cc:299:25: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:309:26: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc: In function ‘WINBOOL SetFileAttributesW(const WCHAR*, > DWORD)’: > filemanip.cc:328:10: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > filemanip.cc:329:24: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not > declared in this scope > filemanip.cc:329:54: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared > in this scope > filemanip.cc:331:25: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:341:26: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:343:28: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc: In function ‘WINBOOL MoveFileW(const WCHAR*, const WCHAR*)’: > filemanip.cc:360:22: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > filemanip.cc:361:10: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not > declared in this scope > filemanip.cc:361:40: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared > in this scope > filemanip.cc:363:25: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:379:26: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:381:28: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc: In function ‘BOOL unlink(const WCHAR*, ULONG)’: > filemanip.cc:398:22: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > filemanip.cc:399:10: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not > declared in this scope > filemanip.cc:400:12: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared > in this scope > filemanip.cc:403:25: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:410:26: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc:412:28: error: ‘NT_SUCCESS’ was not declared in this scope > filemanip.cc: In function ‘WINBOOL DeleteFileW(const WCHAR*)’: > filemanip.cc:418:25: error: ‘FILE_NON_DIRECTORY_FILE’ was not declared > in this scope > filemanip.cc: In function ‘WINBOOL RemoveDirectoryW(const WCHAR*)’: > filemanip.cc:424:25: error: ‘FILE_DIRECTORY_FILE’ was not declared in > this scope > filemanip.cc: In function ‘FILE* nt_wfopen(const wchar_t*, const char*, > mode_t)’: > filemanip.cc:446:14: error: ‘FILE_OPEN’ was not declared in this scope > filemanip.cc:450:14: error: ‘FILE_OVERWRITE_IF’ was not declared in this > scope > filemanip.cc:454:14: error: ‘FILE_OPEN_IF’ was not declared in this scope > filemanip.cc:492:3: error: ‘FILE_OPEN’ was not declared in this scope > filemanip.cc:498:28: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > filemanip.cc:499:5: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not > declared in this scope > filemanip.cc:500:7: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared in > this scope > filemanip.cc:501:7: error: ‘FILE_SYNCHRONOUS_IO_NONALERT’ was not > declared in this scope > filemanip.cc:503:26: error: ‘NT_SUCCESS’ was not declared in this scope > cc1plus: warnings being treated as errors > filemanip.cc: In function ‘WINBOOL RemoveDirectoryW(const WCHAR*)’: > filemanip.cc:425:1: error: control reaches end of non-void function > filemanip.cc: In function ‘WINBOOL DeleteFileW(const WCHAR*)’: > filemanip.cc:419:1: error: control reaches end of non-void function > filemanip.cc: In function ‘WINBOOL MoveFileW(const WCHAR*, const WCHAR*)’: > filemanip.cc:382:1: error: control reaches end of non-void function > filemanip.cc: In function ‘WINBOOL SetFileAttributesW(const WCHAR*, > DWORD)’: > filemanip.cc:344:1: error: control reaches end of non-void function > filemanip.cc: At global scope: > filemanip.cc:385:1: error: ‘BOOL unlink(const WCHAR*, ULONG)’ defined > but not used > Makefile:830: recipe for target `filemanip.o' failed > make[2]: *** [filemanip.o] Error 1 > CXX io_stream_file.o > CXX main.o > main.cc: In function ‘void main_display()’: > main.cc:166:22: error: invalid initialization of reference of type > ‘const IID&’ from expression of type ‘const GUID*’ > /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:261:11: error: in > passing argument 1 of ‘HRESULT CoCreateInstance(const IID&, IUnknown*, > DWORD, const IID&, void**)’ > main.cc: In function ‘int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)’: > main.cc:250:15: error: ‘_argv’ was not declared in this scope > Makefile:830: recipe for target `main.o' failed > make[2]: *** [main.o] Error 1 > CXX mkdir.o > mkdir.cc: In function ‘int mkdir_p(int, const char*, mode_t)’: > mkdir.cc:75:6: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in this > scope > mkdir.cc:75:30: error: ‘FILE_CREATE’ was not declared in this scope > mkdir.cc:76:6: error: ‘FILE_DIRECTORY_FILE’ was not declared in this scope > mkdir.cc:77:8: error: ‘FILE_SYNCHRONOUS_IO_NONALERT’ was not declared in > this scope > mkdir.cc:78:8: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not declared in > this scope > mkdir.cc:79:26: error: ‘NT_SUCCESS’ was not declared in this scope > Makefile:830: recipe for target `mkdir.o' failed > make[2]: *** [mkdir.o] Error 1 > CXX mklink2.o > mklink2.cc: In function ‘void make_link_2(const char*, const char*, > const char*, const char*)’: > mklink2.cc:32:71: error: invalid initialization of reference of type > ‘const IID&’ from expression of type ‘const IID*’ > mklink2.cc: At global scope: > mklink2.cc:115:3: error: ‘FILE_LINK_INFORMATION’ does not name a type > mklink2.cc: In function ‘int mkcyghardlink(const char*, const char*)’: > mklink2.cc:144:55: error: ‘FILE_SHARE_VALID_FLAGS’ was not declared in > this scope > mklink2.cc:145:10: error: ‘FILE_OPEN_FOR_BACKUP_INTENT’ was not declared > in this scope > mklink2.cc:145:40: error: ‘FILE_OPEN_REPARSE_POINT’ was not declared in > this scope > mklink2.cc:146:26: error: ‘NT_SUCCESS’ was not declared in this scope > mklink2.cc:150:24: error: ‘FILE_LINK_INFORMATION’ was not declared in > this scope > mklink2.cc:151:8: error: ‘struct<anonymous>’ has no member named ‘fli’ > mklink2.cc:152:8: error: ‘struct<anonymous>’ has no member named ‘fli’ > mklink2.cc:153:8: error: ‘struct<anonymous>’ has no member named ‘fli’ > mklink2.cc:154:16: error: ‘struct<anonymous>’ has no member named ‘fli’ > mklink2.cc:155:49: error: ‘struct<anonymous>’ has no member named ‘fli’ > mklink2.cc:157:28: error: ‘NT_SUCCESS’ was not declared in this scope > cc1plus: warnings being treated as errors > mklink2.cc:158:1: error: control reaches end of non-void function > Makefile:830: recipe for target `mklink2.o' failed > make[2]: *** [mklink2.o] Error 1 > >> Some of these declarations are from wdm.h. So: >> >> #include<winternl.h> >> #include<wdm.h> > > Nope, that leads to tons of conflicting declaration errors. It looks > like these FILE_* declarations need to be copied into winternl.h. > >> Btw, what's with the __STRING_DEFINED and __UNICODE_STRING_DEFINED >> defines? > > ntdef.h and winternl.h define conflicting types otherwise. > Likewise, needs Kai's help to resolve it.
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |