From f3024416adca5f22008f7b20b219b58103a3125f Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 20 Jan 2005 15:38:14 +0000 Subject: [PATCH] Guard HAVE_UNISTD_H. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9512 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/client/ChangeLog | 4 ++++ src/client/client.C | 2 +- src/client/pch.h | 4 +++- src/frontends/ChangeLog | 4 ++++ src/frontends/LyXView.C | 2 +- src/frontends/gnome/ChangeLog | 4 ++++ src/frontends/gnome/support.c | 4 +++- src/frontends/pch.h | 4 +++- src/support/ChangeLog | 6 ++++++ src/support/FileInfo.h | 4 +++- src/support/chdir.C | 4 +++- src/support/forkedcall.C | 4 +++- src/support/forkedcontr.C | 4 +++- src/support/getcwd.C | 4 +++- src/support/lyxsum.C | 2 +- src/support/mkdir.C | 4 +++- src/support/os2_defines.h | 4 +++- src/support/pch.h | 4 +++- src/support/rmdir.C | 4 +++- src/support/socktools.C | 2 +- src/support/tempname.C | 2 +- src/support/unlink.C | 4 +++- src/support/userinfo.C | 2 +- 23 files changed, 63 insertions(+), 19 deletions(-) diff --git a/src/client/ChangeLog b/src/client/ChangeLog index f41cbd4053..4e105820c4 100644 --- a/src/client/ChangeLog +++ b/src/client/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Asger Ottar Alstrup + + * pch.h: use the HAVE_UNISTD_H preprocessor guard. + 2005-01-19 Asger Ottar Alstrup * client.C: use the HAVE_UNISTD_H preprocessor guard. diff --git a/src/client/client.C b/src/client/client.C index adf9b41e87..0c8285c409 100644 --- a/src/client/client.C +++ b/src/client/client.C @@ -22,7 +22,7 @@ // getpid(), getppid() #include #ifdef HAVE_UNISTD_H -#include +# include #endif // select() diff --git a/src/client/pch.h b/src/client/pch.h index 2634b6610c..4148c061df 100644 --- a/src/client/pch.h +++ b/src/client/pch.h @@ -8,7 +8,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 128e54265e..4cf41a6902 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Asger Ottar Alstrup + + * pch.h: use the HAVE_UNISTD_H preprocessor guard. + 2005-01-19 Asger Ottar Alstrup * LyXView.C: use the HAVE_UNISTD_H preprocessor guard. diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index e0d5a70a04..848d0330af 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -41,7 +41,7 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif using lyx::support::MakeDisplayPath; diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index 6422099642..9480dfa4e2 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Asger Ottar Alstrup + + * support.c: use the HAVE_UNISTD_H preprocessor guard. + 2005-01-10 Angus Leeming * lyx_gui.C: use support/package.h to provide the paths to the diff --git a/src/frontends/gnome/support.c b/src/frontends/gnome/support.c index c76f33308d..f547fdd354 100644 --- a/src/frontends/gnome/support.c +++ b/src/frontends/gnome/support.c @@ -8,7 +8,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/frontends/pch.h b/src/frontends/pch.h index 2a173f2b34..87fc4f9326 100644 --- a/src/frontends/pch.h +++ b/src/frontends/pch.h @@ -8,7 +8,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/support/ChangeLog b/src/support/ChangeLog index b410f0eb73..5913240d41 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,9 @@ +2005-01-20 Asger Ottar Alstrup + + * FileInfo.h, chdir.C, forkedcall.C, forkedcontr.C, getcwd.C, + mkdir.C, os_defines.h, pch.h, rmdir.C, unlink.C: + use the HAVE_UNISTD_H preprocessor guard. + 2005-01-20 Angus Leeming * filetools.[Ch] (LibScriptSearch): modify the code that replaces diff --git a/src/support/FileInfo.h b/src/support/FileInfo.h index 70b26513d2..8684f351d4 100644 --- a/src/support/FileInfo.h +++ b/src/support/FileInfo.h @@ -16,7 +16,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/support/chdir.C b/src/support/chdir.C index a3065fb26a..d9776e9c6e 100644 --- a/src/support/chdir.C +++ b/src/support/chdir.C @@ -12,7 +12,9 @@ #include "support/lyxlib.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif int lyx::support::chdir(std::string const & name) { diff --git a/src/support/forkedcall.C b/src/support/forkedcall.C index 10431ffb7e..8e4736fb3f 100644 --- a/src/support/forkedcall.C +++ b/src/support/forkedcall.C @@ -42,7 +42,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include diff --git a/src/support/forkedcontr.C b/src/support/forkedcontr.C index 77b3f615d6..a869bdc909 100644 --- a/src/support/forkedcontr.C +++ b/src/support/forkedcontr.C @@ -23,7 +23,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include using boost::bind; diff --git a/src/support/getcwd.C b/src/support/getcwd.C index 2514c15af1..47d67fa274 100644 --- a/src/support/getcwd.C +++ b/src/support/getcwd.C @@ -15,7 +15,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif using boost::scoped_array; diff --git a/src/support/lyxsum.C b/src/support/lyxsum.C index 046188b8ca..2d95646db9 100644 --- a/src/support/lyxsum.C +++ b/src/support/lyxsum.C @@ -43,7 +43,7 @@ template struct boost::detail::crc_table_t<32, 0x04C11DB7, true>; #include #include #ifdef HAVE_UNISTD_H -#include +# include #endif #include diff --git a/src/support/mkdir.C b/src/support/mkdir.C index cab93d0bad..c590880c30 100644 --- a/src/support/mkdir.C +++ b/src/support/mkdir.C @@ -15,7 +15,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif int lyx::support::mkdir(std::string const & pathname, unsigned long int mode) { diff --git a/src/support/os2_defines.h b/src/support/os2_defines.h index 70526093d5..b960155261 100644 --- a/src/support/os2_defines.h +++ b/src/support/os2_defines.h @@ -23,7 +23,9 @@ inline int readlink(const char *, char *, size_t) {return -1;} #define readlink(s, t, l) (-1) #endif #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include /* #include */ #define lstat stat diff --git a/src/support/pch.h b/src/support/pch.h index 731f43c87c..686c524382 100644 --- a/src/support/pch.h +++ b/src/support/pch.h @@ -21,7 +21,9 @@ #include #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/support/rmdir.C b/src/support/rmdir.C index b8eb223ab4..ffa86f1199 100644 --- a/src/support/rmdir.C +++ b/src/support/rmdir.C @@ -12,7 +12,9 @@ #include "support/lyxlib.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif int lyx::support::rmdir(std::string const & dir) { diff --git a/src/support/socktools.C b/src/support/socktools.C index 1142cb69bc..23a0b5d011 100644 --- a/src/support/socktools.C +++ b/src/support/socktools.C @@ -19,7 +19,7 @@ #include #include #ifdef HAVE_UNISTD_H -#include +# include #endif #include diff --git a/src/support/tempname.C b/src/support/tempname.C index e92639e358..975e443623 100644 --- a/src/support/tempname.C +++ b/src/support/tempname.C @@ -22,7 +22,7 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif #if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP) diff --git a/src/support/unlink.C b/src/support/unlink.C index 5ddcc9a983..648bcca563 100644 --- a/src/support/unlink.C +++ b/src/support/unlink.C @@ -12,7 +12,9 @@ #include "support/lyxlib.h" -#include +#ifdef HAVE_UNISTD_H +# include +#endif int lyx::support::unlink(std::string const & pathname) { diff --git a/src/support/userinfo.C b/src/support/userinfo.C index b45797287f..e10cd6a17d 100644 --- a/src/support/userinfo.C +++ b/src/support/userinfo.C @@ -17,7 +17,7 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif #include -- 2.39.5