Get a couple conformance tests to compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:

 * dlls/msvcrt/tests/file.c,
   dlls/shlwapi/tests/path.c

   Change the #include order so the test compiles with the MSVC headers.
   Fix a few signed/unsigned warnings.


Index: dlls/msvcrt/tests/file.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/tests/file.c,v
retrieving revision 1.2
diff -u -r1.2 file.c
--- dlls/msvcrt/tests/file.c	19 Feb 2003 22:09:33 -0000	1.2
+++ dlls/msvcrt/tests/file.c	12 May 2003 09:25:09 -0000
@@ -18,7 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */

-#include <windef.h>
+#include "wine/test.h"
+#include <winbase.h>
 #include <winnls.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -26,8 +27,6 @@
 #include <sys/stat.h>
 #include <io.h>

-#include "wine/test.h"
-
 static void test_fdopen( void )
 {
     static char buffer[] = {0,1,2,3,4,5,6,7,8,9};
@@ -66,7 +65,7 @@
   WCHAR wtextW[LLEN+1];
   WCHAR *mytextW = NULL, *aptr, *wptr;
   BOOL diff_found = FALSE;
-  int i;
+  unsigned int i;

   tempf=_tempnam(".","wne");
   tempfh = fopen(tempf,"wt"); /* open in TEXT mode */
@@ -98,7 +97,7 @@
   WCHAR wtextW[LLEN+1];
   WCHAR *mytextW = NULL, *aptr, *wptr;
   BOOL diff_found = FALSE;
-  int i;
+  unsigned int i;

   tempf=_tempnam(".","wne");
   tempfh = fopen(tempf,"wt"); /* open in TEXT mode */
@@ -146,30 +145,30 @@

   tempf=_tempnam(".","wne");
   ok((tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_TEXT|_O_RDWR,_S_IREAD | _S_IWRITE)) != -1,"Can't open"); /* open in TEXT mode */
-  ok(_write(tempfd,mytext,strlen(mytext)) == strlen(mytext), "_write _O_TEXT bad return value");
+  ok(_write(tempfd,mytext,strlen(mytext)) == lstrlenA(mytext), "_write _O_TEXT bad return value");
   _close(tempfd);
   tempfd = _open(tempf,_O_RDONLY|_O_BINARY,0); /* open in BINARY mode */
-  ok(_read(tempfd,btext,LLEN) == strlen(dostext), "_read _O_BINARY got bad length");
+  ok(_read(tempfd,btext,LLEN) == lstrlenA(dostext), "_read _O_BINARY got bad length");
   ok( memcmp(dostext,btext,strlen(dostext)) == 0,"problems with _O_TEXT _write and _O_BINARY _write");
   ok( btext[strlen(dostext)-2] == '\r', "CR not written");
   _close(tempfd);
   tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */
-  ok(_read(tempfd,btext,LLEN) == strlen(mytext), "_read _O_TEXT got bad length");
+  ok(_read(tempfd,btext,LLEN) == lstrlenA(mytext), "_read _O_TEXT got bad length");
   ok( memcmp(mytext,btext,strlen(mytext)) == 0,"problems with _O_TEXT _write / _write");
   _close(tempfd);
   ok(unlink(tempf) !=-1 ,"Can't unlink");

   tempf=_tempnam(".","wne");
   ok((tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_BINARY|_O_RDWR,0)) != -1,"Can't open %s",tempf); /* open in BINARY mode */
-  ok(_write(tempfd,dostext,strlen(dostext)) == strlen(dostext), "_write _O_TEXT bad return value");
+  ok(_write(tempfd,dostext,strlen(dostext)) == lstrlenA(dostext), "_write _O_TEXT bad return value");
   _close(tempfd);
   tempfd = _open(tempf,_O_RDONLY|_O_BINARY,0); /* open in BINARY mode */
-  ok(_read(tempfd,btext,LLEN) == strlen(dostext), "_read _O_BINARY got bad length");
+  ok(_read(tempfd,btext,LLEN) == lstrlenA(dostext), "_read _O_BINARY got bad length");
   ok( memcmp(dostext,btext,strlen(dostext)) == 0,"problems with _O_TEXT _write and _O_BINARY _write");
   ok( btext[strlen(dostext)-2] == '\r', "CR not written");
   _close(tempfd);
   tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */
-  ok(_read(tempfd,btext,LLEN) == strlen(mytext), "_read _O_TEXT got bad length");
+  ok(_read(tempfd,btext,LLEN) == lstrlenA(mytext), "_read _O_TEXT got bad length");
   ok( memcmp(mytext,btext,strlen(mytext)) == 0,"problems with _O_TEXT _write / _write");
   _close(tempfd);

Index: dlls/shlwapi/tests/path.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/tests/path.c,v
retrieving revision 1.1
diff -u -r1.1 path.c
--- dlls/shlwapi/tests/path.c	9 Jan 2003 00:50:17 -0000	1.1
+++ dlls/shlwapi/tests/path.c	12 May 2003 09:25:20 -0000
@@ -22,8 +22,9 @@
 #include <stdio.h>

 #include "wine/test.h"
-#include "wine/unicode.h"
 #include "winbase.h"
+#include "wine/unicode.h"
+#include "winreg.h"
 #include "shlwapi.h"
 #include "wininet.h"




-- 
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
                Linux: It is now safe to turn on your computer.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux