From e4f26ea33a7b81115a6f09be73606f000023e24a Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 2 Mar 2016 12:15:08 +0000 Subject: [PATCH] Don't expose X11 headers in user space any more (mostly). Platform headers should not be #include'd in public FLTK header files, so that user space is not polluted by platform specific definitions. This commit fixes FL/fl_utf8.h to #include X11 headers only if compiled in the FLTK library. Todo (FLTK 1.4): Remove more unnecessary (unwanted) system header #include statements from FL/x.H and other public header files. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ FL/fl_utf8.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index fd585d916..d87d5b931 100644 --- a/CHANGES +++ b/CHANGES @@ -60,6 +60,8 @@ CHANGES IN FLTK 1.3.4 RELEASED: ??? ?? 2016 or not (STR #3142). It also captures subwindows of GL windows. - Fl::delete_widget() now hides the widget or window immediately (i.e. when called) - only destruction is delayed as before. + - FLTK header files don't expose X11 definitions in user code any more + unless required by including FL/x.H explicitly or implicitly. - The PostScript code output when printing images under Linux/Unix is quite smaller due to use of lossless compression techniques. - The Linux/Unix printer dialog now uses BSD-style printing commands diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index 1551991b5..2121198df 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -60,8 +60,10 @@ #else /* X11 */ # include # include -# include -# include +# if defined(FL_LIBRARY) /* don't expose X11 headers in user space */ +# include +# include +# endif /* defined(FL_LIBRARY) -- don't expose X11 headers in user space */ # include # define xchar unsigned short #endif