]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed Cygwin compilation (can't use extern "C" in C compilation)
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 14 Feb 2005 14:53:28 +0000 (14:53 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 14 Feb 2005 14:53:28 +0000 (14:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/wxchar.h

index 32b9a24d1d6e5c181241f1a58e52ebaed78c4c1e..a47178e611ac5b5fe9f0619e2ecf9050e8527247 100644 (file)
         /* Cygwin versions, wchar.h requires sys/types.h */
         #ifdef __CYGWIN__
             #include <sys/types.h>
-            extern "C" {
+            #ifdef __cplusplus
+                extern "C" {
+            #endif
         #endif /* Cygwin */
-                #include <wchar.h>
-        #ifdef __CYGWIN__
+
+        #include <wchar.h>
+
+        #if defined(__CYGWIN__) && defined(__cplusplus)
             }
-        #endif /* Cygwin */
+        #endif /* Cygwin and C++ */
+
     #elif defined(HAVE_WCSTR_H)
         /* old compilers have relevant declarations here */
         #include <wcstr.h>