Mercurial > dwindows
diff dw.h @ 2862:7479ab54e014
Linux: Fixes for building dwtestoo on Linux/gcc.
GTK cannot be included in an extern "C" section.
Make sure ARCH is not set on platforms other than MacOS.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 Dec 2022 14:44:48 +0000 |
parents | 2934b2fdcd8e |
children | 939fbceec13f |
line wrap: on
line diff
--- a/dw.h Thu Dec 15 12:42:34 2022 +0000 +++ b/dw.h Thu Dec 15 14:44:48 2022 +0000 @@ -1231,8 +1231,16 @@ } Box; #else + +/* GTK Cannot be included in an extern "C" section */ +#ifdef __cplusplus +} +#endif + /* GTK Specific section */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <gtk/gtk.h> #if GTK_MAJOR_VERSION < 4 #ifdef GDK_WINDOWING_X11 @@ -1243,10 +1251,13 @@ #include <gdk/gdkprivate.h> #endif #include <gdk/gdkkeysyms.h> + +#ifdef __cplusplus +extern "C" { +#endif + #include <pthread.h> -#if !defined(GDK_WINDOWING_WIN32) # include <dlfcn.h> -#endif #define DW_DT_LEFT 1 #define DW_DT_UNDERSCORE (1 << 1)