From: Ivan Maidanski Date: Thu, 20 Apr 2017 21:54:16 +0000 (+0300) Subject: Eliminate 'locally defined symbol imported' MS linker warnings (cord) X-Git-Tag: v7.6.2~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=938488c955f72141f54d4a3d0a43368ab7afc55d;p=gc Eliminate 'locally defined symbol imported' MS linker warnings (cord) * NT_X64_THREADS_MAKEFILE (.c.obj): Add -DCORD_NOT_DLL option. * include/cord.h [GC_DLL] (CORD_API): Define to "extern" if CORD_NOT_DLL. --- diff --git a/NT_X64_THREADS_MAKEFILE b/NT_X64_THREADS_MAKEFILE index 6a6f9e77..d90008ce 100644 --- a/NT_X64_THREADS_MAKEFILE +++ b/NT_X64_THREADS_MAKEFILE @@ -30,7 +30,7 @@ OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_r all: gc64.dll gctest.exe cord\de.exe test_cpp.exe .c.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 + $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -DCORD_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 # Disable "may not be initialized" warnings. They're too approximate. # Disable crt security warnings, since unfortunately they warn about all sorts # of safe uses of strncpy. It would be nice to leave the rest enabled. diff --git a/include/cord.h b/include/cord.h index f414a916..adac772b 100644 --- a/include/cord.h +++ b/include/cord.h @@ -58,7 +58,7 @@ #include #include -#ifdef GC_DLL +#if defined(GC_DLL) && !defined(CORD_NOT_DLL) /* Same as for GC_API in gc_config_macros.h. */ # ifdef CORD_BUILD # if defined(__MINGW32__) || defined(__CEGCC__)