]> git.lyx.org Git - lyx.git/commitdiff
Consistent use of preprocessor guards;
authorAngus Leeming <leeming@lyx.org>
Tue, 26 Apr 2005 10:30:24 +0000 (10:30 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 26 Apr 2005 10:30:24 +0000 (10:30 +0000)
include <config.h> in .C files, not .h ones;
licence blurb.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9876 a592a061-630c-0410-9148-cb99ea01b6c8

51 files changed:
src/Bidi.C
src/Bidi.h
src/ChangeLog
src/client/ChangeLog
src/client/client.C
src/client/pch.h
src/coordcache.C
src/coordcache.h
src/frontends/ChangeLog
src/frontends/LyXView.C
src/frontends/gtk/ChangeLog
src/frontends/gtk/GChanges.C
src/frontends/gtk/GLog.C
src/frontends/gtk/GShowFile.C
src/frontends/gtk/GTexinfo.C
src/frontends/nullpainter.C
src/frontends/nullpainter.h
src/frontends/pch.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/moc/pch.h
src/frontends/qt2/pch.h
src/frontends/qt2/qttableview.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormLog.h
src/frontends/xforms/LayoutEngine.C
src/frontends/xforms/bmtable.c
src/frontends/xforms/forms/pch.h
src/frontends/xforms/xformsImage.C
src/ispell.C
src/lyxserver.C
src/lyxsocket.C
src/mover.C
src/pch.h
src/support/ChangeLog
src/support/abort.C
src/support/atexit.c
src/support/forkedcall.C
src/support/forkedcall.h
src/support/forkedcontr.C
src/support/forkedcontr.h
src/support/fs_extras.C
src/support/fs_extras.h
src/support/gzstream.C
src/support/gzstream.h
src/support/kill.C
src/support/lyxsum.C
src/support/mkdir.C
src/support/os2_defines.h
src/support/pch.h
src/support/tempname.C
src/support/userinfo.C

index db4775449bd0a7f6952f5032ea55e13f726c25ee..6899c0ab73786aa6a5b2e5dcca6af4b87ef77cc8 100644 (file)
@@ -8,6 +8,7 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
 
 #include "Bidi.h"
 #include "buffer.h"
index deb6cd31004fc7eacae8dafeee69b1928887cdf6..a961d93f2ebe1c1110abcac0faebe1f072421e1e 100644 (file)
@@ -12,8 +12,6 @@
 #ifndef BIDI_H
 #define BIDI_H
 
-#include <config.h>
-
 #include "support/types.h"
 #include <vector>
 
index 9ca05a27b820a029c2e1348d517087aae0505e59..06c25830b4cb04cd1f734751e7aade6f7cbbeb8b 100644 (file)
@@ -1,3 +1,15 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * Bidi.[Ch]:
+       * coordcache.[Ch]:
+       * ispell.C:
+       * lyxserver.C:
+       * mover.C:
+       * pch.h:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-04-21  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * FuncStatus.h (StatusCodes): document
@@ -69,7 +81,7 @@
 2005-04-12  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * lyxtext.h:
-       * text.C (metrics): 
+       * text.C (metrics):
        * text2.C (getFont):
        * rowpainter.C (getFont): Fix metrics bug introduced by inset
        fonts fix
 
 2005-04-10  Martin Vermeer  <martin.vermeer@hut.fi>
 
-       * rowpainter.C (RowPainter, getFont): fix font inside inset 
+       * rowpainter.C (RowPainter, getFont): fix font inside inset
        (bugs 1766, 1809)
 
 2005-04-06  Martin Vermeer  <martin.vermeer@hut.fi>
 2005-03-30  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * lyxfunc.C (dispatch): translate message before sending it to the
-       minibuffer. 
+       minibuffer.
 
 2005-03-29  Angus Leeming  <leeming@lyx.org>
 
 2005-03-25  Stephan Witt  <stephan.witt@beusen.de>
 
        * vc-backend.C: use QuoteName to protect file names wherever
-       necessary. 
+       necessary.
 
 2005-03-27  Martin Vermeer  <martin.vermeer@hut.fi>
 
 
        * lyxfunc.C (getStatus): fix warning when assertions are disabled
 
-       * text3.C: 
-       * lyxfunc.C: 
+       * text3.C:
+       * lyxfunc.C:
        * dociterator.C: include <boost/current_function.hpp>, which is
        needed when assertions are disabled.
 
-2005-03-05  Johnathan Burchill  <jkerrb@users.sourceforge.net> 
+2005-03-05  Johnathan Burchill  <jkerrb@users.sourceforge.net>
 
-       * 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  <avox@arcor.de>
 
        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.
 
 
 2005-02-24  Johnathan Burchill  <jkerrb@users.sourceforge.net>
 
-       * 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  <Georg.Baum@post.rwth-aachen.de>
 
        * 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.
index e3edc2c73f7aed9f0e57b63345493c0bc6bb3a62..7322122a8a0e5ef12d3006e4c8900405abcb0024 100644 (file)
@@ -1,3 +1,11 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * client.C:
+       * pch.h:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-02-25  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * Makefile.am (man_MANS): clean generated files
index 0c8285c409fd07597fcc1718eb4b12430dae0771..4cc3ab70ac509d7fff3c298c628b3bee7fb2fb03 100644 (file)
 #include <boost/scoped_ptr.hpp>
 
 // getpid(), getppid()
-#include <sys/types.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
 // select()
-#include <sys/select.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
 
 // socket(), connect()
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 #include <sys/un.h>
 
 // fcntl()
index 4148c061dfa2641ff6fbf98bb860f79550d8046f..8eefad995f52ae22dde0976c025130503893e5bf 100644 (file)
 # include <unistd.h>
 #endif
 
-#include <sys/select.h>
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 #include <sys/types.h>
 #include <sys/un.h>
 
index b574b271c35b46ad87ce43b6f6da8813dd05b82d..69db4d349b01bc7510de027587959bde85be239b 100644 (file)
@@ -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 <config.h>
 
 #include "coordcache.h"
 #include "debug.h"
index 779427525516c06d4c3112ce7a51d45804a8e4b1..a2d82353c193e141189be0f5beaefb9996015805 100644 (file)
@@ -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
 
index e3f61a0e95e1799f513517d2bd5458c6d74614ce..a171e252d874ed32bf4c3f8b37065ca5ad456daf 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * LyXView.C:
+       * nullpainter.[Ch]:
+       * pch.h:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-04-13  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * Dialogs.[Ch] (checkStatus): new
index d58ef0253c69c04a58baf6f656bda62481d2be00..48c4e4df9942e68339fb6eb5601658304769c828 100644 (file)
@@ -39,7 +39,9 @@
 
 #include <boost/bind.hpp>
 
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 4d86e297114ab33818f5f86d432c4f373b3c34f2..76bf649ffb48d63b8691b1c7b1f7bf65c3c95010 100644 (file)
@@ -1,3 +1,13 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * GChanges.C:
+       * GLog.C:
+       * GShowFile.C:
+       * GTexinfo.C:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-03-21  John Spray  <spray_john@users.sf.net>
 
        * GDocument.[Ch]: add "Page", "Margins", "Language" tabs.
index fe0f0e514b8de96bf62ab36bca6f9a292b2b7f90..a518b759804424826ba4695fc62bde7cd0e39978 100644 (file)
@@ -8,10 +8,15 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 // 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"
index c2f13fa947992af2e45cfc82dfc505a1fb3b7ffb..dba2a814eee5b10fed03d13b2ecd4536f27a40aa 100644 (file)
@@ -8,10 +8,15 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 // 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"
index 964a3d765db1b85ec97b760e73ab62b358927359..a6df1ce3fd56b2c46d1f578674104e21b95db7be 100644 (file)
@@ -8,10 +8,15 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 // 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"
index b41936f823967b5d9a95d9003575df655d5beec7..206807ae1503aa3bf7cfac1895496eff2652f7e4 100644 (file)
@@ -8,10 +8,15 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 // 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"
 
index d7c3aa6f7b80d23e4438698f45b223538a316dc4..19b2bd286d161fc4717c8c65d02978f077fa21dc 100644 (file)
@@ -9,6 +9,8 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 #include "nullpainter.h"
 
 #include "LColor.h"
index 5b5ae13b25737ad5b5d139d80dd99170b71895e8..24c33cf6e3400182f4aee2e3d5e112ad4af64f5e 100644 (file)
@@ -12,8 +12,6 @@
 #ifndef NULLPAINTER_H
 #define NULLPAINTER_H
 
-#include <config.h>
-
 #include "LColor.h"
 #include "Painter.h"
 
index 87fc4f9326621ab7c423c7287fd3070aa8b9f180..9864bc017614d865c94b1951ba626312385805a6 100644 (file)
@@ -7,7 +7,9 @@
 #include <boost/signals/trackable.hpp>
 #include <boost/utility.hpp>
 
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 8a73828822ce5aba1f2f490818f075692b564406..654daf8d4af51f611bdc01448e2474eb816b4e52 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * pch.h:
+       * moc/pch.h:
+       * qttableview.C:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-04-22  Angus Leeming  <leeming@lyx.org>
 
        * Makefile.am:
index bc231774716f285dbbc8a0b99f992aa69384fd03..58755a04bb1e6009f679c623beae0299510c0b10 100644 (file)
@@ -15,7 +15,9 @@
 #include <algorithm>
 #include <cmath>
 #include <iomanip>
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
 #include <map>
 #include <sstream>
 #include <stack>
index 61e9ccbf3fd9a5709e03920d6f280953a609a971..7be8c46c1ea6feb9d271c78ee69e02b666854022 100644 (file)
@@ -15,7 +15,9 @@
 #include <algorithm>
 #include <cmath>
 #include <iomanip>
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
 #include <map>
 #include <sstream>
 #include <stack>
index a53297466587cfb1cdfa36072635eff8ad48634e..b5faba9a5499d523e97c3af3054d9c0fb9e0a6be 100644 (file)
@@ -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 <limits.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
 
 /* Added by J. Levon for compilation with Qt 2.3.1 */
 #ifndef Q_CHECK_PTR
index eed486e1acb6f1623f4705b17f3a14f978a93d1d..7d84e3401968832d8a9e6417b3162fcb52bb658d 100644 (file)
@@ -1,3 +1,14 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * FormLog.h:
+       * LayoutEngine.C:
+       * bmtable.c:
+       * xformsImage.C:
+       * forms/pch.h:
+       include <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-04-25  Angus Leeming  <leeming@lyx.org>
 
        * globbing.[Ch]: moved here from the support directory.
index aebbfba1ef9aab84ddd62ac637f267dad1920c36..39e80a36118ce30917a9d7f5c4203630a1372146 100644 (file)
@@ -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.
  *
index 84687d1677ab9099bd2f3e6b5b57c9627615ad9f..c4392c308d096b4f3423fd56b82cb83c5b0dee8f 100644 (file)
@@ -22,6 +22,8 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
+#include <config.h>
+
 #include "LayoutEngine.h"
 #include "lyx_forms.h"
 
index 61381e70e78f2e9d84ab21cf756d5dc4f509d61b..884ece7724c1d27677a95b44e3ef00ccedde4d2e 100644 (file)
 
 #include <config.h>
 
-#include <stdlib.h>
 #include "bmtable.h"
 #include "lyx_xpm.h"
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
 
 #if defined(__cplusplus)
 extern "C"
index be2ed7db71ccef7834edbd51e50ce9032e3ee84d..894e21260df63174488e5f9e0ddd3c70e4f1b036 100644 (file)
@@ -5,4 +5,6 @@
 #include "forms_gettext.h"
 #include "gettext.h"
 
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
index 493f5357269bd14e13f24cfa9d027a5096d8b08c..fe1e8158eeac85e066d3259a57914b717f26b291 100644 (file)
 
 #include "lyx_forms.h"
 
-#ifdef HAVE_FLIMAGE_H
+#if defined (HAVE_FLIMAGE_H)
 # include <flimage.h>
-#else
-# ifdef HAVE_X11_FLIMAGE_H
+#elif defined (HAVE_X11_FLIMAGE_H)
 # include <X11/flimage.h>
-# endif
 #endif
 
 #include <boost/bind.hpp>
index c14e5da106d763bb97aa73205449e4f75199cdc0..ffe619e6b4a6b67c208f5e94420e1327d33f7c7b 100644 (file)
 
 // HP-UX 11.x doesn't have this header
 #ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
 #endif
-#include <sys/time.h>
 
 using boost::shared_ptr;
 
index a6213f9deefe2fce95e8559d0ff8c1d7d8daef65..70696796e4f7cfd2c523298f82bd452a2f5b0652 100644 (file)
 #include <boost/bind.hpp>
 
 #include <cerrno>
-#include <sys/stat.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #include <fcntl.h>
 
 #ifdef __EMX__
-#include <cstdlib>
-#include <io.h>
-#define OS2EMX_PLAIN_CHAR
-#define INCL_DOSNMPIPES
-#define INCL_DOSERRORS
-#include <os2.h>
-#include "support/os2_errortable.h"
+# include <cstdlib>
+# include <io.h>
+# define OS2EMX_PLAIN_CHAR
+# define INCL_DOSNMPIPES
+# define INCL_DOSERRORS
+# include <os2.h>
+# include "support/os2_errortable.h"
 #endif
 
 using lyx::support::compare;
index 29a2480aa04438ae2d7ebe6c1453c4d50dcb47d1..9bd4c5f9fd4a475d31391914f04d6a4e8971819d 100644 (file)
@@ -12,6 +12,8 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 #include "lyxsocket.h"
 
 #include "debug.h"
index 4ffb3458fde4676549aa92ef2d96488ab4609e7f..a74ae0795f45f27258c7669d71e75225a0ab0788 100644 (file)
@@ -8,6 +8,8 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 #include "mover.h"
 
 #include "support/filetools.h"
index 053b278860ebb85a4515029e5e0169f0fb7526ae..cac89198fa2104843adc411d21e2d68f6d2e569d 100644 (file)
--- a/src/pch.h
+++ b/src/pch.h
 #ifdef HAVE_SYS_SELECT_H
 # include <sys/select.h>
 #endif
-#include <sys/stat.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 
 #include <algorithm>
 #include <cerrno>
index 53a0cd25570306e7f494b6a300b1a371f9a42c1d..5947a4b69540608862aa210cc53e4e645f0e88cb 100644 (file)
@@ -1,3 +1,21 @@
+2005-04-25  Angus Leeming  <leeming@lyx.org>
+
+       * 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 <config.h> in .C files, not .h ones.
+       add licence blurb.
+       protect headers inside preprocessor guards.
+
 2005-04-25  Angus Leeming  <leeming@lyx.org>
 
        * globbing.[Ch]: removed to frontends/xforms.
index 97eda877470730caad099afa366189826df8538d..902de762e1b58b564d943e59abdf2765567f0f77 100644 (file)
@@ -12,7 +12,9 @@
 
 #include "support/lyxlib.h"
 
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
 
 
 void lyx::support::abort()
index 55d0199ae2b11a7166ba6496eda52412f703636c..4331809fc33997c7e5703a6b7aca2bfa5a43c94d 100644 (file)
@@ -5,6 +5,8 @@
  * This function is in the public domain.  --Mike Stump.
  */
 
+#include <config.h>
+
 #ifndef NEED_on_exit
 int atexit(void (*f)())
 {
index d1c840a275d2b75aad57eb7c9370bf0cd20d04b1..66bb45d2212348d098f87ccee614fc95433577f7 100644 (file)
@@ -49,8 +49,9 @@
 # include <cerrno>
 # include <csignal>
 # include <cstdlib>
-# include <unistd.h>
-# include <sys/types.h>
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 # include <sys/wait.h>
 #endif
 
index 9b4cc892fd5a9bac40fc453e5c26ba80f178b0d5..8d0c9fa443a50ab94cfb1d7c1d4f5a667d14ec98 100644 (file)
@@ -29,7 +29,9 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/signal.hpp>
 
-#include <sys/types.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 
 
 namespace lyx {
index 3dd158c3b33e30ef12bca66c034a4e37d08f2189..708509aa6c27fd63198de8ef1ed0fa98bb1d2b4c 100644 (file)
@@ -27,7 +27,9 @@
 # include <cerrno>
 # include <csignal>
 # include <cstdlib>
-# include <unistd.h>
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 # include <sys/wait.h>
 
 # ifndef CXX_GLOBAL_CSTD
index e36064c2df4d9cb4095ca024402f9822f687df61..7f55c798d06e15bfdcdc77b045a995e5c286c5fd 100644 (file)
@@ -18,7 +18,9 @@
 
 #include <boost/shared_ptr.hpp>
 
-#include <sys/types.h> // needed for pid_t
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 
 #include <list>
 #include <string>
index d7bd1b3ec2bae6e4d1b55498c10486d6f2b5e82a..ceb2a28f29cba01913a2e45703575f04d1728694 100644 (file)
@@ -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 <config.h>
 
@@ -9,8 +18,12 @@
 #include <boost/detail/workaround.hpp>
 #include <boost/throw_exception.hpp>
 
-#include <sys/types.h>
-#include <sys/stat.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #include <fcntl.h>
 
 // BOOST_POSIX or BOOST_WINDOWS specify which API to use.
index a76c0ed9ef01f080bfa940990bf951468dd8d44e..d8866e8825d84e97afff6fc13e34bcff0ce192b5 100644 (file)
@@ -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 <boost/filesystem/path.hpp>
 
index 0d4e7a753b9b922a99052e7ec005e20fa70c2502..13013abdc0d9fc8ec0edab4c10fc9581818ecebc 100644 (file)
 // ============================================================================
 //
 // 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 <config.h>
+
 #include "gzstream.h"
 #include <iostream>
-#include <string.h>  // for memcpy
+#ifdef HAVE_STRING_H
+# include <string.h> // for memcpy
+#endif
 
 #ifdef GZSTREAM_NAMESPACE
 namespace GZSTREAM_NAMESPACE {
index 0d7b6cb03a3af3f501fc95a14cdf32d1a4111cc5..0adeb62a99b89f4ab89e562da744d7a896ac07c0 100644 (file)
@@ -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 <iostream>
 #include <fstream>
-#include <zlib.h>
+#ifdef HAVE_ZLIB_H
+# include <zlib.h>
+#endif
 
 // For LyX
 #define GZSTREAM_NAMESPACE gz
index 3c23a96a9ec97336ce9426c6d52cf35e04521ff5..9e5009ae74e4c4f270b672b88dab64c4e0f0b357 100644 (file)
@@ -12,7 +12,9 @@
 
 #include "support/lyxlib.h"
 
-#include <sys/types.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #include <csignal>
 
 #ifdef _WIN32
index 2d95646db942588f3d72cc0f29c18559009a3ce5..d14ea24d7d24a3e34078fa440f66b9b3911d14c1 100644 (file)
@@ -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 <sys/types.h>
-#include <sys/stat.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 268984b7ab17fda7a22132a8220d6a2cf7dba571..4a068b42bb6aec8e9a576b1f1366f9fceef329da 100644 (file)
 
 #include "support/lyxlib.h"
 
-#include <sys/stat.h>
-#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index b960155261d6fedf0c06f90c569f019c00542f7e..6e24187797ea77df5dacd544311cdb19bad90186 100644 (file)
@@ -19,7 +19,9 @@ inline int readlink(const char *, char *, size_t) {return -1;}
 
 #else
 #include <ctype.h>
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
 #define readlink(s, t, l) (-1)
 #endif
 #include <process.h>
index dffc65e01eb1bf09b116103bcc92560be9dfdde5..df68682721f3b6bce938a03827407c7f850d8d33 100644 (file)
 #include <boost/utility.hpp>
 
 #include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #include <time.h>
-#ifndef _WIN32
+#ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
+#endif
+#ifndef _WIN32
 # include <sys/un.h>
 # include <sys/wait.h>
-# include <unistd.h>
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 #endif
 
 #include <algorithm>
index 975e44362396bfb7d4b331818681f13f5fd06bc8..18699223a6b1952f48e4b9857c3ce65b09e57c3b 100644 (file)
@@ -27,7 +27,9 @@
 
 #if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP)
 # include <fcntl.h>
-# include <sys/stat.h>
+# ifdef HAVE_SYS_STAT_H
+#  include <sys/stat.h>
+# endif
 #endif
 
 using boost::scoped_array;
index 78dd703cae078ddf862282fd09f837ce6690a6a9..bbda73b0f727996370a4e8a0ace823d8bceb14e9 100644 (file)
 # include <lmcons.h>
 #else
 # include <pwd.h>
-# include <unistd.h>
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
 #endif
-#include <sys/types.h>
 
 using std::string;