diff --git a/src/Bidi.C b/src/Bidi.C index db4775449b..6899c0ab73 100644 --- a/src/Bidi.C +++ b/src/Bidi.C @@ -8,6 +8,7 @@ * Full author contact details are available in file CREDITS. */ +#include #include "Bidi.h" #include "buffer.h" diff --git a/src/Bidi.h b/src/Bidi.h index deb6cd3100..a961d93f2e 100644 --- a/src/Bidi.h +++ b/src/Bidi.h @@ -12,8 +12,6 @@ #ifndef BIDI_H #define BIDI_H -#include - #include "support/types.h" #include diff --git a/src/ChangeLog b/src/ChangeLog index 9ca05a27b8..06c25830b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2005-04-25 Angus Leeming + + * Bidi.[Ch]: + * coordcache.[Ch]: + * ispell.C: + * lyxserver.C: + * mover.C: + * pch.h: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-04-21 Georg Baum * FuncStatus.h (StatusCodes): document @@ -69,7 +81,7 @@ 2005-04-12 Martin Vermeer * lyxtext.h: - * text.C (metrics): + * text.C (metrics): * text2.C (getFont): * rowpainter.C (getFont): Fix metrics bug introduced by inset fonts fix @@ -89,7 +101,7 @@ 2005-04-10 Martin Vermeer - * rowpainter.C (RowPainter, getFont): fix font inside inset + * rowpainter.C (RowPainter, getFont): fix font inside inset (bugs 1766, 1809) 2005-04-06 Martin Vermeer @@ -101,7 +113,7 @@ 2005-03-30 Jean-Marc Lasgouttes * lyxfunc.C (dispatch): translate message before sending it to the - minibuffer. + minibuffer. 2005-03-29 Angus Leeming @@ -111,7 +123,7 @@ 2005-03-25 Stephan Witt * vc-backend.C: use QuoteName to protect file names wherever - necessary. + necessary. 2005-03-27 Martin Vermeer @@ -161,15 +173,15 @@ * lyxfunc.C (getStatus): fix warning when assertions are disabled - * text3.C: - * lyxfunc.C: + * text3.C: + * lyxfunc.C: * dociterator.C: include , which is needed when assertions are disabled. -2005-03-05 Johnathan Burchill +2005-03-05 Johnathan Burchill - * text2.C: fix for stuck cursor when traversing two - consecutive spaces. [bug 1255] (pars_[old.pit()].setChange) + * text2.C: fix for stuck cursor when traversing two + consecutive spaces. [bug 1255] (pars_[old.pit()].setChange) 2005-02-25 Andreas Vox @@ -198,9 +210,9 @@ simple way. When no float is found above the caption, use the labelstring of the caption layout as default. - * text.C (breakParagraph, backspace): + * text.C (breakParagraph, backspace): * text2.C (init, setLayout, changeDepth): - * text3.C (dispatch): + * text3.C (dispatch): * CutAndPaste.C (cutSelection, pasteSelection): pass a buffer to updateCounters. @@ -213,7 +225,7 @@ 2005-02-24 Johnathan Burchill - * paragraph_funcs.C: fix crash when pasting insets in change + * paragraph_funcs.C: fix crash when pasting insets in change tracking mode [bug 1277] (honour change type in moveItem). 2005-02-23 Georg Baum @@ -302,8 +314,8 @@ * BufferView_pimpl.C (dispatch): handle LFUN_GOTO_PARAGRAPH here, but use update() to get correct screen display; use convert - instead of istringstream. - (getStatus): handle LFUN_GOTO_PARAGRAPH + instead of istringstream. + (getStatus): handle LFUN_GOTO_PARAGRAPH * lyxfunc.C (dispatch, getStatus): do not handle LFUN_GOTO_PARAGRAPH here. diff --git a/src/client/ChangeLog b/src/client/ChangeLog index e3edc2c73f..7322122a8a 100644 --- a/src/client/ChangeLog +++ b/src/client/ChangeLog @@ -1,3 +1,11 @@ +2005-04-25 Angus Leeming + + * client.C: + * pch.h: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-02-25 Lars Gullik Bjonnes * Makefile.am (man_MANS): clean generated files diff --git a/src/client/client.C b/src/client/client.C index 0c8285c409..4cc3ab70ac 100644 --- a/src/client/client.C +++ b/src/client/client.C @@ -20,16 +20,22 @@ #include // getpid(), getppid() -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif // select() -#include +#ifdef HAVE_SYS_SELECT_H +# include +#endif // socket(), connect() -#include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #include // fcntl() diff --git a/src/client/pch.h b/src/client/pch.h index 4148c061df..8eefad995f 100644 --- a/src/client/pch.h +++ b/src/client/pch.h @@ -12,8 +12,12 @@ # include #endif -#include -#include +#ifdef HAVE_SYS_SELECT_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #include #include diff --git a/src/coordcache.C b/src/coordcache.C index b574b271c3..69db4d349b 100644 --- a/src/coordcache.C +++ b/src/coordcache.C @@ -1,3 +1,13 @@ +/* \file coordcache.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS. + */ + +#include #include "coordcache.h" #include "debug.h" diff --git a/src/coordcache.h b/src/coordcache.h index 7794275255..a2d82353c1 100644 --- a/src/coordcache.h +++ b/src/coordcache.h @@ -1,3 +1,13 @@ +// -*- C++ -*- +/* \file coordcache.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS. + */ + #ifndef COORDCACHE_H #define COORDCACHE_H diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index e3f61a0e95..a171e252d8 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,12 @@ +2005-04-25 Angus Leeming + + * LyXView.C: + * nullpainter.[Ch]: + * pch.h: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-04-13 Georg Baum * Dialogs.[Ch] (checkStatus): new diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index d58ef0253c..48c4e4df99 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -39,7 +39,9 @@ #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 4d86e29711..76bf649ffb 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,13 @@ +2005-04-25 Angus Leeming + + * GChanges.C: + * GLog.C: + * GShowFile.C: + * GTexinfo.C: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-03-21 John Spray * GDocument.[Ch]: add "Page", "Margins", "Language" tabs. diff --git a/src/frontends/gtk/GChanges.C b/src/frontends/gtk/GChanges.C index fe0f0e514b..a518b75980 100644 --- a/src/frontends/gtk/GChanges.C +++ b/src/frontends/gtk/GChanges.C @@ -8,10 +8,15 @@ * Full author contact details are available in file CREDITS. */ +#include + // Too hard to make concept checks work with this file #ifdef _GLIBCXX_CONCEPT_CHECKS #undef _GLIBCXX_CONCEPT_CHECKS #endif +#ifdef _GLIBCPP_CONCEPT_CHECKS +#undef _GLIBCPP_CONCEPT_CHECKS +#endif #include "GChanges.h" #include "ControlChanges.h" diff --git a/src/frontends/gtk/GLog.C b/src/frontends/gtk/GLog.C index c2f13fa947..dba2a814ee 100644 --- a/src/frontends/gtk/GLog.C +++ b/src/frontends/gtk/GLog.C @@ -8,10 +8,15 @@ * Full author contact details are available in file CREDITS. */ +#include + // Too hard to make concept checks work with this file #ifdef _GLIBCXX_CONCEPT_CHECKS #undef _GLIBCXX_CONCEPT_CHECKS #endif +#ifdef _GLIBCPP_CONCEPT_CHECKS +#undef _GLIBCPP_CONCEPT_CHECKS +#endif #include "GLog.h" #include "ControlLog.h" diff --git a/src/frontends/gtk/GShowFile.C b/src/frontends/gtk/GShowFile.C index 964a3d765d..a6df1ce3fd 100644 --- a/src/frontends/gtk/GShowFile.C +++ b/src/frontends/gtk/GShowFile.C @@ -8,10 +8,15 @@ * Full author contact details are available in file CREDITS. */ +#include + // Too hard to make concept checks work with this file #ifdef _GLIBCXX_CONCEPT_CHECKS #undef _GLIBCXX_CONCEPT_CHECKS #endif +#ifdef _GLIBCPP_CONCEPT_CHECKS +#undef _GLIBCPP_CONCEPT_CHECKS +#endif #include "GShowFile.h" #include "ControlShowFile.h" diff --git a/src/frontends/gtk/GTexinfo.C b/src/frontends/gtk/GTexinfo.C index b41936f823..206807ae15 100644 --- a/src/frontends/gtk/GTexinfo.C +++ b/src/frontends/gtk/GTexinfo.C @@ -8,10 +8,15 @@ * Full author contact details are available in file CREDITS. */ +#include + // Too hard to make concept checks work with this file #ifdef _GLIBCXX_CONCEPT_CHECKS #undef _GLIBCXX_CONCEPT_CHECKS #endif +#ifdef _GLIBCPP_CONCEPT_CHECKS +#undef _GLIBCPP_CONCEPT_CHECKS +#endif #include "GTexinfo.h" diff --git a/src/frontends/nullpainter.C b/src/frontends/nullpainter.C index d7c3aa6f7b..19b2bd286d 100644 --- a/src/frontends/nullpainter.C +++ b/src/frontends/nullpainter.C @@ -9,6 +9,8 @@ * Full author contact details are available in file CREDITS. */ +#include + #include "nullpainter.h" #include "LColor.h" diff --git a/src/frontends/nullpainter.h b/src/frontends/nullpainter.h index 5b5ae13b25..24c33cf6e3 100644 --- a/src/frontends/nullpainter.h +++ b/src/frontends/nullpainter.h @@ -12,8 +12,6 @@ #ifndef NULLPAINTER_H #define NULLPAINTER_H -#include - #include "LColor.h" #include "Painter.h" diff --git a/src/frontends/pch.h b/src/frontends/pch.h index 87fc4f9326..9864bc0176 100644 --- a/src/frontends/pch.h +++ b/src/frontends/pch.h @@ -7,7 +7,9 @@ #include #include -#include +#ifdef HAVE_SYS_TIME_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 8a73828822..654daf8d4a 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2005-04-25 Angus Leeming + + * pch.h: + * moc/pch.h: + * qttableview.C: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-04-22 Angus Leeming * Makefile.am: diff --git a/src/frontends/qt2/moc/pch.h b/src/frontends/qt2/moc/pch.h index bc23177471..58755a04bb 100644 --- a/src/frontends/qt2/moc/pch.h +++ b/src/frontends/qt2/moc/pch.h @@ -15,7 +15,9 @@ #include #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif #include #include #include diff --git a/src/frontends/qt2/pch.h b/src/frontends/qt2/pch.h index 61e9ccbf3f..7be8c46c1e 100644 --- a/src/frontends/qt2/pch.h +++ b/src/frontends/qt2/pch.h @@ -15,7 +15,9 @@ #include #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif #include #include #include diff --git a/src/frontends/qt2/qttableview.C b/src/frontends/qt2/qttableview.C index a532974665..b5faba9a54 100644 --- a/src/frontends/qt2/qttableview.C +++ b/src/frontends/qt2/qttableview.C @@ -1,5 +1,5 @@ /********************************************************************** -** $Id: qttableview.C,v 1.6 2003/09/06 10:16:15 leeming Exp $ +** $Id: qttableview.C,v 1.7 2005/04/26 10:30:22 leeming Exp $ ** ** Implementation of QtTableView class ** @@ -19,7 +19,9 @@ #include "qscrollbar.h" #include "qpainter.h" -#include +#ifdef HAVE_LIMITS_H +# include +#endif /* Added by J. Levon for compilation with Qt 2.3.1 */ #ifndef Q_CHECK_PTR diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index eed486e1ac..7d84e34019 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,14 @@ +2005-04-25 Angus Leeming + + * FormLog.h: + * LayoutEngine.C: + * bmtable.c: + * xformsImage.C: + * forms/pch.h: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-04-25 Angus Leeming * globbing.[Ch]: moved here from the support directory. diff --git a/src/frontends/xforms/FormLog.h b/src/frontends/xforms/FormLog.h index aebbfba1ef..39e80a3611 100644 --- a/src/frontends/xforms/FormLog.h +++ b/src/frontends/xforms/FormLog.h @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * FormLog.h + * \file FormLog.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * diff --git a/src/frontends/xforms/LayoutEngine.C b/src/frontends/xforms/LayoutEngine.C index 84687d1677..c4392c308d 100644 --- a/src/frontends/xforms/LayoutEngine.C +++ b/src/frontends/xforms/LayoutEngine.C @@ -22,6 +22,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include + #include "LayoutEngine.h" #include "lyx_forms.h" diff --git a/src/frontends/xforms/bmtable.c b/src/frontends/xforms/bmtable.c index 61381e70e7..884ece7724 100644 --- a/src/frontends/xforms/bmtable.c +++ b/src/frontends/xforms/bmtable.c @@ -10,9 +10,11 @@ #include -#include #include "bmtable.h" #include "lyx_xpm.h" +#ifdef HAVE_STDLIB_H +# include +#endif #if defined(__cplusplus) extern "C" diff --git a/src/frontends/xforms/forms/pch.h b/src/frontends/xforms/forms/pch.h index be2ed7db71..894e21260d 100644 --- a/src/frontends/xforms/forms/pch.h +++ b/src/frontends/xforms/forms/pch.h @@ -5,4 +5,6 @@ #include "forms_gettext.h" #include "gettext.h" -#include +#ifdef HAVE_STDLIB_H +# include +#endif diff --git a/src/frontends/xforms/xformsImage.C b/src/frontends/xforms/xformsImage.C index 493f535726..fe1e8158ee 100644 --- a/src/frontends/xforms/xformsImage.C +++ b/src/frontends/xforms/xformsImage.C @@ -24,12 +24,10 @@ #include "lyx_forms.h" -#ifdef HAVE_FLIMAGE_H +#if defined (HAVE_FLIMAGE_H) # include -#else -# ifdef HAVE_X11_FLIMAGE_H +#elif defined (HAVE_X11_FLIMAGE_H) # include -# endif #endif #include diff --git a/src/ispell.C b/src/ispell.C index c14e5da106..ffe619e6b4 100644 --- a/src/ispell.C +++ b/src/ispell.C @@ -26,9 +26,11 @@ // HP-UX 11.x doesn't have this header #ifdef HAVE_SYS_SELECT_H -#include +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include #endif -#include using boost::shared_ptr; diff --git a/src/lyxserver.C b/src/lyxserver.C index a6213f9dee..70696796e4 100644 --- a/src/lyxserver.C +++ b/src/lyxserver.C @@ -51,17 +51,19 @@ #include #include -#include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #ifdef __EMX__ -#include -#include -#define OS2EMX_PLAIN_CHAR -#define INCL_DOSNMPIPES -#define INCL_DOSERRORS -#include -#include "support/os2_errortable.h" +# include +# include +# define OS2EMX_PLAIN_CHAR +# define INCL_DOSNMPIPES +# define INCL_DOSERRORS +# include +# include "support/os2_errortable.h" #endif using lyx::support::compare; diff --git a/src/lyxsocket.C b/src/lyxsocket.C index 29a2480aa0..9bd4c5f9fd 100644 --- a/src/lyxsocket.C +++ b/src/lyxsocket.C @@ -12,6 +12,8 @@ * Full author contact details are available in file CREDITS. */ +#include + #include "lyxsocket.h" #include "debug.h" diff --git a/src/mover.C b/src/mover.C index 4ffb3458fd..a74ae0795f 100644 --- a/src/mover.C +++ b/src/mover.C @@ -8,6 +8,8 @@ * Full author contact details are available in file CREDITS. */ +#include + #include "mover.h" #include "support/filetools.h" diff --git a/src/pch.h b/src/pch.h index 053b278860..cac89198fa 100644 --- a/src/pch.h +++ b/src/pch.h @@ -26,8 +26,12 @@ #ifdef HAVE_SYS_SELECT_H # include #endif -#include -#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #include #include diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 53a0cd2557..5947a4b695 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,21 @@ +2005-04-25 Angus Leeming + + * abort.C: + * atexit.c: + * forkedcall.[Ch]: + * forkedcontr.[Ch]: + * fs_extras.[Ch]: + * gzstream.[Ch]: + * kill.C: + * lyxsum.C: + * os2_defines.h: + * pch.h: + * tempname.C: + * userinfo.C: + include in .C files, not .h ones. + add licence blurb. + protect headers inside preprocessor guards. + 2005-04-25 Angus Leeming * globbing.[Ch]: removed to frontends/xforms. diff --git a/src/support/abort.C b/src/support/abort.C index 97eda87747..902de762e1 100644 --- a/src/support/abort.C +++ b/src/support/abort.C @@ -12,7 +12,9 @@ #include "support/lyxlib.h" -#include +#ifdef HAVE_STDLIB_H +# include +#endif void lyx::support::abort() diff --git a/src/support/atexit.c b/src/support/atexit.c index 55d0199ae2..4331809fc3 100644 --- a/src/support/atexit.c +++ b/src/support/atexit.c @@ -5,6 +5,8 @@ * This function is in the public domain. --Mike Stump. */ +#include + #ifndef NEED_on_exit int atexit(void (*f)()) { diff --git a/src/support/forkedcall.C b/src/support/forkedcall.C index d1c840a275..66bb45d221 100644 --- a/src/support/forkedcall.C +++ b/src/support/forkedcall.C @@ -49,8 +49,9 @@ # include # include # include -# include -# include +# ifdef HAVE_UNISTD_H +# include +# endif # include #endif diff --git a/src/support/forkedcall.h b/src/support/forkedcall.h index 9b4cc892fd..8d0c9fa443 100644 --- a/src/support/forkedcall.h +++ b/src/support/forkedcall.h @@ -29,7 +29,9 @@ #include #include -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif namespace lyx { diff --git a/src/support/forkedcontr.C b/src/support/forkedcontr.C index 3dd158c3b3..708509aa6c 100644 --- a/src/support/forkedcontr.C +++ b/src/support/forkedcontr.C @@ -27,7 +27,9 @@ # include # include # include -# include +# ifdef HAVE_UNISTD_H +# include +# endif # include # ifndef CXX_GLOBAL_CSTD diff --git a/src/support/forkedcontr.h b/src/support/forkedcontr.h index e36064c2df..7f55c798d0 100644 --- a/src/support/forkedcontr.h +++ b/src/support/forkedcontr.h @@ -18,7 +18,9 @@ #include -#include // needed for pid_t +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include #include diff --git a/src/support/fs_extras.C b/src/support/fs_extras.C index d7bd1b3ec2..ceb2a28f29 100644 --- a/src/support/fs_extras.C +++ b/src/support/fs_extras.C @@ -1,4 +1,13 @@ // -*- C++ -*- +/* \file fs_extras.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ + #include @@ -9,8 +18,12 @@ #include #include -#include -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #include // BOOST_POSIX or BOOST_WINDOWS specify which API to use. diff --git a/src/support/fs_extras.h b/src/support/fs_extras.h index a76c0ed9ef..d8866e8825 100644 --- a/src/support/fs_extras.h +++ b/src/support/fs_extras.h @@ -1,4 +1,12 @@ // -*- C++ -*- +/* \file fs_extras.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ #include diff --git a/src/support/gzstream.C b/src/support/gzstream.C index 0d4e7a753b..13013abdc0 100644 --- a/src/support/gzstream.C +++ b/src/support/gzstream.C @@ -18,17 +18,21 @@ // ============================================================================ // // File : gzstream.C -// Revision : $Revision: 1.3 $ -// Revision_date : $Date: 2005/01/18 14:15:57 $ +// Revision : $Revision: 1.4 $ +// Revision_date : $Date: 2005/04/26 10:30:24 $ // Author(s) : Deepak Bandyopadhyay, Lutz Kettner // // Standard streambuf implementation following Nicolai Josuttis, "The // Standard C++ Library". // ============================================================================ +#include + #include "gzstream.h" #include -#include // for memcpy +#ifdef HAVE_STRING_H +# include // for memcpy +#endif #ifdef GZSTREAM_NAMESPACE namespace GZSTREAM_NAMESPACE { diff --git a/src/support/gzstream.h b/src/support/gzstream.h index 0d7b6cb03a..0adeb62a99 100644 --- a/src/support/gzstream.h +++ b/src/support/gzstream.h @@ -18,8 +18,8 @@ // ============================================================================ // // File : gzstream.h -// Revision : $Revision: 1.1 $ -// Revision_date : $Date: 2003/07/27 23:40:08 $ +// Revision : $Revision: 1.2 $ +// Revision_date : $Date: 2005/04/26 10:30:24 $ // Author(s) : Deepak Bandyopadhyay, Lutz Kettner // // Standard streambuf implementation following Nicolai Josuttis, "The @@ -32,7 +32,9 @@ // standard C++ with new header file names and std:: namespace #include #include -#include +#ifdef HAVE_ZLIB_H +# include +#endif // For LyX #define GZSTREAM_NAMESPACE gz diff --git a/src/support/kill.C b/src/support/kill.C index 3c23a96a9e..9e5009ae74 100644 --- a/src/support/kill.C +++ b/src/support/kill.C @@ -12,7 +12,9 @@ #include "support/lyxlib.h" -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include #ifdef _WIN32 diff --git a/src/support/lyxsum.C b/src/support/lyxsum.C index 2d95646db9..d14ea24d7d 100644 --- a/src/support/lyxsum.C +++ b/src/support/lyxsum.C @@ -39,8 +39,12 @@ template struct boost::detail::crc_table_t<32, 0x04C11DB7, true>; // not `compatibility' version with caddr_t. #define _POSIX_C_SOURCE 199506L -#include -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #ifdef HAVE_UNISTD_H # include diff --git a/src/support/mkdir.C b/src/support/mkdir.C index 268984b7ab..4a068b42bb 100644 --- a/src/support/mkdir.C +++ b/src/support/mkdir.C @@ -12,8 +12,12 @@ #include "support/lyxlib.h" -#include -#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include #ifdef HAVE_UNISTD_H # include diff --git a/src/support/os2_defines.h b/src/support/os2_defines.h index b960155261..6e24187797 100644 --- a/src/support/os2_defines.h +++ b/src/support/os2_defines.h @@ -19,7 +19,9 @@ inline int readlink(const char *, char *, size_t) {return -1;} #else #include -#include +#ifdef HAVE_STDLIB_H +# include +#endif #define readlink(s, t, l) (-1) #endif #include diff --git a/src/support/pch.h b/src/support/pch.h index dffc65e01e..df68682721 100644 --- a/src/support/pch.h +++ b/src/support/pch.h @@ -15,14 +15,22 @@ #include #include -#include -#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include -#ifndef _WIN32 +#ifdef HAVE_SYS_SOCKET_H # include +#endif +#ifndef _WIN32 # include # include -# include +# ifdef HAVE_UNISTD_H +# include +# endif #endif #include diff --git a/src/support/tempname.C b/src/support/tempname.C index 975e443623..18699223a6 100644 --- a/src/support/tempname.C +++ b/src/support/tempname.C @@ -27,7 +27,9 @@ #if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP) # include -# include +# ifdef HAVE_SYS_STAT_H +# include +# endif #endif using boost::scoped_array; diff --git a/src/support/userinfo.C b/src/support/userinfo.C index 78dd703cae..bbda73b0f7 100644 --- a/src/support/userinfo.C +++ b/src/support/userinfo.C @@ -21,9 +21,13 @@ # include #else # include -# include +# ifdef HAVE_UNISTD_H +# include +# endif +#endif +#ifdef HAVE_SYS_TYPES_H +# include #endif -#include using std::string;