diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-02 14:43:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-02 14:43:04 (GMT) |
commit | afebc679a1637210fafc9315203027237bab8d0d (patch) | |
tree | ac171dac5a14e95f00d75d911ac8dcc2e594cf2b /macosx | |
parent | 472a20da74ae386ba8360843638d81fceb84ed5a (diff) | |
download | tk-afebc679a1637210fafc9315203027237bab8d0d.zip tk-afebc679a1637210fafc9315203027237bab8d0d.tar.gz tk-afebc679a1637210fafc9315203027237bab8d0d.tar.bz2 |
Fix [dba9f5ce3b]: tkInt.h: define MODULE_SCOPE before including tkPort.h
Since X11/Xlib.h doesn't compile with -Wc++-compat, don't even try.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXPort.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index 9393df3..088d402 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -49,6 +49,9 @@ # include <inttypes.h> #endif #include <unistd.h> +#if defined(__GNUC__) && !defined(__cplusplus) +# pragma GCC diagnostic ignored "-Wc++-compat" +#endif #include <X11/Xlib.h> #include <X11/cursorfont.h> #include <X11/keysym.h> @@ -75,6 +78,19 @@ #endif /* + * Used to tag functions that are only to be visible within the module being + * built and not outside it (where this is supported by the linker). + */ + +#ifndef MODULE_SCOPE +# ifdef __cplusplus +# define MODULE_SCOPE extern "C" +# else +# define MODULE_SCOPE extern +# endif +#endif + +/* * The following macro defines the number of fd_masks in an fd_set: */ |