[MPlayer-cvslog] r23448 - in trunk/loader: Makefile wine/basetsd.h wine/debugtools.h wine/driver.h wine/winbase.h wine/windef.h wine/winnt.h

diego subversion at mplayerhq.hu
Sat Jun 2 14:27:33 CEST 2007


Author: diego
Date: Sat Jun  2 14:27:33 2007
New Revision: 23448

Log:
Get rid of superfluous __WINE__ #define, it was always enabled and
cluttered the code. Blessed by Reimar.


Modified:
   trunk/loader/Makefile
   trunk/loader/wine/basetsd.h
   trunk/loader/wine/debugtools.h
   trunk/loader/wine/driver.h
   trunk/loader/wine/winbase.h
   trunk/loader/wine/windef.h
   trunk/loader/wine/winnt.h

Modified: trunk/loader/Makefile
==============================================================================
--- trunk/loader/Makefile	(original)
+++ trunk/loader/Makefile	Sat Jun  2 14:27:33 2007
@@ -2,7 +2,6 @@ include ../config.mak
 
 LIBNAME_COMMON = libloader.a
 
-CFLAGS= -D__WINE__
 #CFLAGS+=-Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
 
 SRCS_COMMON  = driver.c afl.c vfl.c

Modified: trunk/loader/wine/basetsd.h
==============================================================================
--- trunk/loader/wine/basetsd.h	(original)
+++ trunk/loader/wine/basetsd.h	Sat Jun  2 14:27:33 2007
@@ -12,9 +12,7 @@
 #ifndef __WINE_BASETSD_H
 #define __WINE_BASETSD_H
 
-#ifdef __WINE__
 #include "config.h"
-#endif /* defined(__WINE__) */
 
 #ifdef __cplusplus
 extern "C" {

Modified: trunk/loader/wine/debugtools.h
==============================================================================
--- trunk/loader/wine/debugtools.h	(original)
+++ trunk/loader/wine/debugtools.h	Sat Jun  2 14:27:33 2007
@@ -2,8 +2,6 @@
 #ifndef __WINE_DEBUGTOOLS_H
 #define __WINE_DEBUGTOOLS_H
 
-#ifdef __WINE__  /* Debugging interface is internal to Wine */
-
 #include <stdarg.h>
 #include "config.h"
 #include "windef.h"
@@ -88,6 +86,4 @@ extern int dbg_printf(const char *format
 #define DPRINTF dbg_printf
 #define MESSAGE dbg_printf
 
-#endif  /* __WINE__ */
-
 #endif  /* __WINE_DEBUGTOOLS_H */

Modified: trunk/loader/wine/driver.h
==============================================================================
--- trunk/loader/wine/driver.h	(original)
+++ trunk/loader/wine/driver.h	Sat Jun  2 14:27:33 2007
@@ -101,12 +101,10 @@ HMODULE16 WINAPI GetDriverModuleHandle16
 HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
 
 DWORD WINAPI GetDriverFlags( HDRVR hDriver );
-#ifdef __WINE__
 /* this call (GetDriverFlags) is not documented, nor the flags returned.
  * here are Wine only definitions
  */
 #define WINE_GDF_EXIST	0x80000000
 #define WINE_GDF_16BIT	0x10000000
-#endif
 
 #endif  /* __WINE_DRIVER_H */

Modified: trunk/loader/wine/winbase.h
==============================================================================
--- trunk/loader/wine/winbase.h	(original)
+++ trunk/loader/wine/winbase.h	Sat Jun  2 14:27:33 2007
@@ -909,9 +909,7 @@ typedef DWORD WINAPI (*LPPROGRESS_ROUTIN
 #define MEM_PRIVATE             0x00020000
 #define MEM_MAPPED              0x00040000
 #define MEM_TOP_DOWN            0x00100000
-#ifdef __WINE__
 #define MEM_SYSTEM              0x80000000
-#endif
 
 #define SEC_FILE                0x00800000
 #define SEC_IMAGE               0x01000000
@@ -995,9 +993,7 @@ typedef struct {
 	DWORD Reserved;
 }CRITICAL_SECTION;
 
-#ifdef __WINE__
 #define CRITICAL_SECTION_INIT { 0, -1, 0, 0, 0, 0 }
-#endif
 
 typedef struct {
         DWORD dwOSVersionInfoSize;
@@ -1779,10 +1775,8 @@ LONG        WINAPI InterlockedExchangeAd
 LONG        WINAPI InterlockedIncrement(PLONG);
 VOID        WINAPI SetLastError(DWORD);
 
-#ifdef __WINE__
 #define GetCurrentProcess() ((HANDLE)0xffffffff)
 #define GetCurrentThread()  ((HANDLE)0xfffffffe)
-#endif
 
 #ifdef __cplusplus
 }

Modified: trunk/loader/wine/windef.h
==============================================================================
--- trunk/loader/wine/windef.h	(original)
+++ trunk/loader/wine/windef.h	Sat Jun  2 14:27:33 2007
@@ -12,10 +12,7 @@
 #ifndef __WINE_WINDEF_H
 #define __WINE_WINDEF_H
 
-#ifdef __WINE__
 # include "config.h"
-# undef UNICODE
-#endif
 
 #ifdef _EGCS_
 #define __stdcall
@@ -43,37 +40,20 @@ extern "C" {
 #define NULL  0
 
 /* Macros to map Winelib names to the correct implementation name */
-/* depending on __WINE__ and UNICODE macros.                      */
 /* Note that Winelib is purely Win32.                             */
 
-#ifdef __WINE__
 # define WINELIB_NAME_AW(func) \
     func##_must_be_suffixed_with_W_or_A_in_this_context \
     func##_must_be_suffixed_with_W_or_A_in_this_context
-#else  /* __WINE__ */
-# ifdef UNICODE
-#  define WINELIB_NAME_AW(func) func##W
-# else
-#  define WINELIB_NAME_AW(func) func##A
-# endif  /* UNICODE */
-#endif  /* __WINE__ */
 
-#ifdef __WINE__
 # define DECL_WINELIB_TYPE_AW(type)  /* nothing */
-#else   /* __WINE__ */
-# define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
-#endif  /* __WINE__ */
 
 #ifndef NONAMELESSSTRUCT
-# if defined(__WINE__) || !defined(_FORCENAMELESSSTRUCT)
 #  define NONAMELESSSTRUCT
-# endif
 #endif /* !defined(NONAMELESSSTRUCT) */
 
 #ifndef NONAMELESSUNION
-# if defined(__WINE__) || !defined(_FORCENAMELESSUNION) || !defined(__cplusplus)
 #  define NONAMELESSUNION
-# endif
 #endif /* !defined(NONAMELESSUNION) */
 
 #ifndef NONAMELESSSTRUCT
@@ -250,11 +230,7 @@ typedef WIN_BOOL           *LPWIN_BOOL;
 
 /* Special case: a segmented pointer is just a pointer in the user's code. */
 
-#ifdef __WINE__
 typedef DWORD SEGPTR;
-#else
-typedef void* SEGPTR;
-#endif /* __WINE__ */
 
 /* Handle types that exist both in Win16 and Win32. */
 
@@ -482,18 +458,6 @@ typedef LRESULT CALLBACK (*WNDPROC16)(HW
 
 /* Define some empty macros for compatibility with Windows code. */
 
-#ifndef __WINE__
-#define NEAR
-#define FAR
-#define near
-#define far
-#define _near
-#define _far
-#define IN
-#define OUT
-#define OPTIONAL
-#endif  /* __WINE__ */
-
 /* Macro for structure packing. */
 
 #ifdef __GNUC__
@@ -529,13 +493,11 @@ typedef LRESULT CALLBACK (*WNDPROC16)(HW
 #define SELECTOROF(ptr)     (HIWORD(ptr))
 #define OFFSETOF(ptr)       (LOWORD(ptr))
 
-#ifdef __WINE__
 /* macros to set parts of a DWORD (not in the Windows API) */
 #define SET_LOWORD(dw,val)  ((dw) = ((dw) & 0xffff0000) | LOWORD(val))
 #define SET_LOBYTE(dw,val)  ((dw) = ((dw) & 0xffffff00) | LOBYTE(val))
 #define SET_HIBYTE(dw,val)  ((dw) = ((dw) & 0xffff00ff) | (LOWORD(val) & 0xff00))
 #define ADD_LOWORD(dw,val)  ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
-#endif
 
 /* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
 /* Note: These macros are semantically broken, at least for wrc.  wrc

Modified: trunk/loader/wine/winnt.h
==============================================================================
--- trunk/loader/wine/winnt.h	(original)
+++ trunk/loader/wine/winnt.h	Sat Jun  2 14:27:33 2007
@@ -81,7 +81,6 @@
 /* These types are _not_ defined for the emulator, because they */
 /* depend on the UNICODE macro that only exists in user's code. */
 
-//#ifndef __WINE__
 # ifdef UNICODE
 typedef WCHAR TCHAR, *PTCHAR;
 typedef LPWSTR PTSTR, LPTSTR;
@@ -93,7 +92,6 @@ typedef LPSTR PTSTR, LPTSTR;
 typedef LPCSTR PCTSTR, LPCTSTR;
 #define __TEXT(string) string
 # endif /* UNICODE */
-//#endif   /* __WINE__ */
 #define TEXT(quote) __TEXT(quote)
 
 typedef BYTE     BOOLEAN;
@@ -629,8 +627,6 @@ typedef struct _CONTEXT
 typedef CONTEXT *PCONTEXT;
 typedef HANDLE *PHANDLE;
 
-#ifdef __WINE__
-
 /* Macros for easier access to i386 context registers */
 
 #define EAX_reg(context)     ((context)->Eax)
@@ -766,8 +762,6 @@ typedef HANDLE *PHANDLE;
 # error You must define GET_IP for this CPU
 #endif
 
-#endif  /* __WINE__ */
-
 /*
  * Exception codes
  */



More information about the MPlayer-cvslog mailing list