[RFC] __WINESRC__ & public headers

Dimitrie O. Paun dpaun at rogers.com
Sun Jan 5 17:58:37 CST 2003


On January 5, 2003 07:39 pm, Alexandre Julliard wrote:

> > For example, what if one decides to use names on _all_ gcc versions?
> > This thing gets in the way, no?
>
> No, then you define NONAMELESS* yourself, that's what we do in Wine.

OK, but my problem is that we defined them on the #ifdef __WINESRC__.
Which means our code will fail with other headers (even though, granted
the fix is trivial). But I'm thinking, wouldn't it better to explicitely
define these in the files that need it?

> The extra flag values etc. should be removed, by fixing the code to
> not depend on extending the API that way. Of course that's easier said
> than done...

Yay! Can you please suggest a solution / comment on my comments :)?
Here they are again:

-- It seems to me we want to move these to a wine/multimedia.h header.
include/mmddk.h:#ifdef __WINESRC__
include/mmddk.h-#define DRV_QUERYDSOUNDIFACE    (DRV_RESERVED + 10)
include/mmddk.h-#endif

include/mmsystem.h:#ifdef __WINESRC__
include/mmsystem.h-/* this call (GetDriverFlags) is not documented, nor the flags returned.
include/mmsystem.h- * here are Wine only definitions
include/mmsystem.h- */
include/mmsystem.h-#define WINE_GDF_EXIST       0x80000000
include/mmsystem.h-#define WINE_GDF_16BIT       0x10000000
include/mmsystem.h-#endif

include/mmsystem.h:#ifdef __WINESRC__
include/mmsystem.h-#define  WAVE_DIRECTSOUND               0x0080
include/mmsystem.h-#endif

-- ?
include/rpcproxy.h:#if defined(__WINESRC__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
include/rpcproxy.h-/* see http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp?frame=true */
include/rpcproxy.h-
include/rpcproxy.h-RPCRTAPI HRESULT RPC_ENTRY
include/rpcproxy.h-  CreateProxyFromTypeInfo( LPTYPEINFO pTypeInfo, LPUNKNOWN pUnkOuter, REFIID riid,
include/rpcproxy.h-                           LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv );
include/rpcproxy.h-RPCRTAPI HRESULT RPC_ENTRY
include/rpcproxy.h-  CreateStubFromTypeInfo( LPTYPEINFO pTypeInfo, REFIID riid, LPUNKNOWN pUnkServer,
include/rpcproxy.h-                          LPRPCSTUBBUFFER *ppStub );
include/rpcproxy.h-
include/rpcproxy.h-#endif

-- Seems like it wants moving to a wine/base.h
include/winbase.h:#ifdef __WINESRC__
include/winbase.h-#define CRITICAL_SECTION_INIT(name) { (void *)(__FILE__ ": " name), -1, 0, 0, 0, 0 }
include/winbase.h-#endif

-- These want moving to a wine-private header (wine/base.h?)
include/winnt.h:#ifdef __WINESRC__
include/winnt.h-#define MEM_SYSTEM              0x80000000
include/winnt.h-#endif

include/winnt.h:#ifdef __WINESRC__
include/winnt.h-
include/winnt.h-/* Macros to retrieve the current context */
include/winnt.h-
include/winnt.h-#ifdef __i386__
include/winnt.h-
include/winnt.h-#define _DEFINE_REGS_ENTRYPOINT( name, fn, args ) \
include/winnt.h-    __ASM_GLOBAL_FUNC( name, \
include/winnt.h-                       "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
include/winnt.h-                       ".long " __ASM_NAME(#fn) "\n\t" \
include/winnt.h-                       ".byte " #args ", " #args )

include/winsock.h:#ifdef __WINESRC__
include/winsock.h-#define FD_WINE_LISTENING          0x10000000
include/winsock.h-#define FD_WINE_NONBLOCKING        0x20000000
include/winsock.h-#define FD_WINE_CONNECTED          0x40000000
include/winsock.h-#define FD_WINE_RAW                0x80000000
include/winsock.h-#define FD_WINE_INTERNAL           0xFFFF0000
include/winsock.h-#endif

-- What about these?
include/wownt32.h:#ifdef __WINESRC__
include/wownt32.h-/* under Wine use the kernel functions directly so we don't have to import wow32 */
include/wownt32.h-HANDLE WINAPI K32WOWHandle32(WORD,WOW_HANDLE_TYPE);
include/wownt32.h-WORD   WINAPI K32WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
include/wownt32.h-#define WOWHandle32 K32WOWHandle32
include/wownt32.h-#define WOWHandle16 K32WOWHandle16
include/wownt32.h-#endif


-- 
Dimi.




More information about the wine-devel mailing list