From 35c4ae55274f894bf5e95056975be7876e08e1f3 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 2 Mar 2016 12:40:53 +0000 Subject: 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. See discussion and test file in discussion in fltk.general: https://groups.google.com/forum/#!topic/fltkgeneral/gzmdRk2LvAk https://groups.google.com/d/msg/fltkgeneral/gzmdRk2LvAk/EOe314ChBgAJ This commit fixes FL/fl_utf8.h to #include X11 headers only if compiled in the FLTK library (same as in FLTK 1.3.4, svn r 11266). 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-porting@11268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/fl_utf8.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index b8247f006..fe23fe93f 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -35,6 +35,13 @@ #include #include +/* + *FIXME* -- PORTME: should not be in the header -- + Many, if not all of the included headers below should not be included + here, because this pollutes user space definitions. + Note: FL/fl_utf8.h is included in many other header files! +*/ + #ifdef WIN32 # include # include @@ -67,8 +74,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 -- cgit v1.2.3