From bb350c0cba7051bf9cd8e998c3ec70805d3496b4 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 19 Jan 2005 15:26:41 +0000 Subject: [PATCH] Use HAVE_UNISTD_H. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9503 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 6 ++++++ src/buffer.C | 2 +- src/client/ChangeLog | 4 ++++ src/client/client.C | 2 ++ src/frontends/ChangeLog | 3 +++ src/frontends/LyXView.C | 2 ++ src/lyxserver.h | 8 ++++---- src/support/ChangeLog | 5 +++++ src/support/lyxsum.C | 2 ++ src/support/socktools.C | 2 ++ src/support/tempname.C | 2 ++ src/support/userinfo.C | 2 ++ 12 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d51bef56b7..0dc5809ceb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-01-19 Asger Ottar Alstrup + + * buffer.C (readHeader): use "&&" rather than "and". + + * lyxserver.h (inPipeName, outPipeName): make these const. + 2005-01-19 Angus Leeming * lyx_main.C (error_handler, init): protect SIGHUP with diff --git a/src/buffer.C b/src/buffer.C index 1118531a99..4a7de29cb7 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -417,7 +417,7 @@ int Buffer::readHeader(LyXLex & lex) string unknown = params().readToken(lex, token); if (!unknown.empty()) { - if (unknown[0] != '\\' and token == "\\textclass") { + if (unknown[0] != '\\' && token == "\\textclass") { unknownClass(unknown); } else { ++unknown_tokens; diff --git a/src/client/ChangeLog b/src/client/ChangeLog index 8417fe70cf..f41cbd4053 100644 --- a/src/client/ChangeLog +++ b/src/client/ChangeLog @@ -1,3 +1,7 @@ +2005-01-19 Asger Ottar Alstrup + + * client.C: use the HAVE_UNISTD_H preprocessor guard. + 2005-01-10 Angus Leeming * messages.C: use support/package.h to provide the paths to the diff --git a/src/client/client.C b/src/client/client.C index 8339c1fe59..adf9b41e87 100644 --- a/src/client/client.C +++ b/src/client/client.C @@ -21,7 +21,9 @@ // getpid(), getppid() #include +#ifdef HAVE_UNISTD_H #include +#endif // select() #include diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index f6941bdc93..128e54265e 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,6 @@ +2005-01-19 Asger Ottar Alstrup + + * LyXView.C: use the HAVE_UNISTD_H preprocessor guard. 2005-01-10 André Pönitz diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index a8d33b65f7..e0d5a70a04 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -40,7 +40,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif using lyx::support::MakeDisplayPath; using lyx::support::OnlyFilename; diff --git a/src/lyxserver.h b/src/lyxserver.h index eb36be2494..af08be2b5c 100644 --- a/src/lyxserver.h +++ b/src/lyxserver.h @@ -58,13 +58,13 @@ public: private: /// the filename of the in pipe - std::string const inPipeName() { - return pipename + ".in"; + std::string const inPipeName() const { + return pipename + std::string(".in"); } /// the filename of the out pipe - std::string const outPipeName() { - return pipename + ".out"; + std::string const outPipeName() const { + return pipename + std::string(".out"); } /// Open pipes diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 9cfea8e07a..8b544f7d07 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Asger Ottar Alstrup + + * lyxsum.C, socktools.C, tempname.C, userinfo.C: use the + HAVE_UNISTD_H preprocessor guard. + 2005-01-17 Angus Leeming * os_win32.C (init): Add Ruurd's original code to close the diff --git a/src/support/lyxsum.C b/src/support/lyxsum.C index d34b2215f3..046188b8ca 100644 --- a/src/support/lyxsum.C +++ b/src/support/lyxsum.C @@ -42,7 +42,9 @@ template struct boost::detail::crc_table_t<32, 0x04C11DB7, true>; #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include diff --git a/src/support/socktools.C b/src/support/socktools.C index 4b4edd60f4..1142cb69bc 100644 --- a/src/support/socktools.C +++ b/src/support/socktools.C @@ -18,7 +18,9 @@ #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include diff --git a/src/support/tempname.C b/src/support/tempname.C index 9e78525b82..e92639e358 100644 --- a/src/support/tempname.C +++ b/src/support/tempname.C @@ -21,7 +21,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP) # include diff --git a/src/support/userinfo.C b/src/support/userinfo.C index 0225f5d29d..b45797287f 100644 --- a/src/support/userinfo.C +++ b/src/support/userinfo.C @@ -16,7 +16,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include using std::string; -- 2.39.2