Commit 445af46a authored by Alexandre Julliard's avatar Alexandre Julliard

propsys: Build with msvcrt.

parent b41cc472
...@@ -2,6 +2,8 @@ MODULE = propsys.dll ...@@ -2,6 +2,8 @@ MODULE = propsys.dll
IMPORTLIB = propsys IMPORTLIB = propsys
IMPORTS = ole32 oleaut32 uuid IMPORTS = ole32 oleaut32 uuid
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
propstore.c \ propstore.c \
propsys_main.c \ propsys_main.c \
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
*/ */
#define COBJMACROS #define COBJMACROS
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
...@@ -29,7 +28,6 @@ ...@@ -29,7 +28,6 @@
#include "rpcproxy.h" #include "rpcproxy.h"
#include "propsys.h" #include "propsys.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h" #include "wine/list.h"
#include "initguid.h" #include "initguid.h"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
*/ */
#define COBJMACROS #define COBJMACROS
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
...@@ -30,7 +29,6 @@ ...@@ -30,7 +29,6 @@
#include "rpcproxy.h" #include "rpcproxy.h"
#include "propsys.h" #include "propsys.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "propsys_private.h" #include "propsys_private.h"
...@@ -307,7 +305,7 @@ HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY pkey, LPWSTR psz, UINT cch ...@@ -307,7 +305,7 @@ HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY pkey, LPWSTR psz, UINT cch
return E_NOT_SUFFICIENT_BUFFER; return E_NOT_SUFFICIENT_BUFFER;
} }
sprintfW(psz, guid_fmtW, pkey->fmtid.Data1, pkey->fmtid.Data2, swprintf(psz, cch, guid_fmtW, pkey->fmtid.Data1, pkey->fmtid.Data2,
pkey->fmtid.Data3, pkey->fmtid.Data4[0], pkey->fmtid.Data4[1], pkey->fmtid.Data3, pkey->fmtid.Data4[0], pkey->fmtid.Data4[1],
pkey->fmtid.Data4[2], pkey->fmtid.Data4[3], pkey->fmtid.Data4[4], pkey->fmtid.Data4[2], pkey->fmtid.Data4[3], pkey->fmtid.Data4[4],
pkey->fmtid.Data4[5], pkey->fmtid.Data4[6], pkey->fmtid.Data4[7]); pkey->fmtid.Data4[5], pkey->fmtid.Data4[6], pkey->fmtid.Data4[7]);
...@@ -317,11 +315,11 @@ HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY pkey, LPWSTR psz, UINT cch ...@@ -317,11 +315,11 @@ HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY pkey, LPWSTR psz, UINT cch
*p++ = ' '; *p++ = ' ';
cch -= GUIDSTRING_MAX - 1 + 1; cch -= GUIDSTRING_MAX - 1 + 1;
len = sprintfW(pidW, pid_fmtW, pkey->pid); len = swprintf(pidW, ARRAY_SIZE(pidW), pid_fmtW, pkey->pid);
if (cch >= len + 1) if (cch >= len + 1)
{ {
strcpyW(p, pidW); lstrcpyW(p, pidW);
return S_OK; return S_OK;
} }
else else
...@@ -497,7 +495,7 @@ HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR pszString, PROPERTYKEY *pkey) ...@@ -497,7 +495,7 @@ HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR pszString, PROPERTYKEY *pkey)
} }
/* Overflow is not checked. */ /* Overflow is not checked. */
while (isdigitW(*pszString)) while (iswdigit(*pszString))
{ {
pkey->pid *= 10; pkey->pid *= 10;
pkey->pid += (*pszString - '0'); pkey->pid += (*pszString - '0');
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
...@@ -37,7 +35,6 @@ ...@@ -37,7 +35,6 @@
#include "strsafe.h" #include "strsafe.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(propsys); WINE_DEFAULT_DEBUG_CHANNEL(propsys);
...@@ -124,7 +121,7 @@ static HRESULT PROPVAR_ConvertNumber(REFPROPVARIANT pv, int dest_bits, ...@@ -124,7 +121,7 @@ static HRESULT PROPVAR_ConvertNumber(REFPROPVARIANT pv, int dest_bits,
case VT_BSTR: case VT_BSTR:
{ {
WCHAR *end; WCHAR *end;
*res = strtolW(pv->u.pwszVal, &end, 0); *res = wcstol(pv->u.pwszVal, &end, 0);
if (pv->u.pwszVal == end) if (pv->u.pwszVal == end)
return DISP_E_TYPEMISMATCH; return DISP_E_TYPEMISMATCH;
src_signed = *res < 0; src_signed = *res < 0;
...@@ -587,7 +584,7 @@ static void PROPVAR_GUIDToWSTR(REFGUID guid, WCHAR *str) ...@@ -587,7 +584,7 @@ static void PROPVAR_GUIDToWSTR(REFGUID guid, WCHAR *str)
'-','%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X', '-','%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X',
'%','0','2','X','%','0','2','X','%','0','2','X','}',0}; '%','0','2','X','%','0','2','X','%','0','2','X','}',0};
sprintfW(str, format, guid->Data1, guid->Data2, guid->Data3, swprintf(str, 39, format, guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
} }
...@@ -764,7 +761,7 @@ HRESULT WINAPI PropVariantToGUID(const PROPVARIANT *ppropvar, GUID *guid) ...@@ -764,7 +761,7 @@ HRESULT WINAPI PropVariantToGUID(const PROPVARIANT *ppropvar, GUID *guid)
case VT_BSTR: case VT_BSTR:
return PROPVAR_WCHARToGUID(ppropvar->u.bstrVal, SysStringLen(ppropvar->u.bstrVal), guid); return PROPVAR_WCHARToGUID(ppropvar->u.bstrVal, SysStringLen(ppropvar->u.bstrVal), guid);
case VT_LPWSTR: case VT_LPWSTR:
return PROPVAR_WCHARToGUID(ppropvar->u.pwszVal, strlenW(ppropvar->u.pwszVal), guid); return PROPVAR_WCHARToGUID(ppropvar->u.pwszVal, lstrlenW(ppropvar->u.pwszVal), guid);
case VT_CLSID: case VT_CLSID:
memcpy(guid, ppropvar->u.puuid, sizeof(*ppropvar->u.puuid)); memcpy(guid, ppropvar->u.puuid, sizeof(*ppropvar->u.puuid));
return S_OK; return S_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment