libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32.


From: Peter Rosin
Subject: [PATCH] Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32.
Date: Fri, 17 Sep 2010 16:18:55 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Hi!

I noticed that -DDLL_EXPORT didn't appear when I compiled C++ code
with MSVC.

I'd like this one to go in before the release.

Ok to push?

Cheers,
Peter


>From 0114c5a834fb1ce8e8324ff6d7c0bb782139c3c7 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Fri, 17 Sep 2010 16:15:04 +0200
Subject: [PATCH] Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32.

* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2]
[pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++.

Signed-off-by: Peter Rosin <address@hidden>
---
 ChangeLog             |    6 ++++++
 libltdl/m4/libtool.m4 |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 44a76e2..dbbc21f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-17  Peter Rosin  <address@hidden>
+
+       Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32.
+       * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2]
+       [pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++.
+
 2010-09-16  Charles Wilson  <address@hidden>
 
        Fix sh.test failure introduced in 72064249
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 3a4e757..ec7804e 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3873,6 +3873,12 @@ m4_if([$1], [CXX], [
          ;;
        esac
        ;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
       dgux*)
        case $cc_basename in
          ec++*)
-- 
1.7.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]