Commit 947977f6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

cabinet/tests: Compile with -D__WINESRC__.

parent 4553e6d1
TESTDLL = cabinet.dll TESTDLL = cabinet.dll
IMPORTS = cabinet IMPORTS = cabinet
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \ C_SRCS = \
extract.c \ extract.c \
......
...@@ -240,7 +240,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -240,7 +240,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
DWORD attrs; DWORD attrs;
BOOL res; BOOL res;
handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, handle = CreateFileA(pszName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName);
...@@ -251,7 +251,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -251,7 +251,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
FileTimeToDosDateTime(&filetime, pdate, ptime); FileTimeToDosDateTime(&filetime, pdate, ptime);
attrs = GetFileAttributes(pszName); attrs = GetFileAttributesA(pszName);
ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n");
return (INT_PTR)handle; return (INT_PTR)handle;
...@@ -623,7 +623,7 @@ static void test_Extract(void) ...@@ -623,7 +623,7 @@ static void test_Extract(void)
/* first file exists */ /* first file exists */
createTestFile("dest\\a.txt"); createTestFile("dest\\a.txt");
SetFileAttributes("dest\\a.txt", FILE_ATTRIBUTE_READONLY); SetFileAttributesA("dest\\a.txt", FILE_ATTRIBUTE_READONLY);
ZeroMemory(&session, sizeof(SESSION)); ZeroMemory(&session, sizeof(SESSION));
lstrcpyA(session.Destination, "dest"); lstrcpyA(session.Destination, "dest");
session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES;
...@@ -665,7 +665,7 @@ static void test_Extract(void) ...@@ -665,7 +665,7 @@ static void test_Extract(void)
/* third file exists */ /* third file exists */
createTestFile("dest\\testdir\\c.txt"); createTestFile("dest\\testdir\\c.txt");
SetFileAttributes("dest\\testdir\\c.txt", FILE_ATTRIBUTE_READONLY); SetFileAttributesA("dest\\testdir\\c.txt", FILE_ATTRIBUTE_READONLY);
ZeroMemory(&session, sizeof(SESSION)); ZeroMemory(&session, sizeof(SESSION));
lstrcpyA(session.Destination, "dest"); lstrcpyA(session.Destination, "dest");
session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES;
......
...@@ -440,7 +440,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -440,7 +440,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
DWORD attrs; DWORD attrs;
BOOL res; BOOL res;
handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, handle = CreateFileA(pszName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName);
...@@ -451,7 +451,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -451,7 +451,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
FileTimeToDosDateTime(&filetime, pdate, ptime); FileTimeToDosDateTime(&filetime, pdate, ptime);
attrs = GetFileAttributes(pszName); attrs = GetFileAttributesA(pszName);
ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n");
/* fixme: should convert attrs to *pattribs, make sure /* fixme: should convert attrs to *pattribs, make sure
* have a test that catches the fact that we don't? * have a test that catches the fact that we don't?
......
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