mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:45:50 +00:00
- Fix more InterlockedCompareExchangePointer warnings in crypt32 -- this to Wine, too
- Hack-0-initialize a variable in cryptui to satisfy gcc -- this needed as Wine use a less retarded gcc than we do - Warning fix old and out of sync icmp/inetcomm/odbc32/shdocw - Use _CRT_NONSTDC_NO_DEPRECATE in winhlp32 - Hack MAKEINTATOM definition for Wine svn path=/trunk/; revision=38922
This commit is contained in:
parent
659b2bfc46
commit
fb169370fe
16 changed files with 73 additions and 22 deletions
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="winhlp32" type="win32gui" installbase="system32" installname="winhlp32.exe" unicode="no" allowwarnings="true">
|
||||
<module name="winhlp32" type="win32gui" installbase="system32" installname="winhlp32.exe" unicode="no">
|
||||
<include base="winhlp32">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__ROS_LONG64__" />
|
||||
<define name="__ROS_LONG64__" />
|
||||
<define name="_CRT_NONSTDC_NO_DEPRECATE" />
|
||||
<library>wine</library>
|
||||
<library>comdlg32</library>
|
||||
<library>comctl32</library>
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
<include base="credui">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__WINESRC__" />
|
||||
<define name="WINVER">0x600</define>
|
||||
<define name="_WIN32_WINNT">0x600</define>
|
||||
<file>credui_main.c</file>
|
||||
<file>credui.rc</file>
|
||||
<library>wine</library>
|
||||
|
|
|
@ -205,7 +205,7 @@ static HCERTCHAINENGINE CRYPT_GetDefaultChainEngine(void)
|
|||
|
||||
config.cbSize = sizeof(config);
|
||||
CertCreateCertificateChainEngine(&config, &engine);
|
||||
InterlockedCompareExchangePointer(&CRYPT_defaultChainEngine, engine,
|
||||
(void)InterlockedCompareExchangePointer(&CRYPT_defaultChainEngine, engine,
|
||||
NULL);
|
||||
if (CRYPT_defaultChainEngine != engine)
|
||||
CertFreeCertificateChainEngine(engine);
|
||||
|
|
|
@ -66,7 +66,7 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void)
|
|||
|
||||
CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
|
||||
CRYPT_VERIFYCONTEXT);
|
||||
InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
|
||||
(void)InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
|
||||
NULL);
|
||||
if (hDefProv != prov)
|
||||
CryptReleaseContext(prov, 0);
|
||||
|
|
|
@ -759,7 +759,7 @@ PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
|
|||
{
|
||||
HCERTSTORE root = create_root_store();
|
||||
|
||||
InterlockedCompareExchangePointer((PVOID *)&CRYPT_rootStore, root,
|
||||
(void)InterlockedCompareExchangePointer((PVOID *)&CRYPT_rootStore, root,
|
||||
NULL);
|
||||
if (CRYPT_rootStore != root)
|
||||
CertCloseStore(root, 0);
|
||||
|
|
39
reactos/dll/win32/crypt32/warningfixes.diff
Normal file
39
reactos/dll/win32/crypt32/warningfixes.diff
Normal file
|
@ -0,0 +1,39 @@
|
|||
Index: chain.c
|
||||
===================================================================
|
||||
--- chain.c (revision 38919)
|
||||
+++ chain.c (working copy)
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
config.cbSize = sizeof(config);
|
||||
CertCreateCertificateChainEngine(&config, &engine);
|
||||
- InterlockedCompareExchangePointer(&CRYPT_defaultChainEngine, engine,
|
||||
+ (void)InterlockedCompareExchangePointer(&CRYPT_defaultChainEngine, engine,
|
||||
NULL);
|
||||
if (CRYPT_defaultChainEngine != engine)
|
||||
CertFreeCertificateChainEngine(engine);
|
||||
Index: main.c
|
||||
===================================================================
|
||||
--- main.c (revision 38919)
|
||||
+++ main.c (working copy)
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
|
||||
CRYPT_VERIFYCONTEXT);
|
||||
- InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
|
||||
+ (void)InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
|
||||
NULL);
|
||||
if (hDefProv != prov)
|
||||
CryptReleaseContext(prov, 0);
|
||||
Index: rootstore.c
|
||||
===================================================================
|
||||
--- rootstore.c (revision 38919)
|
||||
+++ rootstore.c (working copy)
|
||||
@@ -759,7 +759,7 @@
|
||||
{
|
||||
HCERTSTORE root = create_root_store();
|
||||
|
||||
- InterlockedCompareExchangePointer((PVOID *)&CRYPT_rootStore, root,
|
||||
+ (void)InterlockedCompareExchangePointer((PVOID *)&CRYPT_rootStore, root,
|
||||
NULL);
|
||||
if (CRYPT_rootStore != root)
|
||||
CertCloseStore(root, 0);
|
|
@ -3277,6 +3277,9 @@ static void show_cert_usages(HWND hwnd, struct edit_cert_data *data)
|
|||
LVCOLUMNW column;
|
||||
PurposeSelection purposeSelection;
|
||||
|
||||
/* hack for retarded gcc */
|
||||
purposeSelection = 0;
|
||||
|
||||
GetWindowRect(lv, &rc);
|
||||
column.mask = LVCF_WIDTH;
|
||||
column.cx = rc.right - rc.left;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<module name="icmp" type="win32dll" baseaddress="${BASEADDRESS_ICMP}" installbase="system32" installname="icmp.dll" allowwarnings="true">
|
||||
<module name="icmp" type="win32dll" baseaddress="${BASEADDRESS_ICMP}" installbase="system32" installname="icmp.dll">
|
||||
<importlibrary definition="icmp.spec" />
|
||||
<include base="icmp">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
|
|
|
@ -273,7 +273,7 @@ DWORD WINAPI IcmpSendEcho(
|
|||
if (RequestOptions!=NULL) {
|
||||
int val;
|
||||
if (icp->default_opts.OptionsSize==IP_OPTS_UNKNOWN) {
|
||||
unsigned int len;
|
||||
int len;
|
||||
/* Before we mess with the options, get the default values */
|
||||
len=sizeof(val);
|
||||
getsockopt(icp->sid,IPPROTO_IP,IP_TTL,(char *)&val,&len);
|
||||
|
@ -332,7 +332,7 @@ DWORD WINAPI IcmpSendEcho(
|
|||
#endif
|
||||
|
||||
send_time = GetTickCount();
|
||||
res=sendto(icp->sid, reqbuf, reqsize, 0, (struct sockaddr*)&addr, sizeof(addr));
|
||||
res=sendto(icp->sid, (const char*)reqbuf, reqsize, 0, (struct sockaddr*)&addr, sizeof(addr));
|
||||
HeapFree(GetProcessHeap (), 0, reqbuf);
|
||||
if (res<0) {
|
||||
if (WSAGetLastError()==WSAEMSGSIZE)
|
||||
|
@ -357,7 +357,7 @@ DWORD WINAPI IcmpSendEcho(
|
|||
ip_header_len=0; /* because gcc was complaining */
|
||||
while ((res=select(icp->sid+1,&fdr,NULL,NULL,&timeout))>0) {
|
||||
recv_time = GetTickCount();
|
||||
res=recvfrom(icp->sid, (char*)ip_header, maxlen, 0, (struct sockaddr*)&addr,&addrlen);
|
||||
res=recvfrom(icp->sid, (char*)ip_header, maxlen, 0, (struct sockaddr*)&addr,(int*)&addrlen);
|
||||
TRACE("received %d bytes from %s\n",res, inet_ntoa(addr.sin_addr));
|
||||
ier->Status=IP_REQ_TIMED_OUT;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group>
|
||||
<module name="inetcomm" type="win32dll" baseaddress="${BASEADDRESS_INETCOMM}" installbase="system32" installname="inetcomm.dll" allowwarnings="true">
|
||||
<module name="inetcomm" type="win32dll" baseaddress="${BASEADDRESS_INETCOMM}" installbase="system32" installname="inetcomm.dll">
|
||||
<autoregister infsection="OleControlDlls" type="DllRegisterServer" />
|
||||
<importlibrary definition="inetcomm.spec" />
|
||||
<include base="inetcomm">.</include>
|
||||
|
|
|
@ -119,7 +119,7 @@ static HRESULT WINAPI MimeInternat_SetDefaultCharset(IMimeInternational *iface,
|
|||
if(hCharset == NULL) return E_INVALIDARG;
|
||||
/* FIXME check hCharset is valid */
|
||||
|
||||
InterlockedExchangePointer(&This->default_charset, hCharset);
|
||||
(void)InterlockedExchangePointer(&This->default_charset, hCharset);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface,
|
|||
HCHARSET hcs;
|
||||
hr = IMimeInternational_GetCodePageCharset(iface, GetACP(), CHARSET_BODY, &hcs);
|
||||
if(SUCCEEDED(hr))
|
||||
InterlockedCompareExchangePointer(&This->default_charset, hcs, NULL);
|
||||
(void)InterlockedCompareExchangePointer(&This->default_charset, hcs, NULL);
|
||||
}
|
||||
*phCharset = This->default_charset;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group>
|
||||
<module name="odbc32" type="win32dll" baseaddress="${BASEADDRESS_ODBC32}" installbase="system32" installname="odbc32.dll" allowwarnings="true" crt="msvcrt">
|
||||
<module name="odbc32" type="win32dll" baseaddress="${BASEADDRESS_ODBC32}" installbase="system32" installname="odbc32.dll" crt="msvcrt">
|
||||
<importlibrary definition="odbc32.spec" />
|
||||
<include base="odbc32">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include "wine/debug.h"
|
||||
//#include "wine/library.h"
|
||||
|
||||
#undef TRACE_ON
|
||||
|
||||
#include "sql.h"
|
||||
#include "sqltypes.h"
|
||||
#include "sqlext.h"
|
||||
|
@ -221,7 +223,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
static BOOL ODBC_LoadDriverManager(void)
|
||||
{
|
||||
const char *s = getenv("LIB_ODBC_DRIVER_MANAGER");
|
||||
#ifndef __REACTOS__
|
||||
char error[256];
|
||||
#endif
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
|
@ -269,8 +273,10 @@ static BOOL ODBC_LoadDriverManager(void)
|
|||
|
||||
static BOOL ODBC_LoadDMFunctions(void)
|
||||
{
|
||||
#ifndef __REACTOS__
|
||||
int i;
|
||||
char error[256];
|
||||
#endif
|
||||
|
||||
if (gProxyHandle.dmHandle == NULL)
|
||||
return FALSE;
|
||||
|
@ -554,8 +560,8 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
|
|||
|
||||
CHECK_READY_AND_dmHandle();
|
||||
|
||||
strcpy(gProxyHandle.ServerName, ServerName);
|
||||
strcpy(gProxyHandle.UserName, UserName);
|
||||
strcpy(gProxyHandle.ServerName, (const char*)ServerName);
|
||||
strcpy(gProxyHandle.UserName, (const char*)UserName);
|
||||
|
||||
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func);
|
||||
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func)
|
||||
|
@ -606,9 +612,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
|
|||
(EnvironmentHandle, Direction, ServerName,
|
||||
BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
|
||||
|
||||
#ifndef __REACTOS__
|
||||
if (TRACE_ON(odbc))
|
||||
#endif
|
||||
if (WINE_TRACE_ON(odbc))
|
||||
{
|
||||
TRACE("returns: %d \t", ret);
|
||||
if (*NameLength1 > 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<module name="shdocvw" type="win32dll" baseaddress="${BASEADDRESS_SHDOCVW}" installbase="system32" installname="shdocvw.dll" allowwarnings="true">
|
||||
<module name="shdocvw" type="win32dll" baseaddress="${BASEADDRESS_SHDOCVW}" installbase="system32" installname="shdocvw.dll">
|
||||
<autoregister infsection="OleControlDlls" type="Both" />
|
||||
<importlibrary definition="shdocvw.spec" />
|
||||
<include base="shdocvw">.</include>
|
||||
|
|
|
@ -69,7 +69,7 @@ static void SHDOCVW_guid2wstr( const GUID *guid, LPWSTR wstr )
|
|||
{
|
||||
char str[40];
|
||||
|
||||
sprintf(str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||
sprintf(str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||
guid->Data1, guid->Data2, guid->Data3,
|
||||
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
||||
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
|
||||
|
|
|
@ -1090,7 +1090,13 @@ typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD);
|
|||
#if (_WIN32_WINNT >= 0x0600)
|
||||
typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);
|
||||
#endif
|
||||
|
||||
#ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
|
||||
#define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
|
||||
#else
|
||||
#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
|
||||
#endif
|
||||
|
||||
/* Functions */
|
||||
#ifndef UNDER_CE
|
||||
int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue