Use __WINE__ instead of _WINE_, _WIN32.
diff --git a/programs/winefile/Makefile.in b/programs/winefile/Makefile.in index edcd029..797d144 100644 --- a/programs/winefile/Makefile.in +++ b/programs/winefile/Makefile.in
@@ -14,6 +14,7 @@ winefile.c RC_SRCS = rsrc.rc +EXTRARCFLAGS = -D__WINE__ @MAKE_PROG_RULES@
diff --git a/programs/winefile/resource.rc b/programs/winefile/resource.rc index 8f6cedc..cc50628 100644 --- a/programs/winefile/resource.rc +++ b/programs/winefile/resource.rc
@@ -29,7 +29,7 @@ } IDI_WINEFILE ICON DISCARDABLE -#ifdef _WIN32 +#ifndef __WINE__ "winefile.ico" #else { @@ -85,7 +85,7 @@ #endif IDB_TOOLBAR BITMAP DISCARDABLE -#ifdef _WIN32 +#ifndef __WINE__ "toolbar.bmp" #else { @@ -153,7 +153,7 @@ #endif IDB_DRIVEBAR BITMAP DISCARDABLE -#ifdef _WIN32 +#ifndef __WINE__ "drivebar.bmp" #else { @@ -208,7 +208,7 @@ #endif IDB_IMAGES BITMAP DISCARDABLE -#ifdef _WIN32 +#ifndef __WINE__ "images.bmp" #else {
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index d9f5ba3..3a604f3 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c
@@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _WIN32 +#ifdef __WINE__ #include "config.h" #include "wine/port.h" #endif @@ -30,10 +30,12 @@ #include "resource.h" /* for read_directory_unix() */ -#if !defined(_NO_EXTENSIONS) && !defined(_WIN32) +#if !defined(_NO_EXTENSIONS) && defined(__WINE__) #include <dirent.h> #include <sys/stat.h> -#include <unistd.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif #include <time.h> #endif @@ -1822,7 +1824,7 @@ /*TODO: There are even more menu items! */ #ifndef _NO_EXTENSIONS -#ifdef _WINE_ +#ifdef __WINE__ case ID_LICENSE: WineLicense(Globals.hMainWnd); break; @@ -3643,7 +3645,7 @@ ShowWindow(Globals.hMainWnd, cmdshow); -#if defined(_SHELL_FOLDERS) && !defined(_WINE_) +#if defined(_SHELL_FOLDERS) && !defined(__WINE__) /* Shell Namespace as default: */ child = alloc_child_window(path, get_path_pidl(path,Globals.hMainWnd), Globals.hMainWnd); #else