DLL specific defines

Patrik Stridvall ps at leissner.se
Wed Feb 13 13:21:21 CST 2002


As I said in last mail I have started with a 
Makefile.in to .dsp/.dsw converter.

Another problem is when compiling with the Microsoft
header is that it seems that Micrsoft defines
certain macros when compiling each DLL.
This in order to get DECLSPEC_IMPORT right.

For example:
#if !defined(_ADVAPI32_)
#define WINADVAPI DECLSPEC_IMPORT
#else
#define WINADVAPI
#endif

This prevents compiling of ADVAPI32.DLL since 
Wine advapi32 exports the functions not
imports then. So _ADVAPI32_ needs to be defined.

Unfortunely there is no rule what should be
defined. After some detective work later I
found most of them.

With the patch below this is added as EXTRADEFS
flags so I can pick it up from the Makefile_in's
and convert to .dsp compile rules. 

Of course now Wine can use these macros also if we wish.

---8<---

Index: wine/dlls/advapi32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/Makefile.in,v
retrieving revision 1.9
diff -u -u -r1.9 Makefile.in
--- wine/dlls/advapi32/Makefile.in	2000/11/30 20:31:41	1.9
+++ wine/dlls/advapi32/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_ADVAPI32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/comctl32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/Makefile.in,v
retrieving revision 1.22
diff -u -u -r1.22 Makefile.in
--- wine/dlls/comctl32/Makefile.in	2000/12/06 00:05:14	1.22
+++ wine/dlls/comctl32/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_COMCTL32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/crypt32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/crypt32/Makefile.in,v
retrieving revision 1.1
diff -u -u -r1.1 Makefile.in
--- wine/dlls/crypt32/Makefile.in	2002/01/10 19:41:12	1.1
+++ wine/dlls/crypt32/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_CRYPT32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/gdi/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/gdi/Makefile.in,v
retrieving revision 1.17
diff -u -u -r1.17 Makefile.in
--- wine/dlls/gdi/Makefile.in	2001/12/17 21:01:58	1.17
+++ wine/dlls/gdi/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_GDI32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/imagehlp/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/imagehlp/Makefile.in,v
retrieving revision 1.9
diff -u -u -r1.9 Makefile.in
--- wine/dlls/imagehlp/Makefile.in	2000/11/16 04:15:09	1.9
+++ wine/dlls/imagehlp/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_IMAGEHLP_SOURCE_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/netapi32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/netapi32/Makefile.in,v
retrieving revision 1.1
diff -u -u -r1.1 Makefile.in
--- wine/dlls/netapi32/Makefile.in	2001/11/06 17:52:37	1.1
+++ wine/dlls/netapi32/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SVRAPI_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/ntdll/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/Makefile.in,v
retrieving revision 1.23
diff -u -u -r1.23 Makefile.in
--- wine/dlls/ntdll/Makefile.in	2002/01/29 18:30:16	1.23
+++ wine/dlls/ntdll/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_NTSYSTEM_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/ole32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/ole32/Makefile.in,v
retrieving revision 1.17
diff -u -u -r1.17 Makefile.in
--- wine/dlls/ole32/Makefile.in	2002/02/05 18:11:17	1.17
+++ wine/dlls/ole32/Makefile.in	2002/02/13 16:40:16
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_OLE32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/rpcrt4/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/Makefile.in,v
retrieving revision 1.3
diff -u -u -r1.3 Makefile.in
--- wine/dlls/rpcrt4/Makefile.in	2000/11/12 03:50:12	1.3
+++ wine/dlls/rpcrt4/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_RPCRT4_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/setupapi/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/Makefile.in,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile.in
--- wine/dlls/setupapi/Makefile.in	2001/04/17 17:39:35	1.10
+++ wine/dlls/setupapi/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SETUPAPI_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/shdocvw/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shdocvw/Makefile.in,v
retrieving revision 1.1
diff -u -u -r1.1 Makefile.in
--- wine/dlls/shdocvw/Makefile.in	2001/01/11 22:32:44	1.1
+++ wine/dlls/shdocvw/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SHDOCVW_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/shell32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shell32/Makefile.in,v
retrieving revision 1.41
diff -u -u -r1.41 Makefile.in
--- wine/dlls/shell32/Makefile.in	2001/02/23 01:12:26	1.41
+++ wine/dlls/shell32/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SHELL32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/shlwapi/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/Makefile.in,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile.in
--- wine/dlls/shlwapi/Makefile.in	2001/01/05 22:22:57	1.10
+++ wine/dlls/shlwapi/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SHLWAPI_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/user/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/user/Makefile.in,v
retrieving revision 1.33
diff -u -u -r1.33 Makefile.in
--- wine/dlls/user/Makefile.in	2001/12/17 21:37:53	1.33
+++ wine/dlls/user/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_USER32_ -D_WINABLE_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/wininet/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/wininet/Makefile.in,v
retrieving revision 1.11
diff -u -u -r1.11 Makefile.in
--- wine/dlls/wininet/Makefile.in	2002/01/29 18:12:28	1.11
+++ wine/dlls/wininet/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_WINX32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/winmm/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/winmm/Makefile.in,v
retrieving revision 1.19
diff -u -u -r1.19 Makefile.in
--- wine/dlls/winmm/Makefile.in	2001/01/13 01:01:00	1.19
+++ wine/dlls/winmm/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_WINMM_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: wine/dlls/winspool/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/winspool/Makefile.in,v
retrieving revision 1.13
diff -u -u -r1.13 Makefile.in
--- wine/dlls/winspool/Makefile.in	2001/04/27 18:02:46	1.13
+++ wine/dlls/winspool/Makefile.in	2002/02/13 16:40:17
@@ -1,3 +1,4 @@
+EXTRADEFS = -D_SPOOL32_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@




More information about the wine-patches mailing list