From: Angus Leeming Date: Mon, 10 Jun 2002 07:57:39 +0000 (+0000) Subject: Compaq cxx 6.5 will now compile lyx. X-Git-Tag: 1.6.10~19124 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9548351ef8ceaa1c779267e4eeccd3a0d83a0374;p=features.git Compaq cxx 6.5 will now compile lyx. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4349 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index e0a6b0157c..d527df5608 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -76,6 +76,14 @@ extern string current_layout; +#ifndef CXX_GLOBAL_CSTD +using std::tm; +using std::localtime; +using std::time; +using std::setlocale; +using std::strftime; +#endif + using std::vector; using std::find_if; using std::find; diff --git a/src/ChangeLog b/src/ChangeLog index ef7c28c92c..6d5baed575 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,40 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * BufferView_pimpl.C: + * DepTable.C: + * buffer.C: + * converter.C: + * encoding.C: + * lyx_gui.C: + * lyx_main.C: + * lyxtextclasslist.C: + * minibuffer.C: + * sp_spell.C: + * tabular_funcs.C: + * vc-backend.C: + all c-library variables have been moved into namespace std. Wrap + using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + + * lyxlength.C: + * tabular-old.C: + * tabular.C: + Add a using std::abs declaration. + + * kbmap.h (modifier_pair): + * paragraph.h (InsetTable, InsetList): + * lyxfont.h (FontBits): + type definition made public. + + * bufferlist.C (emergencyWriteAll): the compiler complains that + there is more than one possible lyx::class_fun template to choose from. + I re-named the void specialisation as lyx::void_class_fun. + + * lyxfont.C (FontBits' operator==, operator!=): taken out of class. + + * tabular_funcs.C: lstrings.h must come before tabular_funcs.h or + the compiler is is unable to find tostr in write_attribute. + 2002-06-06 Jean-Marc Lasgouttes * buffer.C (sgmlError): hide #warning diff --git a/src/DepTable.C b/src/DepTable.C index fecf867d8d..dd487fcd39 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -32,6 +32,10 @@ #include #include +#ifndef CXX_GLOBAL_CSTD +using std::time; +#endif + using std::make_pair; using std::ofstream; using std::ifstream; diff --git a/src/buffer.C b/src/buffer.C index 2ca003dd6d..95912feaea 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -110,6 +110,9 @@ #include #endif +#ifndef CXX_GLOBAL_CSTD +using std::pow; +#endif using std::ostream; using std::ofstream; diff --git a/src/bufferlist.C b/src/bufferlist.C index e93dddae89..fc642d8c1d 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -294,7 +294,7 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir) void BufferList::emergencyWriteAll() { for_each(bstore.begin(), bstore.end(), - lyx::class_fun(*this, &BufferList::emergencyWrite)); + lyx::void_class_fun(*this, &BufferList::emergencyWrite)); } diff --git a/src/converter.C b/src/converter.C index e2f662dce4..83a0541b60 100644 --- a/src/converter.C +++ b/src/converter.C @@ -34,6 +34,10 @@ #include "support/path.h" #include "support/systemcall.h" +#ifndef CXX_GLOBAL_CSTD +using std::isdigit; +#endif + using std::vector; using std::queue; using std::endl; diff --git a/src/encoding.C b/src/encoding.C index 9d12136428..697adab956 100644 --- a/src/encoding.C +++ b/src/encoding.C @@ -17,6 +17,10 @@ #include "encoding.h" #include "debug.h" +#ifndef CXX_GLOBAL_CSTD +using std::strtol; +#endif + using std::endl; Encodings encodings; diff --git a/src/frontends/Alert.C b/src/frontends/Alert.C index e351d116bc..d85ba7c22d 100644 --- a/src/frontends/Alert.C +++ b/src/frontends/Alert.C @@ -17,6 +17,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::strerror; +#endif + using std::endl; using std::pair; using std::make_pair; diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 71ef133500..e7a8356b32 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,11 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * Alert.C: all c-library variables have been moved into namespace std. + Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + + * Toolbar.h (Pimpl): type definition made public. + 2002-05-31 John Levon * Alert.h: better variable name diff --git a/src/frontends/Toolbar.h b/src/frontends/Toolbar.h index 0f15083bc0..3ef7dcb85a 100644 --- a/src/frontends/Toolbar.h +++ b/src/frontends/Toolbar.h @@ -62,8 +62,9 @@ public: /// Erase the layout list void clearLayoutList(); -private: + /// Compaq cxx 6.5 requires this to be public struct Pimpl; +private: /// friend struct Toolbar::Pimpl; /// diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index e79e219605..3c59b46845 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,11 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * ControlDialog.tmpl: I have had to prefix base class methods with + Base:: Wierd! + + * ControlInset.tmpl: #include a couple of headers. + 2002-05-29 Lars Gullik Bjønnes * switch from SigC signals to boost::signals diff --git a/src/frontends/controllers/ControlDialog.tmpl b/src/frontends/controllers/ControlDialog.tmpl index 50a90f371c..5e7390360a 100644 --- a/src/frontends/controllers/ControlDialog.tmpl +++ b/src/frontends/controllers/ControlDialog.tmpl @@ -13,7 +13,7 @@ #include "ControlDialog.h" #include "ButtonControllerBase.h" #include "ControlConnections.h" -#include "LyXView.h" +#include "frontends/LyXView.h" #include "BufferView.h" #include "ViewBase.h" #include "debug.h" @@ -27,49 +27,49 @@ ControlDialog::ControlDialog(LyXView & lv, Dialogs & d) template void ControlDialog::show() { - if (isBufferDependent() && !lv_.view()->available()) + if (Base::isBufferDependent() && !Base::lv_.view()->available()) return; - connect(); + Base::connect(); setParams(); - if (emergency_exit_) { + if (Base::emergency_exit_) { hide(); return; } if (!dialog_built_) { - view().build(); + Base::view().build(); dialog_built_ = true; } - bc().readOnly(isReadonly()); - view().show(); + Base::bc().readOnly(Base::isReadonly()); + Base::view().show(); } template void ControlDialog::update() { - if (isBufferDependent() && !lv_.view()->available()) + if (Base::isBufferDependent() && !Base::lv_.view()->available()) return; setParams(); - if (emergency_exit_) { + if (Base::emergency_exit_) { hide(); return; } - bc().readOnly(isReadonly()); - view().update(); + Base::bc().readOnly(Base::isReadonly()); + Base::view().update(); } template void ControlDialog::hide() { - emergency_exit_ = false; + Base::emergency_exit_ = false; clearParams(); - disconnect(); - view().hide(); + Base::disconnect(); + Base::view().hide(); } diff --git a/src/frontends/controllers/ControlInset.tmpl b/src/frontends/controllers/ControlInset.tmpl index ac7436848b..7b89da6ce1 100644 --- a/src/frontends/controllers/ControlInset.tmpl +++ b/src/frontends/controllers/ControlInset.tmpl @@ -11,10 +11,12 @@ */ #include "ControlInset.h" +#include "ViewBase.h" +#include "buffer.h" #include "debug.h" - +#include "frontends/LyXView.h" #include "support/LAssert.h" - +#include template ControlInset::ControlInset(LyXView & lv, Dialogs & d) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 4ff06fa11f..84d783a1e5 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,17 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * ColorHandler.C: + * DropDown.C: + * FormThesaurus.C: + all c-library variables have been moved into namespace std. + Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + + * XFormsView.C: add a using std::abs directive. + + * FormBase.h (FormCB::controller): I have had to prefix base class + methods with Base:: Wierd! + 2002-06-04 John Levon * xformsGImage.h: an xforms build fix diff --git a/src/frontends/xforms/Color.C b/src/frontends/xforms/Color.C index bbf9d57087..abf64c6375 100644 --- a/src/frontends/xforms/Color.C +++ b/src/frontends/xforms/Color.C @@ -17,6 +17,10 @@ #include // floor #include FORMS_H_LOCATION +#ifndef CXX_GLOBAL_CSTD +using std::floor; +#endif + using std::max; using std::min; diff --git a/src/frontends/xforms/ColorHandler.C b/src/frontends/xforms/ColorHandler.C index 8cc5b96448..1c3be28104 100644 --- a/src/frontends/xforms/ColorHandler.C +++ b/src/frontends/xforms/ColorHandler.C @@ -24,6 +24,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::pow; +#endif + using std::endl; diff --git a/src/frontends/xforms/DropDown.C b/src/frontends/xforms/DropDown.C index 975e5bf2b0..55af9d46bc 100644 --- a/src/frontends/xforms/DropDown.C +++ b/src/frontends/xforms/DropDown.C @@ -19,6 +19,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::isprint; +#endif + using std::vector; diff --git a/src/frontends/xforms/FormBase.h b/src/frontends/xforms/FormBase.h index 0c962eb811..a286d298d3 100644 --- a/src/frontends/xforms/FormBase.h +++ b/src/frontends/xforms/FormBase.h @@ -134,8 +134,8 @@ FormCB::FormCB(Controller & c, string const & t, template Controller & FormCB::controller() const { - return static_cast(controller_); - //return dynamic_cast(controller_); + return static_cast(ViewBase::controller_); + //return dynamic_cast(ViewBase::controller_); } diff --git a/src/frontends/xforms/FormThesaurus.C b/src/frontends/xforms/FormThesaurus.C index 1bc58581a4..a45f10c6ff 100644 --- a/src/frontends/xforms/FormThesaurus.C +++ b/src/frontends/xforms/FormThesaurus.C @@ -21,6 +21,10 @@ #include "form_thesaurus.h" #include "debug.h" +#ifndef CXX_GLOBAL_CSTD +using std::isupper; +using std::islower; +#endif using std::vector; diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C index 58a236fece..53733bb873 100644 --- a/src/frontends/xforms/XFormsView.C +++ b/src/frontends/xforms/XFormsView.C @@ -33,6 +33,7 @@ #include +using std::abs; using std::endl; //extern void AutoSave(BufferView *); diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index e89606e51b..ca43264b1c 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,12 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * GraphicsConverter.h: forward declare class ConvProcess. + + * GraphicsImageXPM.C: + all c-library variables have been moved into namespace std. + Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + 2002-06-06 Angus Leeming * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi! diff --git a/src/graphics/GraphicsConverter.h b/src/graphics/GraphicsConverter.h index 4cf5157386..3acd25998c 100644 --- a/src/graphics/GraphicsConverter.h +++ b/src/graphics/GraphicsConverter.h @@ -38,6 +38,8 @@ namespace grfx { +class ConvProcess; + class GConverter : boost::noncopyable { public: diff --git a/src/graphics/GraphicsImageXPM.C b/src/graphics/GraphicsImageXPM.C index 642c81c1de..4e2639f683 100644 --- a/src/graphics/GraphicsImageXPM.C +++ b/src/graphics/GraphicsImageXPM.C @@ -25,6 +25,14 @@ #include // cos, sin #include // malloc, free +#ifndef CXX_GLOBAL_CSTD +using std::cos; +using std::sin; +using std::malloc; +using std::strcpy; +using std::strlen; +#endif + namespace grfx { /// Access to this class is through this static method. diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 6da3ef3daf..b35fbbcf5d 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,10 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * insetexternal.C: + all c-library variables have been moved into namespace std. + Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + 2002-06-05 Jean-Marc Lasgouttes * insetinclude.C (uniqueID): diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index fdfe4a287b..c3607d4bba 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -36,6 +36,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::difftime; +#endif + using std::ostream; using std::endl; diff --git a/src/kbmap.h b/src/kbmap.h index cfad1f1c4b..390d63c205 100644 --- a/src/kbmap.h +++ b/src/kbmap.h @@ -61,9 +61,9 @@ public: /// return the ISO value of a keysym static char getiso(unsigned int i); -private: typedef std::pair modifier_pair; - + +private: /// struct kb_key { /// Keysym diff --git a/src/lyx_gui.C b/src/lyx_gui.C index 66bb8fbb25..052afa1d55 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -42,6 +42,10 @@ #include #include +#ifndef CXX_GLOBAL_CSTD +using std::exit; +#endif + using std::endl; extern LyXServer * lyxserver; diff --git a/src/lyx_main.C b/src/lyx_main.C index 4b3bbe4b9d..f60b69ee8f 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -51,7 +51,9 @@ using std::endl; #ifndef CXX_GLOBAL_CSTD +using std::exit; using std::signal; +using std::system; #endif extern void LoadLyXFile(string const &); diff --git a/src/lyxfont.C b/src/lyxfont.C index 447ce98731..c3067a8400 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -138,23 +138,18 @@ LyXFont::FontBits LyXFont::ignore = { IGNORE }; -bool LyXFont::FontBits::operator==(LyXFont::FontBits const & fb1) const -{ - return fb1.family == family && - fb1.series == series && - fb1.shape == shape && - fb1.size == size && - fb1.color == color && - fb1.emph == emph && - fb1.underbar == underbar && - fb1.noun == noun && - fb1.number == number; -} - - -bool LyXFont::FontBits::operator!=(LyXFont::FontBits const & fb1) const -{ - return !(fb1 == *this); +bool operator==(LyXFont::FontBits const & lhs, + LyXFont::FontBits const & rhs) +{ + return lhs.family == rhs.family && + lhs.series == rhs.series && + lhs.shape == rhs.shape && + lhs.size == rhs.size && + lhs.color == rhs.color && + lhs.emph == rhs.emph && + lhs.underbar == rhs.underbar && + lhs.noun == rhs.noun && + lhs.number == rhs.number; } diff --git a/src/lyxfont.h b/src/lyxfont.h index ad9d3f276c..3cb1edd795 100644 --- a/src/lyxfont.h +++ b/src/lyxfont.h @@ -326,13 +326,11 @@ public: /// Converts logical attributes to concrete shape attribute LyXFont::FONT_SHAPE realShape() const; -private: - /// + + /** Compaq cxx 6.5 requires that the definition be public so that + it can compile operator==() + */ struct FontBits { - /// - bool operator==(FontBits const & fb1) const; - /// - bool operator!=(FontBits const & fb1) const; /// FONT_FAMILY family; /// @@ -352,6 +350,7 @@ private: /// FONT_MISC_STATE number; }; +private: /// FontBits bits; @@ -435,6 +434,14 @@ bool LyXFont::isSymbolFont() const /// std::ostream & operator<<(std::ostream &, LyXFont::FONT_MISC_STATE); +bool operator==(LyXFont::FontBits const & lhs, LyXFont::FontBits const & rhs); + +inline +bool operator!=(LyXFont::FontBits const & lhs, LyXFont::FontBits const & rhs) +{ + return !(lhs == rhs); +} + /// inline bool operator==(LyXFont const & font1, LyXFont const & font2) @@ -449,4 +456,6 @@ bool operator!=(LyXFont const & font1, LyXFont const & font2) { return !(font1 == font2); } + + #endif diff --git a/src/lyxlength.C b/src/lyxlength.C index 30b54e0b8d..2a0b2fa0b5 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -24,6 +24,7 @@ #include +using std::abs; LyXLength::LyXLength() : val_(0), unit_(LyXLength::PT) diff --git a/src/lyxtextclasslist.C b/src/lyxtextclasslist.C index ea21f14b0e..66b9e16284 100644 --- a/src/lyxtextclasslist.C +++ b/src/lyxtextclasslist.C @@ -29,6 +29,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::exit; +#endif + using lyx::textclass_type; using std::pair; using std::make_pair; diff --git a/src/minibuffer.C b/src/minibuffer.C index 6fbf87ad3b..d401787449 100644 --- a/src/minibuffer.C +++ b/src/minibuffer.C @@ -37,6 +37,10 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::isprint; +#endif + using std::vector; using std::back_inserter; using std::find; diff --git a/src/paragraph.h b/src/paragraph.h index cfe648b4c3..3d1193eb5c 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -342,6 +342,10 @@ public: private: /// string layout_; +public: + /** Both these definitions must be made public to keep Compaq cxx 6.5 + * happy. + */ /// struct InsetTable { /// @@ -354,6 +358,7 @@ private: /// typedef std::vector InsetList; +private: /// InsetList insetlist; public: diff --git a/src/sp_spell.C b/src/sp_spell.C index a47903f650..9a41e26f93 100644 --- a/src/sp_spell.C +++ b/src/sp_spell.C @@ -53,6 +53,14 @@ #include "encoding.h" #include "sp_ispell.h" +#ifndef CXX_GLOBAL_CSTD +using std::fdopen; +using std::strcpy; +using std::strlen; +using std::strpbrk; +using std::strstr; +#endif + using std::endl; namespace { diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 58fc224a97..319456ff68 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,25 @@ +2002-06-07 Angus Leeming + + Fixes needed to compile with Compaq cxx 6.5. + * lyxfunctional.h: rename lyx::class_fun(C & c, void(C::*f)(A)) as + lyx::void_class_fun to avoid compiler problems with Compaq cxx 6.5: + more than one instance of overloaded function "lyx::class_fun" matches + the argument list. + + * filetools.C: + * kill.C: + * lstrings.C: + * putenv.C: + * snprintf.h: + * systemcall.C: + * utility.h: + all c-library variables have been moved into namespace std. + Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block. + + * kill.C: rename signal.h as csignal. + + * putenv.C: rename stdlib.h as cstdlib + 2002-06-05 Jean-Marc Lasgouttes * lxtl.h: remove unused file diff --git a/src/support/filetools.C b/src/support/filetools.C index 2992c5ab5b..0cc8eb1123 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -16,21 +16,10 @@ #include -#include - -#include -#include - -#include "Lsstream.h" - #ifdef __GNUG__ #pragma implementation "filetools.h" #endif -#include -#include -#include -#include #include "debug.h" #include "support/lstrings.h" #include "support/systemcall.h" @@ -43,6 +32,18 @@ #include "lyxlib.h" #include "os.h" +#include "Lsstream.h" + +#include +#include +#include +#include +#include + +#include +#include + + // Which part of this is still necessary? (JMarc). #if HAVE_DIRENT_H # include @@ -61,6 +62,14 @@ # endif #endif +#ifndef CXX_GLOBAL_CSTD +using std::fgetc; +using std::isalpha; +using std::isalnum; +using std::pclose; +using std::popen; +#endif + using std::make_pair; using std::pair; using std::endl; diff --git a/src/support/kill.C b/src/support/kill.C index d121843cb4..a349891763 100644 --- a/src/support/kill.C +++ b/src/support/kill.C @@ -1,10 +1,14 @@ #include #include -#include +#include #include "lyxlib.h" +#ifndef CXX_GLOBAL_CSTD +using std::kill; +#endif + int lyx::kill(int pid, int sig) { return ::kill(pid, sig); diff --git a/src/support/lstrings.C b/src/support/lstrings.C index 7614f5a4bb..bcbfb48917 100644 --- a/src/support/lstrings.C +++ b/src/support/lstrings.C @@ -31,9 +31,11 @@ using std::transform; using std::vector; #ifndef CXX_GLOBAL_CSTD +using std::atof; +using std::isdigit; +using std::strlen; using std::tolower; using std::toupper; -using std::strlen; #endif diff --git a/src/support/lyxfunctional.h b/src/support/lyxfunctional.h index af2107413d..2e52337a26 100644 --- a/src/support/lyxfunctional.h +++ b/src/support/lyxfunctional.h @@ -60,7 +60,7 @@ class_fun(C & c, R(C::*f)(A)) template void_class_fun_t -class_fun(C & c, void(C::*f)(A)) +void_class_fun(C & c, void(C::*f)(A)) { return void_class_fun_t(c, f); } diff --git a/src/support/putenv.C b/src/support/putenv.C index a54c0dff3b..8fe84032b0 100644 --- a/src/support/putenv.C +++ b/src/support/putenv.C @@ -1,6 +1,10 @@ #include -#include +#include + +#ifndef CXX_GLOBAL_CSTD +using std::putenv; +#endif #include "lyxlib.h" int lyx::putenv(char const * str) diff --git a/src/support/snprintf.h b/src/support/snprintf.h index aaad68ae4d..092355169c 100644 --- a/src/support/snprintf.h +++ b/src/support/snprintf.h @@ -8,6 +8,11 @@ extern "C" { #endif +#ifndef CXX_GLOBAL_CSTD +using std::size_t; +using std::va_list; +#endif + #if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF) #include #endif diff --git a/src/support/systemcall.C b/src/support/systemcall.C index 600dbdb016..b7040fcba3 100644 --- a/src/support/systemcall.C +++ b/src/support/systemcall.C @@ -20,6 +20,9 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::system; +#endif // Reuse of instance int Systemcall::startscript(Starttype how, string const & what) diff --git a/src/support/utility.h b/src/support/utility.h index 99d94dcc2a..49d8179121 100644 --- a/src/support/utility.h +++ b/src/support/utility.h @@ -30,6 +30,10 @@ //#include // for size_t //#include // for std::pair +#ifndef CXX_GLOBAL_CSTD +using std::free; +#endif + namespace lyx { // checked_delete() and checked_array_delete() -----------------------------// @@ -41,7 +45,7 @@ namespace lyx { BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point // of instantiation - free(x); + ::free(x); } } // namespace boost diff --git a/src/tabular-old.C b/src/tabular-old.C index 1f7d9f576d..796f47b650 100644 --- a/src/tabular-old.C +++ b/src/tabular-old.C @@ -19,6 +19,7 @@ #include "support/lstrings.h" #include "support/textutils.h" +using std::abs; using std::istream; using std::getline; using std::endl; diff --git a/src/tabular.C b/src/tabular.C index 3ba8ca8bf0..f8631459c2 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -40,6 +40,7 @@ #include #include +using std::abs; using std::ostream; using std::istream; using std::getline; diff --git a/src/tabular_funcs.C b/src/tabular_funcs.C index dd1a2a01c5..aa6b634dd3 100644 --- a/src/tabular_funcs.C +++ b/src/tabular_funcs.C @@ -18,9 +18,12 @@ #include "tabular_funcs.h" -#include "support/lstrings.h" #include "support/LIstream.h" +#ifndef CXX_GLOBAL_CSTD +using std::strlen; +#endif + using std::istream; using std::getline; diff --git a/src/tabular_funcs.h b/src/tabular_funcs.h index 5db625f438..5760d2261d 100644 --- a/src/tabular_funcs.h +++ b/src/tabular_funcs.h @@ -20,6 +20,7 @@ #include "LString.h" #include "tabular.h" +#include "support/lstrings.h" // for tostr #include diff --git a/src/vc-backend.C b/src/vc-backend.C index 1b19afde23..671afdd36c 100644 --- a/src/vc-backend.C +++ b/src/vc-backend.C @@ -21,6 +21,11 @@ #include +#ifndef CXX_GLOBAL_CSTD +using std::asctime; +using std::gmtime; +#endif + using std::endl; using std::ifstream; using std::getline;