Protect some includes reported by winapi_check

Francois Gouget fgouget at free.fr
Fri Jun 17 13:34:30 CDT 2005


Changelog:

  * dlls/advapi32/crypt.c
    dlls/shell32/shfldr_unixfs.c

    Francois Gouget <fgouget at free.fr>
    Protect the unistd.h and sys/stat.h includes.
    Include config.h.
    Fixes warnings reported by winapi_check.


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                      Avoid the Gates of Hell - use Linux.
-------------- next part --------------
Index: dlls/advapi32/crypt.c
===================================================================
RCS file: /var/cvs/wine/dlls/advapi32/crypt.c,v
retrieving revision 1.65
diff -u -p -r1.65 crypt.c
--- dlls/advapi32/crypt.c	23 May 2005 12:08:00 -0000	1.65
+++ dlls/advapi32/crypt.c	16 Jun 2005 23:34:06 -0000
@@ -24,13 +24,19 @@
  *  - Thread-safing
  */
 
+#include "config.h"
+
 #include <time.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <sys/stat.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #include <fcntl.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 #include "crypt.h"
 #include "winnls.h"
Index: dlls/shell32/shfldr_unixfs.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/shfldr_unixfs.c,v
retrieving revision 1.20
diff -u -p -r1.20 shfldr_unixfs.c
--- dlls/shell32/shfldr_unixfs.c	17 Jun 2005 12:12:35 -0000	1.20
+++ dlls/shell32/shfldr_unixfs.c	17 Jun 2005 16:32:32 -0000
@@ -23,7 +23,9 @@
 #include <stdarg.h>
 #include <limits.h>
 #include <dirent.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif


More information about the wine-patches mailing list