You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mt...@apache.org on 2008/04/17 18:27:12 UTC
svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Author: mturk
Date: Thu Apr 17 09:27:10 2008
New Revision: 649173
URL: http://svn.apache.org/viewvc?rev=649173&view=rev
Log:
Fix NtXXX prototypes. They are all declared as NTSTATUS(LONG) not DWORD
Modified:
apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Modified: apr/apr/trunk/include/arch/win32/apr_arch_misc.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/win32/apr_arch_misc.h?rev=649173&r1=649172&r2=649173&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/win32/apr_arch_misc.h (original)
+++ apr/apr/trunk/include/arch/win32/apr_arch_misc.h Thu Apr 17 09:27:10 2008
@@ -338,14 +338,14 @@
#define GetCompressedFileSizeW apr_winapi_GetCompressedFileSizeW
-APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtQueryTimerResolution, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryTimerResolution, 0, (
ULONG *pMaxRes, /* Minimum NS Resolution */
ULONG *pMinRes, /* Maximum NS Resolution */
ULONG *pCurRes), /* Current NS Resolution */
(pMaxRes, pMinRes, pCurRes));
#define QueryTimerResolution apr_winapi_NtQueryTimerResolution
-APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtSetTimerResolution, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtSetTimerResolution, 0, (
ULONG ReqRes, /* Requested NS Clock Resolution */
BOOL Acquire, /* Aquire (1) or Release (0) our interest */
ULONG *pNewRes), /* The NS Clock Resolution granted */
@@ -361,7 +361,7 @@
ULONG_PTR InheritedFromUniqueProcessId;
} PBI, *PPBI;
-APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtQueryInformationProcess, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryInformationProcess, 0, (
HANDLE hProcess, /* Obvious */
INT info, /* Use 0 for PBI documented above */
PVOID pPI, /* The PIB buffer */
@@ -370,7 +370,7 @@
(hProcess, info, pPI, LenPI, pSizePI));
#define QueryInformationProcess apr_winapi_NtQueryInformationProcess
-APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtQueryObject, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryObject, 0, (
HANDLE hObject, /* Obvious */
INT info, /* Use 0 for PBI documented above */
PVOID pOI, /* The PIB buffer */
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Mladen Turk wrote:
>
> It works perfectly with VS6
Cool, then feel free to apply to 1.3.x branch, of course.
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Mladen Turk wrote:
>
> It works perfectly with VS6
Cool, then feel free to apply to 1.3.x branch, of course.
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> mturk@apache.org wrote:
>> Author: mturk
>> Date: Thu Apr 17 09:27:10 2008
>> New Revision: 649173
>>
>> Fix NtXXX prototypes. They are all declared as NTSTATUS(LONG) not DWORD
>
> Before you let this ride, are you /certain/ this doesn't break older 2003
> compilers? I'm betting it might... :(
>
Those are function prototypes declared to return NTSTATUS which
OTOH was always defined as LONG and not as DWORD.
In essence LONG is long, DWORD is unsigned long.
The reason is because kernel functions usually report
return values as failed with NTSTATUS < 0, success as 0 or >= 0.
> I'll test on my return.
>
It works perfectly with VS6
Regards
--
(TM)
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> mturk@apache.org wrote:
>> Author: mturk
>> Date: Thu Apr 17 09:27:10 2008
>> New Revision: 649173
>>
>> Fix NtXXX prototypes. They are all declared as NTSTATUS(LONG) not DWORD
>
> Before you let this ride, are you /certain/ this doesn't break older 2003
> compilers? I'm betting it might... :(
>
Those are function prototypes declared to return NTSTATUS which
OTOH was always defined as LONG and not as DWORD.
In essence LONG is long, DWORD is unsigned long.
The reason is because kernel functions usually report
return values as failed with NTSTATUS < 0, success as 0 or >= 0.
> I'll test on my return.
>
It works perfectly with VS6
Regards
--
(TM)
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
mturk@apache.org wrote:
> Author: mturk
> Date: Thu Apr 17 09:27:10 2008
> New Revision: 649173
>
> Fix NtXXX prototypes. They are all declared as NTSTATUS(LONG) not DWORD
Before you let this ride, are you /certain/ this doesn't break older 2003
compilers? I'm betting it might... :(
I'll test on my return.
Bill
Re: svn commit: r649173 - /apr/apr/trunk/include/arch/win32/apr_arch_misc.h
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
mturk@apache.org wrote:
> Author: mturk
> Date: Thu Apr 17 09:27:10 2008
> New Revision: 649173
>
> Fix NtXXX prototypes. They are all declared as NTSTATUS(LONG) not DWORD
Before you let this ride, are you /certain/ this doesn't break older 2003
compilers? I'm betting it might... :(
I'll test on my return.
Bill