Using our msvcrt headers with msvc causes an 'inconsistent dll
linkage' warning with atof(), which is present in both <math.h> and
<stdlib.h>. Including both of these headers gives us a warning since
our <stdlib.h> does not give an import specification whereas the
function has already been prototyped as being __declspec(dllimport)
in (msvc's) <math.h>.
This patch adds the import specification to atof() under this
condition; it is likely some other functions will need the same
treatment.
This patch should be applied after "Sync (15): msvcrt Headers (1)".
You'll need to rerun configure after applying.
Cheers,
Jon
License: X11
ChangeLog:
Jon Griffiths <jon_p_griffiths@yahoo.com>
+dlls/msvcrt/Makefile.in include/msvcrt/stdlib.h
Define _MSVCRT_ when building msvcrt.dll.
msvc: atof is defined as declspec(dllimport) by native <math.h>
=====
"Don't wait for the seas to part, or messiahs to come;
Don't you sit around and waste this chance..." - Live
jon_p_griffiths@yahoo.com
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--- wine/dlls/msvcrt/Makefile.in Tue Mar 18 14:14:48 2003
+++ wine-develop/dlls/msvcrt/Makefile.in Wed Jul 9 18:17:03 2003
@@ -1,4 +1,4 @@
-EXTRADEFS = -DUSE_MSVCRT_PREFIX -D_MT
+EXTRADEFS = -D_MSVCRT_ -DUSE_MSVCRT_PREFIX -D_MT
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
--- wine-develop/include/msvcrt/stdlib2.h Wed Jul 9 19:08:29 2003
+++ wine-develop/include/msvcrt/stdlib.h Wed Jul 9 19:06:27 2003
@@ -19,6 +19,12 @@
# endif
#endif
+#if defined (_MSC_VER) && !defined (_MSVCRT_)
+#define CRTAPI(x) x __declspec(dllimport)
+#else
+#define CRTAPI(x) x
+#endif
+
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
@@ -166,7 +172,7 @@
void MSVCRT(abort)();
int MSVCRT(abs)(int);
int MSVCRT(atexit)(void (*)(void));
-double MSVCRT(atof)(const char*);
+CRTAPI(double) MSVCRT(atof)(const char*);
int MSVCRT(atoi)(const char*);
long MSVCRT(atol)(const char*);
void* MSVCRT(calloc)(MSVCRT(size_t),MSVCRT(size_t));