ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2008
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
31 participants
710 discussions
Start a n
N
ew thread
[dchapyshev] 38194: - Fix all wine tests for MoveFileA/W
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Dec 20 04:08:11 2008 New Revision: 38194 URL:
http://svn.reactos.org/svn/reactos?rev=38194&view=rev
Log: - Fix all wine tests for MoveFileA/W Modified: trunk/reactos/dll/win32/kernel32/file/move.c Modified: trunk/reactos/dll/win32/kernel32/file/move.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/mo…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] Sat Dec 20 04:08:11 2008 @@ -235,8 +235,9 @@ DWORD dwFlags ) { - HANDLE hFile = NULL; + HANDLE hFile = NULL, hNewFile = NULL; IO_STATUS_BLOCK IoStatusBlock; + OBJECT_ATTRIBUTES ObjectAttributes; PFILE_RENAME_INFORMATION FileRename; NTSTATUS errCode; BOOL Result; @@ -247,6 +248,48 @@ if (dwFlags & MOVEFILE_DELAY_UNTIL_REBOOT) return add_boot_rename_entry( lpExistingFileName, lpNewFileName, dwFlags ); + + if (dwFlags & MOVEFILE_WRITE_THROUGH) + FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n"); + + if (!lpNewFileName) + return DeleteFileW(lpExistingFileName); + + /* validate & translate the filename */ + if (!RtlDosPathNameToNtPathName_U (lpNewFileName, + &DstPathU, + NULL, + NULL)) + { + WARN("Invalid destination path\n"); + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; + } + + InitializeObjectAttributes(&ObjectAttributes, + &DstPathU, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + errCode = NtOpenFile(&hNewFile, GENERIC_READ | GENERIC_WRITE, &ObjectAttributes, &IoStatusBlock, 0, + FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); + + if (NT_SUCCESS(errCode)) /* Destination exists */ + { + NtClose(hNewFile); + + if (!(dwFlags & MOVEFILE_REPLACE_EXISTING)) + { + SetLastError(ERROR_ALREADY_EXISTS); + return FALSE; + } + else if (GetFileAttributesW(lpNewFileName) & FILE_ATTRIBUTE_DIRECTORY) + { + SetLastError(ERROR_ACCESS_DENIED); + return FALSE; + } + } hFile = CreateFileW (lpExistingFileName, GENERIC_ALL, @@ -258,21 +301,8 @@ if (hFile == INVALID_HANDLE_VALUE) { - return FALSE; + return FALSE; } - - - /* validate & translate the filename */ - if (!RtlDosPathNameToNtPathName_U (lpNewFileName, - &DstPathU, - NULL, - NULL)) - { - WARN("Invalid destination path\n"); - CloseHandle(hFile); - SetLastError(ERROR_PATH_NOT_FOUND); - return FALSE; - } FileRename = RtlAllocateHeap( RtlGetProcessHeap(),
16 years
1
0
0
0
[amunger] 38193: Null dereference FTL.
by amunger@svn.reactos.org
Author: amunger Date: Sat Dec 20 03:30:12 2008 New Revision: 38193 URL:
http://svn.reactos.org/svn/reactos?rev=38193&view=rev
Log: Null dereference FTL. Modified: trunk/reactos/base/applications/sc/create.c Modified: trunk/reactos/base/applications/sc/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sc/creat…
============================================================================== --- trunk/reactos/base/applications/sc/create.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/sc/create.c [iso-8859-1] Sat Dec 20 03:30:12 2008 @@ -36,7 +36,7 @@ _tprintf(_T("error control - %lu\n"), dwErrorControl); _tprintf(_T("Binary path - %s\n"), lpBinaryPathName); _tprintf(_T("load order group - %s\n"), lpLoadOrderGroup); - _tprintf(_T("tag - %lu\n"), *lpdwTagId); + _tprintf(_T("tag - %lu\n"), lpdwTagId); _tprintf(_T("dependincies - %s\n"), lpDependencies); _tprintf(_T("account start name - %s\n"), lpServiceStartName); _tprintf(_T("account password - %s\n"), lpPassword);
16 years
1
0
0
0
[dchapyshev] 38192: - Formatting fix
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Dec 20 02:07:10 2008 New Revision: 38192 URL:
http://svn.reactos.org/svn/reactos?rev=38192&view=rev
Log: - Formatting fix Modified: trunk/reactos/dll/win32/kernel32/file/lfile.c Modified: trunk/reactos/dll/win32/kernel32/file/lfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/lf…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/lfile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/lfile.c [iso-8859-1] Sat Dec 20 02:07:10 2008 @@ -19,24 +19,19 @@ */ long WINAPI -_hread( - HFILE hFile, - LPVOID lpBuffer, - long lBytes - ) +_hread(HFILE hFile, LPVOID lpBuffer, long lBytes) { - DWORD NumberOfBytesRead; + DWORD NumberOfBytesRead; - if ( !ReadFile( - LongToHandle(hFile), - lpBuffer, - (DWORD) lBytes, - & NumberOfBytesRead, - NULL) ) - { - return HFILE_ERROR; - } - return NumberOfBytesRead; + if (!ReadFile(LongToHandle(hFile), + lpBuffer, + (DWORD) lBytes, + &NumberOfBytesRead, + NULL)) + { + return HFILE_ERROR; + } + return NumberOfBytesRead; } @@ -45,32 +40,27 @@ */ long WINAPI -_hwrite ( - HFILE hFile, - LPCSTR lpBuffer, - long lBytes - ) +_hwrite(HFILE hFile, LPCSTR lpBuffer, long lBytes) { - DWORD NumberOfBytesWritten; + DWORD NumberOfBytesWritten; - if (lBytes == 0) - { - if ( !SetEndOfFile((HANDLE) hFile ) ) - { - return HFILE_ERROR; - } - return 0; - } - if ( !WriteFile( - (HANDLE) hFile, - (LPVOID) lpBuffer, - (DWORD) lBytes, - & NumberOfBytesWritten, - NULL) ) - { - return HFILE_ERROR; - } - return NumberOfBytesWritten; + if (lBytes == 0) + { + if (!SetEndOfFile((HANDLE) hFile)) + { + return HFILE_ERROR; + } + return 0; + } + if (!WriteFile(LongToHandle(hFile), + (LPVOID) lpBuffer, + (DWORD) lBytes, + &NumberOfBytesWritten, + NULL)) + { + return HFILE_ERROR; + } + return NumberOfBytesWritten; } @@ -79,10 +69,7 @@ */ HFILE WINAPI -_lopen ( - LPCSTR lpPathName, - int iReadWrite - ) +_lopen(LPCSTR lpPathName, int iReadWrite) { DWORD dwAccess, dwSharing, dwCreation; @@ -128,10 +115,7 @@ */ HFILE WINAPI -_lcreat ( - LPCSTR lpPathName, - int iAttribute - ) +_lcreat(LPCSTR lpPathName, int iAttribute) { HANDLE hFile; @@ -153,11 +137,9 @@ */ int WINAPI -_lclose ( - HFILE hFile - ) +_lclose(HFILE hFile) { - return CloseHandle(LongToHandle(hFile)) ? 0 : HFILE_ERROR; + return CloseHandle(LongToHandle(hFile)) ? 0 : HFILE_ERROR; } @@ -166,11 +148,7 @@ */ LONG WINAPI -_llseek( - HFILE hFile, - LONG lOffset, - int iOrigin - ) +_llseek(HFILE hFile, LONG lOffset, int iOrigin) { return SetFilePointer(LongToHandle(hFile), lOffset,
16 years
1
0
0
0
[dchapyshev] 38191: - Fix 2 winetests
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Dec 20 02:02:25 2008 New Revision: 38191 URL:
http://svn.reactos.org/svn/reactos?rev=38191&view=rev
Log: - Fix 2 winetests Modified: trunk/reactos/dll/win32/kernel32/file/lfile.c Modified: trunk/reactos/dll/win32/kernel32/file/lfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/lf…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/lfile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/lfile.c [iso-8859-1] Sat Dec 20 02:02:25 2008 @@ -28,8 +28,8 @@ DWORD NumberOfBytesRead; if ( !ReadFile( - (HANDLE) hFile, - (LPVOID) lpBuffer, + LongToHandle(hFile), + lpBuffer, (DWORD) lBytes, & NumberOfBytesRead, NULL) ) @@ -84,34 +84,42 @@ int iReadWrite ) { - DWORD dwAccessMask = 0; - DWORD dwShareMode = 0; + DWORD dwAccess, dwSharing, dwCreation; - if ( (iReadWrite & OF_READWRITE ) == OF_READWRITE ) - dwAccessMask = GENERIC_READ | GENERIC_WRITE; - else if ( (iReadWrite & OF_READ ) == OF_READ ) - dwAccessMask = GENERIC_READ; - else if ( (iReadWrite & OF_WRITE ) == OF_WRITE ) - dwAccessMask = GENERIC_WRITE; + if (iReadWrite & OF_CREATE) + { + dwCreation = CREATE_ALWAYS; + dwAccess = GENERIC_READ | GENERIC_WRITE; + } + else + { + dwCreation = OPEN_EXISTING; + switch(iReadWrite & 0x03) + { + case OF_READ: dwAccess = GENERIC_READ; break; + case OF_WRITE: dwAccess = GENERIC_WRITE; break; + case OF_READWRITE: dwAccess = GENERIC_READ | GENERIC_WRITE; break; + default: dwAccess = 0; break; + } + } - if ((iReadWrite & OF_SHARE_DENY_READ) == OF_SHARE_DENY_READ) - dwShareMode = FILE_SHARE_WRITE; - else if ((iReadWrite & OF_SHARE_DENY_WRITE) == OF_SHARE_DENY_WRITE ) - dwShareMode = FILE_SHARE_READ; - else if ((iReadWrite & OF_SHARE_EXCLUSIVE) == OF_SHARE_EXCLUSIVE) - dwShareMode = 0; - else - /* OF_SHARE_DENY_NONE, OF_SHARE_COMPAT and everything else */ - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + switch(iReadWrite & 0x70) + { + case OF_SHARE_EXCLUSIVE: dwSharing = 0; break; + case OF_SHARE_DENY_WRITE: dwSharing = FILE_SHARE_READ; break; + case OF_SHARE_DENY_READ: dwSharing = FILE_SHARE_WRITE; break; + case OF_SHARE_DENY_NONE: + case OF_SHARE_COMPAT: + default: dwSharing = FILE_SHARE_READ | FILE_SHARE_WRITE; break; + } - return (HFILE) CreateFileA( - lpPathName, - dwAccessMask, - dwShareMode, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); + return (HFILE) CreateFileA(lpPathName, + dwAccess, + dwSharing, + NULL, + dwCreation, + FILE_ATTRIBUTE_NORMAL, + NULL); } @@ -125,15 +133,18 @@ int iAttribute ) { - iAttribute &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM; - return (HFILE) CreateFileA( - lpPathName, - GENERIC_READ | GENERIC_WRITE, - (FILE_SHARE_READ | FILE_SHARE_WRITE), - NULL, - CREATE_ALWAYS, - iAttribute, - NULL); + HANDLE hFile; + + iAttribute &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM; + hFile = CreateFileA(lpPathName, + GENERIC_READ | GENERIC_WRITE, + (FILE_SHARE_READ | FILE_SHARE_WRITE), + NULL, + CREATE_ALWAYS, + iAttribute, + NULL); + + return HandleToLong(hFile); } @@ -146,11 +157,7 @@ HFILE hFile ) { - if (CloseHandle ((HANDLE)hFile)) - { - return 0; - } - return HFILE_ERROR; + return CloseHandle(LongToHandle(hFile)) ? 0 : HFILE_ERROR; } @@ -165,11 +172,10 @@ int iOrigin ) { - return SetFilePointer ( - (HANDLE) hFile, - lOffset, - NULL, - (DWORD) iOrigin); + return SetFilePointer(LongToHandle(hFile), + lOffset, + NULL, + (DWORD) iOrigin); } /* EOF */
16 years
1
0
0
0
[tkreuzer] 38190: - fix _STATIC_ASSERT - fix indentation - move some headers from crt/ming to crt
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Dec 19 17:34:20 2008 New Revision: 38190 URL:
http://svn.reactos.org/svn/reactos?rev=38190&view=rev
Log: - fix _STATIC_ASSERT - fix indentation - move some headers from crt/ming to crt Added: trunk/reactos/include/crt/crtdbg.h (contents, props changed) - copied, changed from r38054, trunk/reactos/include/crt/mingw32/crtdbg.h trunk/reactos/include/crt/crtdefs.h (with props) trunk/reactos/include/crt/stdarg.h (props changed) - copied unchanged from r38054, trunk/reactos/include/crt/mingw32/stdarg.h trunk/reactos/include/crt/stddef.h (props changed) - copied unchanged from r38054, trunk/reactos/include/crt/mingw32/stddef.h trunk/reactos/include/crt/vadefs.h (props changed) - copied unchanged from r38054, trunk/reactos/include/crt/mingw32/vadefs.h Removed: trunk/reactos/include/crt/mingw32/crtdbg.h trunk/reactos/include/crt/mingw32/stdarg.h trunk/reactos/include/crt/mingw32/stddef.h trunk/reactos/include/crt/mingw32/vadefs.h Modified: trunk/reactos/include/crt/_mingw.h trunk/reactos/include/crt/malloc.h Modified: trunk/reactos/include/crt/_mingw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/_mingw.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/_mingw.h [iso-8859-1] Fri Dec 19 17:34:20 2008 @@ -32,20 +32,20 @@ #if defined(_MSC_VER) # ifdef _DLL -# ifndef __MINGW_IMPORT -# define __MINGW_IMPORT __declspec(dllimport) -# endif -# ifndef _CRTIMP -# define _CRTIMP __declspec(dllimport) -# endif +# ifndef __MINGW_IMPORT +# define __MINGW_IMPORT __declspec(dllimport) +# endif +# ifndef _CRTIMP +# define _CRTIMP __declspec(dllimport) +# endif # else # ifndef __MINGW_IMPORT # define __MINGW_IMPORT # endif -# ifndef _CRTIMP -# define _CRTIMP +# ifndef _CRTIMP +# define _CRTIMP +# endif # endif -#endif # define __DECLSPEC_SUPPORTED # define __attribute__(x) /* nothing */ # define __restrict__ /* nothing */ @@ -55,25 +55,25 @@ # ifdef _DLL /* Note the extern. This is needed to work around GCC's limitations in handling dllimport attribute. */ -# define __MINGW_IMPORT extern __attribute__ ((__dllimport__)) +# define __MINGW_IMPORT extern __attribute__ ((__dllimport__)) # else # define __MINGW_IMPORT extern # endif # endif # ifndef _CRTIMP -# undef __USE_CRTIMP -# if !defined (_CRTBLD) && !defined (_SYSCRT) -# define __USE_CRTIMP 1 -# endif -# ifdef __USE_CRTIMP -# ifdef _DLL -# define _CRTIMP __attribute__ ((dllimport)) -# else -# define _CRTIMP -# endif +# undef __USE_CRTIMP +# if !defined (_CRTBLD) && !defined (_SYSCRT) +# define __USE_CRTIMP 1 +# endif +# ifdef __USE_CRTIMP +# ifdef _DLL +# define _CRTIMP __attribute__ ((dllimport)) # else # define _CRTIMP # endif +# else +# define _CRTIMP +# endif # endif # define __DECLSPEC_SUPPORTED # else /* __declspec */ Copied: trunk/reactos/include/crt/crtdbg.h (from r38054, trunk/reactos/include/crt/mingw32/crtdbg.h) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/crtdbg.h?p2=tr…
============================================================================== --- trunk/reactos/include/crt/mingw32/crtdbg.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/crtdbg.h [iso-8859-1] Fri Dec 19 17:34:20 2008 @@ -90,7 +90,7 @@ } _CrtMemState; #ifndef _STATIC_ASSERT -#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] +#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1] #endif #ifndef _ASSERT Propchange: trunk/reactos/include/crt/crtdbg.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/crt/crtdbg.h ------------------------------------------------------------------------------ svn:mergeinfo = Added: trunk/reactos/include/crt/crtdefs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/crtdefs.h?rev=…
============================================================================== --- trunk/reactos/include/crt/crtdefs.h (added) +++ trunk/reactos/include/crt/crtdefs.h [iso-8859-1] Fri Dec 19 17:34:20 2008 @@ -1,0 +1,6 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER within this package. + */ +#include <_mingw.h> Propchange: trunk/reactos/include/crt/crtdefs.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/crt/malloc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/malloc.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/malloc.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/malloc.h [iso-8859-1] Fri Dec 19 17:34:20 2008 @@ -25,7 +25,7 @@ #endif #ifndef _STATIC_ASSERT -#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] +#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1] #endif /* Return codes for _heapwalk() */ Removed: trunk/reactos/include/crt/mingw32/crtdbg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/crtdbg…
============================================================================== --- trunk/reactos/include/crt/mingw32/crtdbg.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/crtdbg.h (removed) @@ -1,212 +1,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within this package. - */ -#include <_mingw.h> - -#ifndef _INC_CRTDBG -#define _INC_CRTDBG - -#pragma pack(push,_CRT_PACKING) - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - typedef void *_HFILE; - -#define _CRT_WARN 0 -#define _CRT_ERROR 1 -#define _CRT_ASSERT 2 -#define _CRT_ERRCNT 3 - -#define _CRTDBG_MODE_FILE 0x1 -#define _CRTDBG_MODE_DEBUG 0x2 -#define _CRTDBG_MODE_WNDW 0x4 -#define _CRTDBG_REPORT_MODE -1 - -#define _CRTDBG_INVALID_HFILE ((_HFILE)-1) -#define _CRTDBG_HFILE_ERROR ((_HFILE)-2) -#define _CRTDBG_FILE_STDOUT ((_HFILE)-4) -#define _CRTDBG_FILE_STDERR ((_HFILE)-5) -#define _CRTDBG_REPORT_FILE ((_HFILE)-6) - - typedef int (__cdecl *_CRT_REPORT_HOOK)(int,char *,int *); - typedef int (__cdecl *_CRT_REPORT_HOOKW)(int,wchar_t *,int *); - -#define _CRT_RPTHOOK_INSTALL 0 -#define _CRT_RPTHOOK_REMOVE 1 - -#define _HOOK_ALLOC 1 -#define _HOOK_REALLOC 2 -#define _HOOK_FREE 3 - - typedef int (__cdecl *_CRT_ALLOC_HOOK)(int,void *,size_t,int,long,const unsigned char *,int); - -#define _CRTDBG_ALLOC_MEM_DF 0x01 -#define _CRTDBG_DELAY_FREE_MEM_DF 0x02 -#define _CRTDBG_CHECK_ALWAYS_DF 0x04 -#define _CRTDBG_RESERVED_DF 0x08 -#define _CRTDBG_CHECK_CRT_DF 0x10 -#define _CRTDBG_LEAK_CHECK_DF 0x20 - -#define _CRTDBG_CHECK_EVERY_16_DF 0x00100000 -#define _CRTDBG_CHECK_EVERY_128_DF 0x00800000 -#define _CRTDBG_CHECK_EVERY_1024_DF 0x04000000 - -#define _CRTDBG_CHECK_DEFAULT_DF 0 - -#define _CRTDBG_REPORT_FLAG -1 - -#define _BLOCK_TYPE(block) (block & 0xFFFF) -#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF) - -#define _FREE_BLOCK 0 -#define _NORMAL_BLOCK 1 -#define _CRT_BLOCK 2 -#define _IGNORE_BLOCK 3 -#define _CLIENT_BLOCK 4 -#define _MAX_BLOCKS 5 - - typedef void (__cdecl *_CRT_DUMP_CLIENT)(void *,size_t); - - struct _CrtMemBlockHeader; - - typedef struct _CrtMemState { - struct _CrtMemBlockHeader *pBlockHeader; - size_t lCounts[_MAX_BLOCKS]; - size_t lSizes[_MAX_BLOCKS]; - size_t lHighWaterCount; - size_t lTotalCount; - } _CrtMemState; - -#ifndef _STATIC_ASSERT -#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] -#endif - -#ifndef _ASSERT -#define _ASSERT(expr) ((void)0) -#endif - -#ifndef _ASSERTE -#define _ASSERTE(expr) ((void)0) -#endif - -#ifndef _ASSERT_EXPR -#define _ASSERT_EXPR(expr,expr_str) ((void)0) -#endif - -#ifndef _ASSERT_BASE -#define _ASSERT_BASE _ASSERT_EXPR -#endif - -#define _RPT0(rptno,msg) -#define _RPTW0(rptno,msg) - -#define _RPT1(rptno,msg,arg1) -#define _RPTW1(rptno,msg,arg1) -#define _RPT2(rptno,msg,arg1,arg2) -#define _RPTW2(rptno,msg,arg1,arg2) -#define _RPT3(rptno,msg,arg1,arg2,arg3) -#define _RPTW3(rptno,msg,arg1,arg2,arg3) -#define _RPT4(rptno,msg,arg1,arg2,arg3,arg4) -#define _RPTW4(rptno,msg,arg1,arg2,arg3,arg4) -#define _RPTF0(rptno,msg) -#define _RPTFW0(rptno,msg) -#define _RPTF1(rptno,msg,arg1) -#define _RPTFW1(rptno,msg,arg1) -#define _RPTF2(rptno,msg,arg1,arg2) -#define _RPTFW2(rptno,msg,arg1,arg2) -#define _RPTF3(rptno,msg,arg1,arg2,arg3) -#define _RPTFW3(rptno,msg,arg1,arg2,arg3) -#define _RPTF4(rptno,msg,arg1,arg2,arg3,arg4) -#define _RPTFW4(rptno,msg,arg1,arg2,arg3,arg4) - -#define _malloc_dbg(s,t,f,l) malloc(s) -#define _calloc_dbg(c,s,t,f,l) calloc(c,s) -#define _realloc_dbg(p,s,t,f,l) realloc(p,s) -#define _recalloc_dbg(p,c,s,t,f,l) _recalloc(p,c,s) -#define _expand_dbg(p,s,t,f,l) _expand(p,s) -#define _free_dbg(p,t) free(p) -#define _msize_dbg(p,t) _msize(p) - -#define _aligned_malloc_dbg(s,a,f,l) _aligned_malloc(s,a) -#define _aligned_realloc_dbg(p,s,a,f,l) _aligned_realloc(p,s,a) -#define _aligned_recalloc_dbg(p,c,s,a,f,l) _aligned_realloc(p,c,s,a) -#define _aligned_free_dbg(p) _aligned_free(p) -#define _aligned_offset_malloc_dbg(s,a,o,f,l) _aligned_offset_malloc(s,a,o) -#define _aligned_offset_realloc_dbg(p,s,a,o,f,l) _aligned_offset_realloc(p,s,a,o) -#define _aligned_offset_recalloc_dbg(p,c,s,a,o,f,l) _aligned_offset_recalloc(p,c,s,a,o) - -#define _malloca_dbg(s,t,f,l) _malloca(s) -#define _freea_dbg(p,t) _freea(p) - -#define _strdup_dbg(s,t,f,l) _strdup(s) -#define _wcsdup_dbg(s,t,f,l) _wcsdup(s) -#define _mbsdup_dbg(s,t,f,l) _mbsdup(s) -#define _tempnam_dbg(s1,s2,t,f,l) _tempnam(s1,s2) -#define _wtempnam_dbg(s1,s2,t,f,l) _wtempnam(s1,s2) -#define _fullpath_dbg(s1,s2,le,t,f,l) _fullpath(s1,s2,le) -#define _wfullpath_dbg(s1,s2,le,t,f,l) _wfullpath(s1,s2,le) -#define _getcwd_dbg(s,le,t,f,l) _getcwd(s,le) -#define _wgetcwd_dbg(s,le,t,f,l) _wgetcwd(s,le) -#define _getdcwd_dbg(d,s,le,t,f,l) _getdcwd(d,s,le) -#define _wgetdcwd_dbg(d,s,le,t,f,l) _wgetdcwd(d,s,le) -#define _getdcwd_lk_dbg(d,s,le,t,f,l) _getdcwd_nolock(d,s,le) -#define _wgetdcwd_lk_dbg(d,s,le,t,f,l) _wgetdcwd_nolock(d,s,le) - -#define _CrtSetReportHook(f) ((_CRT_REPORT_HOOK)0) -#define _CrtGetReportHook() ((_CRT_REPORT_HOOK)0) -#define _CrtSetReportHook2(t,f) ((int)0) -#define _CrtSetReportHookW2(t,f) ((int)0) -#define _CrtSetReportMode(t,f) ((int)0) -#define _CrtSetReportFile(t,f) ((_HFILE)0) - -#define _CrtDbgBreak() ((void)0) - -#define _CrtSetBreakAlloc(a) ((long)0) -#define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0) -#define _CrtGetAllocHook() ((_CRT_ALLOC_HOOK)0) -#define _CrtCheckMemory() ((int)1) -#define _CrtSetDbgFlag(f) ((int)0) -#define _CrtDoForAllClientObjects(f,c) ((void)0) -#define _CrtIsValidPointer(p,n,r) ((int)1) -#define _CrtIsValidHeapPointer(p) ((int)1) -#define _CrtIsMemoryBlock(p,t,r,f,l) ((int)1) -#define _CrtReportBlockType(p) ((int)-1) -#define _CrtSetDumpClient(f) ((_CRT_DUMP_CLIENT)0) -#define _CrtGetDumpClient() ((_CRT_DUMP_CLIENT)0) -#define _CrtMemCheckpoint(s) ((void)0) -#define _CrtMemDifference(s1,s2,s3) ((int)0) -#define _CrtMemDumpAllObjectsSince(s) ((void)0) -#define _CrtMemDumpStatistics(s) ((void)0) -#define _CrtDumpMemoryLeaks() ((int)0) -#define _CrtSetDebugFillThreshold(t) ((size_t)0) -#define _CrtSetCheckCount(f) ((int)0) -#define _CrtGetCheckCount() ((int)0) - -#ifdef __cplusplus -} - - void *__cdecl operator new[](size_t _Size); - inline void *__cdecl operator new(size_t _Size,int,const char *,int) { return ::operator new(_Size); } - inline void *__cdecl operator new[](size_t _Size,int,const char *,int) { return ::operator new[](_Size); } - void __cdecl operator delete[](void *); - inline void __cdecl operator delete(void *_P,int,const char *,int) { ::operator delete(_P); } - inline void __cdecl operator delete[](void *_P,int,const char *,int) { ::operator delete[](_P); } -#endif - -#pragma pack(pop) - -#include <sec_api/crtdbg_s.h> - -#endif Removed: trunk/reactos/include/crt/mingw32/stdarg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/stdarg…
============================================================================== --- trunk/reactos/include/crt/mingw32/stdarg.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/stdarg.h (removed) @@ -1,153 +1,0 @@ -/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ - -/* As a special exception, if you include this header file into source - files compiled by GCC, this header file does not by itself cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU General - Public License. */ - -/* - * ISO C Standard: 7.15 Variable arguments <stdarg.h> - */ - -#ifndef _INC_STDARG -#define _INC_STDARG -#ifndef _WIN32 -#error Only Win32 target is supported! -#endif - -#ifndef _STDARG_H -#ifndef _ANSI_STDARG_H_ -#ifndef __need___va_list -#define _STDARG_H -#define _ANSI_STDARG_H_ -#endif /* not __need___va_list */ -#undef __need___va_list - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef __builtin_va_list __gnuc_va_list; -#endif - -/* Define the standard macros for the user, - if this invocation was from the user program. */ -#ifdef _STDARG_H - -#define va_start(v,l) __builtin_va_start(v,l) -#define va_end(v) __builtin_va_end(v) -#define va_arg(v,l) __builtin_va_arg(v,l) -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L -#define va_copy(d,s) __builtin_va_copy(d,s) -#endif -#define __va_copy(d,s) __builtin_va_copy(d,s) - -/* Define va_list, if desired, from __gnuc_va_list. */ -/* We deliberately do not define va_list when called from - stdio.h, because ANSI C says that stdio.h is not supposed to define - va_list. stdio.h needs to have access to that data type, - but must not use that name. It should use the name __gnuc_va_list, - which is safe because it is reserved for the implementation. */ - -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - -#ifdef _BSD_VA_LIST -#undef _BSD_VA_LIST -#endif - -#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) -/* SVR4.2 uses _VA_LIST for an internal alias for va_list, - so we must avoid testing it and setting it here. - SVR4 uses _VA_LIST as a flag in stdarg.h, but we should - have no conflict with that. */ -#ifndef _VA_LIST_ -#define _VA_LIST_ -#ifdef __i860__ -#ifndef _VA_LIST -#define _VA_LIST va_list -#endif -#endif /* __i860__ */ -typedef __gnuc_va_list va_list; -#ifdef _SCO_DS -#define __VA_LIST -#endif -#endif /* _VA_LIST_ */ -#else /* not __svr4__ || _SCO_DS */ - -/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. - But on BSD NET2 we must not test or define or undef it. - (Note that the comments in NET 2's ansi.h - are incorrect for _VA_LIST_--see stdio.h!) */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) -/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ -#ifndef _VA_LIST_DEFINED -/* The macro _VA_LIST is used in SCO Unix 3.2. */ -#ifndef _VA_LIST -/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ -#ifndef _VA_LIST_T_H -/* The macro __va_list__ is used by BeOS. */ -#ifndef __va_list__ -typedef __gnuc_va_list va_list; -#endif /* not __va_list__ */ -#endif /* not _VA_LIST_T_H */ -#endif /* not _VA_LIST */ -#endif /* not _VA_LIST_DEFINED */ -#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) -#define _VA_LIST_ -#endif -#ifndef _VA_LIST -#define _VA_LIST -#endif -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED -#endif -#ifndef _VA_LIST_T_H -#define _VA_LIST_T_H -#endif -#ifndef __va_list__ -#define __va_list__ -#endif - -#endif /* not _VA_LIST_, except on certain systems */ - -#endif /* not __svr4__ */ - -#endif /* _STDARG_H */ - -#endif /* not _ANSI_STDARG_H_ */ -#endif /* not _STDARG_H */ - -#include <vadefs.h> - -#ifndef va_start -#define va_start _crt_va_start -#endif -#ifndef va_arg -#define va_arg _crt_va_arg -#endif -#ifndef va_end -#define va_end _crt_va_end -#endif - -#endif Removed: trunk/reactos/include/crt/mingw32/stddef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/stddef…
============================================================================== --- trunk/reactos/include/crt/mingw32/stddef.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/stddef.h (removed) @@ -1,398 +1,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within this package. - */ - -#include <_mingw.h> - -#ifndef _INC_STDDEF -#define _INC_STDDEF - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _CRT_ERRNO_DEFINED -#define _CRT_ERRNO_DEFINED - _CRTIMP extern int *__cdecl _errno(void); -#define errno (*_errno()) - errno_t __cdecl _set_errno(int _Value); - errno_t __cdecl _get_errno(int *_Value); -#endif - - _CRTIMP extern unsigned long __cdecl __threadid(void); -#define _threadid (__threadid()) - _CRTIMP extern uintptr_t __cdecl __threadhandle(void); - -#ifdef __cplusplus -} -#endif - -#endif - -/* - * ISO C Standard: 7.17 Common definitions <stddef.h> - */ -#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \ - && !defined(__STDDEF_H__)) \ - || defined(__need_wchar_t) || defined(__need_size_t) \ - || defined(__need_ptrdiff_t) || defined(__need_NULL) \ - || defined(__need_wint_t) - -/* Any one of these symbols __need_* means that GNU libc - wants us just to define one data type. So don't define - the symbols that indicate this file's entire job has been done. */ -#if (!defined(__need_wchar_t) && !defined(__need_size_t) \ - && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ - && !defined(__need_wint_t)) -#define _STDDEF_H -#define _STDDEF_H_ -/* snaroff(a)next.com says the NeXT needs this. */ -#define _ANSI_STDDEF_H -/* Irix 5.1 needs this. */ -#define __STDDEF_H__ -#endif - -#ifndef __sys_stdtypes_h -/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are - defined if the corresponding type is *not* defined. - FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) -#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) -#define _SIZE_T -#endif -#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_) -#define _PTRDIFF_T -#endif -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_. */ -#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_) -#ifndef _BSD_WCHAR_T_ -#define _WCHAR_T -#endif -#endif -/* Undef _FOO_T_ if we are supposed to define foo_t. */ -#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_) -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#if defined (__need_size_t) || defined (_STDDEF_H_) -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#if defined (__need_wchar_t) || defined (_STDDEF_H_) -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */ - -/* Sequent's header files use _PTRDIFF_T_ in some conflicting way. - Just ignore it. */ -#if defined (__sequent__) && defined (_PTRDIFF_T_) -#undef _PTRDIFF_T_ -#endif - -/* On VxWorks, <type/vxTypesBase.h> may have defined macros like - _TYPE_size_t which will typedef size_t. fixincludes patched the - vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is - not defined, and so that defining this macro defines _GCC_SIZE_T. - If we find that the macros are still defined at this point, we must - invoke them so that the type is defined as expected. */ -#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_)) -_TYPE_ptrdiff_t; -#undef _TYPE_ptrdiff_t -#endif -#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_)) -_TYPE_size_t; -#undef _TYPE_size_t -#endif -#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_)) -_TYPE_wchar_t; -#undef _TYPE_wchar_t -#endif - -/* In case nobody has defined these types, but we aren't running under - GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and - __WCHAR_TYPE__ have reasonable values. This can happen if the - parts of GCC is compiled by an older compiler, that actually - include gstddef.h, such as collect2. */ - -/* Signed type of difference of two pointers. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_ptrdiff_t) -#ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */ -#ifndef _T_PTRDIFF_ -#ifndef _T_PTRDIFF -#ifndef __PTRDIFF_T -#ifndef _PTRDIFF_T_ -#ifndef _BSD_PTRDIFF_T_ -#ifndef ___int_ptrdiff_t_h -#ifndef _GCC_PTRDIFF_T -#define _PTRDIFF_T -#define _T_PTRDIFF_ -#define _T_PTRDIFF -#define __PTRDIFF_T -#define _PTRDIFF_T_ -#define _BSD_PTRDIFF_T_ -#define ___int_ptrdiff_t_h -#define _GCC_PTRDIFF_T -#ifndef __PTRDIFF_TYPE__ -# ifdef _WIN64 - #define __PTRDIFF_TYPE__ long long int -# else -# #define __PTRDIFF_TYPE__ long int -# endif -#endif -#ifndef _PTRDIFF_T_DEFINED -#define _PTRDIFF_T_DEFINED -typedef __PTRDIFF_TYPE__ ptrdiff_t; -#endif -#endif /* _GCC_PTRDIFF_T */ -#endif /* ___int_ptrdiff_t_h */ -#endif /* _BSD_PTRDIFF_T_ */ -#endif /* _PTRDIFF_T_ */ -#endif /* __PTRDIFF_T */ -#endif /* _T_PTRDIFF */ -#endif /* _T_PTRDIFF_ */ -#endif /* _PTRDIFF_T */ - -/* If this symbol has done its job, get rid of it. */ -#undef __need_ptrdiff_t - -#endif /* _STDDEF_H or __need_ptrdiff_t. */ - -/* Unsigned type of `sizeof' something. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_size_t) -#ifndef __size_t__ /* BeOS */ -#ifndef __SIZE_T__ /* Cray Unicos/Mk */ -#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */ -#ifndef _SYS_SIZE_T_H -#ifndef _T_SIZE_ -#ifndef _T_SIZE -#ifndef __SIZE_T -#ifndef _SIZE_T_ -#ifndef _BSD_SIZE_T_ -#ifndef _SIZE_T_DEFINED_ -#ifndef _SIZE_T_DEFINED -#ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */ -#ifndef _SIZE_T_DECLARED /* FreeBSD 5 */ -#ifndef ___int_size_t_h -#ifndef _GCC_SIZE_T -#ifndef _SIZET_ -#ifndef __size_t -#define __size_t__ /* BeOS */ -#define __SIZE_T__ /* Cray Unicos/Mk */ -#define _SIZE_T -#define _SYS_SIZE_T_H -#define _T_SIZE_ -#define _T_SIZE -#define __SIZE_T -#define _SIZE_T_ -#define _BSD_SIZE_T_ -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -#define _BSD_SIZE_T_DEFINED_ /* Darwin */ -#define _SIZE_T_DECLARED /* FreeBSD 5 */ -#define ___int_size_t_h -#define _GCC_SIZE_T -#define _SIZET_ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) -/* __size_t is a typedef on FreeBSD 5!, must not trash it. */ -#else -#define __size_t -#endif -#ifndef __SIZE_TYPE__ -# ifdef _WIN64 -# define __SIZE_TYPE__ long long unsigned int -# else -# define __SIZE_TYPE__ long unsigned int -# endif -#endif -#if !(defined (__GNUG__) && defined (size_t)) -typedef __SIZE_TYPE__ size_t; -#ifdef __BEOS__ -typedef long ssize_t; -#endif /* __BEOS__ */ -#endif /* !(defined (__GNUG__) && defined (size_t)) */ -#endif /* __size_t */ -#endif /* _SIZET_ */ -#endif /* _GCC_SIZE_T */ -#endif /* ___int_size_t_h */ -#endif /* _SIZE_T_DECLARED */ -#endif /* _BSD_SIZE_T_DEFINED_ */ -#endif /* _SIZE_T_DEFINED */ -#endif /* _SIZE_T_DEFINED_ */ -#endif /* _BSD_SIZE_T_ */ -#endif /* _SIZE_T_ */ -#endif /* __SIZE_T */ -#endif /* _T_SIZE */ -#endif /* _T_SIZE_ */ -#endif /* _SYS_SIZE_T_H */ -#endif /* _SIZE_T */ -#endif /* __SIZE_T__ */ -#endif /* __size_t__ */ -#undef __need_size_t -#endif /* _STDDEF_H or __need_size_t. */ - - -/* Wide character type. - Locale-writers should change this as necessary to - be big enough to hold unique values not between 0 and 127, - and not (wchar_t) -1, for each defined multibyte character. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_wchar_t) -#ifndef __wchar_t__ /* BeOS */ -#ifndef __WCHAR_T__ /* Cray Unicos/Mk */ -#ifndef _WCHAR_T -#ifndef _T_WCHAR_ -#ifndef _T_WCHAR -#ifndef __WCHAR_T -#ifndef _WCHAR_T_ -#ifndef _BSD_WCHAR_T_ -#ifndef _BSD_WCHAR_T_DEFINED_ /* Darwin */ -#ifndef _BSD_RUNE_T_DEFINED_ /* Darwin */ -#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */ -#ifndef _WCHAR_T_DEFINED_ -#ifndef _WCHAR_T_DEFINED -#ifndef _WCHAR_T_H -#ifndef ___int_wchar_t_h -#ifndef __INT_WCHAR_T_H -#ifndef _GCC_WCHAR_T -#define __wchar_t__ /* BeOS */ -#define __WCHAR_T__ /* Cray Unicos/Mk */ -#define _WCHAR_T -#define _T_WCHAR_ -#define _T_WCHAR -#define __WCHAR_T -#define _WCHAR_T_ -#define _BSD_WCHAR_T_ -#define _WCHAR_T_DEFINED_ -#define _WCHAR_T_DEFINED -#define _WCHAR_T_H -#define ___int_wchar_t_h -#define __INT_WCHAR_T_H -#define _GCC_WCHAR_T -#define _WCHAR_T_DECLARED - -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other - symbols in the _FOO_T_ family, stays defined even after its - corresponding type is defined). If we define wchar_t, then we - must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if - we undef _WCHAR_T_, then we must also define rune_t, since - headers like runetype.h assume that if machine/ansi.h is included, - and _BSD_WCHAR_T_ is not defined, then rune_t is available. - machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of - the same type." */ -#ifdef _BSD_WCHAR_T_ -#undef _BSD_WCHAR_T_ -#ifdef _BSD_RUNE_T_ -#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE) -typedef _BSD_RUNE_T_ rune_t; -#define _BSD_WCHAR_T_DEFINED_ -#define _BSD_RUNE_T_DEFINED_ /* Darwin */ -#if defined (__FreeBSD__) && (__FreeBSD__ < 5) -/* Why is this file so hard to maintain properly? In contrast to - the comment above regarding BSD/386 1.1, on FreeBSD for as long - as the symbol has existed, _BSD_RUNE_T_ must not stay defined or - redundant typedefs will occur when stdlib.h is included after this file. */ -#undef _BSD_RUNE_T_ -#endif -#endif -#endif -#endif - -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ unsigned short -#endif -#ifndef __cplusplus -typedef __WCHAR_TYPE__ wchar_t; -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif /* _WCHAR_T_DECLARED */ -#endif /* _BSD_RUNE_T_DEFINED_ */ -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif /* __WCHAR_T__ */ -#endif /* __wchar_t__ */ -#undef __need_wchar_t -#endif /* _STDDEF_H or __need_wchar_t. */ - -/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. - are already defined. */ -/* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) -/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ - are probably typos and should be removed before 2.8 is released. */ -#ifdef _GCC_PTRDIFF_T_ -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T_ -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T_ -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -/* The following ones are the real ones. */ -#ifdef _GCC_PTRDIFF_T -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ */ - -#endif /* __sys_stdtypes_h */ - -/* A null pointer constant. */ - -#if defined (_STDDEF_H) || defined (__need_NULL) -#undef NULL /* in case <stdio.h> has defined it. */ -#ifdef __GNUG__ -#define NULL __null -#else /* G++ */ -#ifndef __cplusplus -#define NULL ((void *)0) -#else /* C++ */ -#define NULL 0 -#endif /* C++ */ -#endif /* G++ */ -#endif /* NULL not defined and <stddef.h> or need NULL. */ -#undef __need_NULL - -#ifndef offsetof - -/* Offset of member MEMBER in a struct of type TYPE. */ -#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) - -#endif /* !offsetof */ - -#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__ - || __need_XXX was not defined before */ Removed: trunk/reactos/include/crt/mingw32/vadefs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/vadefs…
============================================================================== --- trunk/reactos/include/crt/mingw32/vadefs.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/vadefs.h (removed) @@ -1,85 +1,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within this package. - */ -#ifndef _INC_VADEFS -#define _INC_VADEFS - -#ifndef _WIN32 -#error Only Win32 target is supported! -#endif - -#include <_mingw.h> - -#undef _CRT_PACKING -#define _CRT_PACKING 8 -#pragma pack(push,_CRT_PACKING) - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _UINTPTR_T_DEFINED -#define _UINTPTR_T_DEFINED -#ifndef __uintptr_t_defined -#define __uintptr_t_defined -#undef uintptr_t -#ifdef _WIN64 -#if defined(__GNUC__) && defined(__STRICT_ANSI__) - typedef unsigned int uintptr_t __attribute__ ((mode (DI))); -#else - typedef unsigned __int64 uintptr_t; -#endif -#else - typedef unsigned long uintptr_t; -#endif -#endif -#endif - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - typedef __builtin_va_list __gnuc_va_list; -#endif - -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED - typedef __gnuc_va_list va_list; -#endif - -#ifdef __cplusplus -#define _ADDRESSOF(v) (&reinterpret_cast<const char &>(v)) -#else -#define _ADDRESSOF(v) (&(v)) -#endif - -#if defined(__ia64__) -#define _VA_ALIGN 8 -#define _SLOTSIZEOF(t) ((sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1)) - -#define _VA_STRUCT_ALIGN 16 - -#define _ALIGNOF(ap) ((((ap)+_VA_STRUCT_ALIGN - 1) & ~(_VA_STRUCT_ALIGN -1)) - (ap)) -#define _APALIGN(t,ap) (__alignof(t) > 8 ? _ALIGNOF((uintptr_t) ap) : 0) -#else -#define _SLOTSIZEOF(t) (sizeof(t)) -#define _APALIGN(t,ap) (__alignof(t)) -#endif - -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L -#define va_copy(d,s) __builtin_va_copy(d,s) -#endif -#define __va_copy(d,s) __builtin_va_copy(d,s) - -#define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1)) - -#define _crt_va_start(v,l) __builtin_va_start(v,l) -#define _crt_va_arg(v,l) __builtin_va_arg(v,l) -#define _crt_va_end(v) __builtin_va_end(v) - -#ifdef __cplusplus -} -#endif - -#pragma pack(pop) -#endif Propchange: trunk/reactos/include/crt/stdarg.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/crt/stdarg.h ------------------------------------------------------------------------------ svn:mergeinfo = Propchange: trunk/reactos/include/crt/stddef.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/crt/stddef.h ------------------------------------------------------------------------------ svn:mergeinfo = Propchange: trunk/reactos/include/crt/vadefs.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/crt/vadefs.h ------------------------------------------------------------------------------ svn:mergeinfo =
16 years
1
0
0
0
[jimtabor] 38189: - Properly implement LookupIconIdFromDirectoryEx. - Remove hack for GetDeviceCaps. - This fixes one part of the Win32k Initialization Bug. If this change creates a problem some where else, the problem is not in this change.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Dec 19 16:33:11 2008 New Revision: 38189 URL:
http://svn.reactos.org/svn/reactos?rev=38189&view=rev
Log: - Properly implement LookupIconIdFromDirectoryEx. - Remove hack for GetDeviceCaps. - This fixes one part of the Win32k Initialization Bug. If this change creates a problem some where else, the problem is not in this change. Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c trunk/reactos/dll/win32/user32/windows/icon.c trunk/reactos/dll/win32/user32/windows/input.c Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] Fri Dec 19 16:33:11 2008 @@ -505,11 +505,6 @@ } else { - // HAX!!!! - // Due to winlogon process/thread mapping issues we have this hax! - // FIXME!!! This is a victim of the Win32k Initialization BUG!!!!! - return NtGdiGetDeviceCaps(hDC,i); - if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0; if (!(Dc_Attr->ulDirty_ & DC_PRIMARY_DISPLAY) ) Modified: trunk/reactos/dll/win32/user32/windows/icon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/icon.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/icon.c [iso-8859-1] Fri Dec 19 16:33:11 2008 @@ -658,6 +658,9 @@ { GRPCURSORICONDIR *dir = (GRPCURSORICONDIR*)xdir; UINT retVal = 0; + + GetConnected(); + if(dir && !dir->idReserved && (IMAGE_ICON == dir->idType || IMAGE_CURSOR == dir->idType)) { GRPCURSORICONDIRENTRY *entry = NULL; @@ -667,11 +670,13 @@ { ColorBits = 1; } + else if (g_psi->SystemMetrics[SM_SAMEDISPLAYFORMAT] || (cFlag & LR_VGACOLOR) ) + { + ColorBits = 4; + } else { - HDC hdc = CreateICW(NULL, NULL, NULL, NULL); - ColorBits = GetDeviceCaps(hdc, BITSPIXEL); - DeleteDC(hdc); + ColorBits = 0; } if(bIcon) Modified: trunk/reactos/dll/win32/user32/windows/input.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] Fri Dec 19 16:33:11 2008 @@ -153,6 +153,8 @@ SHORT WINAPI GetAsyncKeyState(int vKey) { + if (vKey < 0 || vKey > 256) + return 0; return (SHORT) NtUserGetAsyncKeyState((DWORD) vKey); }
16 years
1
0
0
0
[tkreuzer] 38188: enable GetTimeZoneInformation in _getsystime
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Dec 19 13:57:21 2008 New Revision: 38188 URL:
http://svn.reactos.org/svn/reactos?rev=38188&view=rev
Log: enable GetTimeZoneInformation in _getsystime Modified: trunk/reactos/lib/sdk/crt/sys_stat/systime.c Modified: trunk/reactos/lib/sdk/crt/sys_stat/systime.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/sys_stat/systi…
============================================================================== --- trunk/reactos/lib/sdk/crt/sys_stat/systime.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/sys_stat/systime.c [iso-8859-1] Fri Dec 19 13:57:21 2008 @@ -19,6 +19,8 @@ { SYSTEMTIME Time; int i; + DWORD TimeZoneId; + TIME_ZONE_INFORMATION TimeZoneInformation; GetLocalTime(&Time); @@ -32,14 +34,12 @@ tp->tm_isdst = -1; - //FIXME GetTimeZoneInformation currently not in kernel32 - - //TimeZoneId = GetTimeZoneInformation(&TimeZoneInformation ); - //if ( TimeZoneId == TIME_ZONE_ID_DAYLIGHT ) { - // tp->tm_isdst = 1; - //} - //else - // tp->tm_isdst = 0; + TimeZoneId = GetTimeZoneInformation(&TimeZoneInformation); + if (TimeZoneId == TIME_ZONE_ID_DAYLIGHT){ + tp->tm_isdst = 1; + } + else + tp->tm_isdst = 0; if (tp->tm_year % 4 == 0) { if (tp->tm_year % 100 != 0)
16 years
1
0
0
0
[tkreuzer] 38187: add DECLSPEC_SELECTANY
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Dec 19 12:39:32 2008 New Revision: 38187 URL:
http://svn.reactos.org/svn/reactos?rev=38187&view=rev
Log: add DECLSPEC_SELECTANY Modified: trunk/reactos/include/psdk/guiddef.h Modified: trunk/reactos/include/psdk/guiddef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/guiddef.h?rev…
============================================================================== --- trunk/reactos/include/psdk/guiddef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/guiddef.h [iso-8859-1] Fri Dec 19 12:39:32 2008 @@ -29,6 +29,10 @@ unsigned short Data3; unsigned char Data4[ 8 ]; } GUID; +#endif + +#ifndef DECLSPEC_SELECTANY +#define DECLSPEC_SELECTANY __declspec(selectany) #endif #undef DEFINE_GUID
16 years
1
0
0
0
[tkreuzer] 38186: NtGdiGetFontUnicodeRanges: - Don't probe the safe buffer, but the usermode buffer
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Dec 19 12:16:04 2008 New Revision: 38186 URL:
http://svn.reactos.org/svn/reactos?rev=38186&view=rev
Log: NtGdiGetFontUnicodeRanges: - Don't probe the safe buffer, but the usermode buffer Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] Fri Dec 19 12:16:04 2008 @@ -292,7 +292,7 @@ { _SEH2_TRY { - ProbeForWrite(pgsSafe, Size, 1); + ProbeForWrite(pgs, Size, 1); RtlCopyMemory(pgs, pgsSafe, Size); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
16 years
1
0
0
0
[gschneider] 38185: - Update fputwc implementation to current wine sources - Fixes 23 msvcrt file winetests
by gschneider@svn.reactos.org
Author: gschneider Date: Fri Dec 19 10:57:48 2008 New Revision: 38185 URL:
http://svn.reactos.org/svn/reactos?rev=38185&view=rev
Log: - Update fputwc implementation to current wine sources - Fixes 23 msvcrt file winetests Modified: trunk/reactos/lib/sdk/crt/stdio/file.c Modified: trunk/reactos/lib/sdk/crt/stdio/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Fri Dec 19 10:57:48 2008 @@ -2167,28 +2167,10 @@ */ wint_t CDECL fputwc(wint_t wc, FILE* file) { - if (file->_flag & _IOBINARY) - { - if (fwrite(&wc, sizeof(wc), 1, file) != 1) - return WEOF; - } - else - { - /* Convert to multibyte in text mode */ - char mbc[MB_LEN_MAX]; - int mb_return; - - mb_return = wctomb(mbc, wc); - - if(mb_return == -1) - return WEOF; - - /* Output all characters */ - if (fwrite(mbc, mb_return, 1, file) != 1) - return WEOF; - } - - return wc; + wchar_t mwc=wc; + if (fwrite( &mwc, sizeof(mwc), 1, file) != 1) + return WEOF; + return wc; } /*********************************************************************
16 years
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200