]> git.lyx.org Git - features.git/commitdiff
compilation fixes for compaq cxx + small things
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 1 Jun 2001 10:53:24 +0000 (10:53 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 1 Jun 2001 10:53:24 +0000 (10:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2079 a592a061-630c-0410-9148-cb99ea01b6c8

23 files changed:
po/POTFILES.in
src/ChangeLog
src/FontInfo.C
src/LString.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/MathsSymbols.C
src/insets/ChangeLog
src/insets/figinset.C
src/lyx_main.C
src/lyxfont.C
src/lyxlex_pimpl.C
src/mathed/ChangeLog
src/mathed/array.C
src/mathed/formula.C
src/support/ChangeLog
src/support/LSubstring.C
src/support/lstrings.C
src/support/lstrings.h
src/support/syscall.C
src/support/syscontr.C
src/tabular-old.C
src/tabular.C

index 04b1702eba515a409336ddf63aeb0bf7a4422ead..ce1833e6897dd2097212e269e4d2a61cbbd608cd 100644 (file)
@@ -10,8 +10,8 @@ src/CutAndPaste.C
 src/debug.C
 src/exporter.C
 src/ext_l10n.h
-src/figure_form.C
 src/figureForm.C
+src/figure_form.C
 src/FontLoader.C
 src/frontends/controllers/ButtonController.h
 src/frontends/controllers/character.C
@@ -90,67 +90,67 @@ src/frontends/qt2/paragraphdlgimpl.C
 src/frontends/qt2/tabularcreatedlgimpl.C
 src/frontends/xforms/combox.C
 src/frontends/xforms/FileDialog.C
-src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibitem.C
-src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/form_bibtex.C
 src/frontends/xforms/form_browser.C
-src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCharacter.C
-src/frontends/xforms/form_citation.C
+src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
 src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_credits.C
+src/frontends/xforms/form_copyright.C
 src/frontends/xforms/FormCredits.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_credits.C
 src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
 src/frontends/xforms/FormError.C
-src/frontends/xforms/form_external.C
+src/frontends/xforms/form_error.C
 src/frontends/xforms/FormExternal.C
-src/frontends/xforms/form_filedialog.C
+src/frontends/xforms/form_external.C
 src/frontends/xforms/FormFiledialog.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_filedialog.C
 src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_include.C
+src/frontends/xforms/form_graphics.C
 src/frontends/xforms/FormInclude.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_include.C
 src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
 src/frontends/xforms/FormLog.C
 src/frontends/xforms/FormMathsBitmap.C
-src/frontends/xforms/form_maths_deco.C
 src/frontends/xforms/FormMathsDeco.C
-src/frontends/xforms/form_maths_delim.C
+src/frontends/xforms/form_maths_deco.C
 src/frontends/xforms/FormMathsDelim.C
-src/frontends/xforms/form_maths_matrix.C
+src/frontends/xforms/form_maths_delim.C
 src/frontends/xforms/FormMathsMatrix.C
-src/frontends/xforms/form_maths_panel.C
+src/frontends/xforms/form_maths_matrix.C
 src/frontends/xforms/FormMathsPanel.C
-src/frontends/xforms/form_maths_space.C
+src/frontends/xforms/form_maths_panel.C
 src/frontends/xforms/FormMathsSpace.C
-src/frontends/xforms/form_minipage.C
+src/frontends/xforms/form_maths_space.C
 src/frontends/xforms/FormMinipage.C
-src/frontends/xforms/form_paragraph.C
+src/frontends/xforms/form_minipage.C
 src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preamble.C
+src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormPreamble.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_preamble.C
 src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
 src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
 src/frontends/xforms/FormRef.C
-src/frontends/xforms/form_search.C
+src/frontends/xforms/form_ref.C
 src/frontends/xforms/FormSearch.C
-src/frontends/xforms/form_tabular.C
+src/frontends/xforms/form_search.C
 src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
 src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
 src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
 src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
 src/frontends/xforms/FormVCLog.C
 src/frontends/xforms/input_validators.C
 src/frontends/xforms/Menubar_pimpl.C
index d883230f2da64f8cdedbd4e438689367eefa7aa3..69ac99155539b714b836220b53fa200cb0848227 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * lyxfont.C: 
+       * tabular.C:
+       * tabular-old.C: 
+       * FontInfo.C: bring C functions into global namespace when
+       necessary
+
+2001-05-30  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * LString.h: make sure config.h has been loaded before LString.h.
+
+       * lyxlex_pimpl.C (EatLine): comment out annoying debug messages
+       (one for each char read by EatLine!).
+
+       * lyx_main.C (init): constify lyxdir. Lowercase the name of some
+       variables. 
+
 2001-06-01  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * paragraph.C (BreakParagraph): set the inset_owner in the new par
index 9f55fa5f0501751a167fd595535370c748d205de..38579ce2eadd0bdd0c046ac6ce98e30276f831dc 100644 (file)
 
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::fabs;
+#endif
+
 /// Load font close to this size
 string const FontInfo::getFontname(int size)
 {
@@ -41,8 +45,8 @@ string const FontInfo::getFontname(int size)
                        lyxerr[Debug::FONT] << "Exact font match with\n"
                                            << strings[i] << endl;
                        return strings[i];
-               } else if (std::fabs(sizes[i] - size - 0.1) < error) {
-                       error = std::fabs(sizes[i] - size - 0.1);
+               } else if (fabs(sizes[i] - size - 0.1) < error) {
+                       error = fabs(sizes[i] - size - 0.1);
                        closestind = i;
                }
        }
index daffa1e0fedd1669834a5559578fb24a93f79ecd..cc9df47947332242c7603f6af14be18f4fb9598e 100644 (file)
 #ifndef LSTRING_H
 #define LSTRING_H 
 
+#ifndef _CONFIG_H
+#error The <config.h> header should always be included before LString.h
+#endif
+
 #ifndef USE_INCLUDED_STRING
 #include <string>
 using std::string;
index ee75a80f55c3cacf59a51c7de214d0a7ce13cc3a..569e573cd9c45faf1c2aa094d066f71a6f2f1318 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * MathsSymbols.C: 
+       * FormMathsMatrix.C: bring C functions into global namespace if
+       necessary. 
+
 2001-05-31  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * MathsSymbols.C (pixmapFromBitmapData): add std::
index 0a957c56a1f62b4c45669be51de84f1b9fe825da..8f68e8393ee68fc0e6465083ff7221e7f9a93879 100644 (file)
 #include "lyxfunc.h"
 #include "support/LAssert.h"
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
 static char h_align_str[80] = "c";
 static char v_align_c[] = "tcb";
 
@@ -106,7 +111,7 @@ bool FormMathsMatrix::input(FL_OBJECT * ob, long)
 int FormMathsMatrix::AlignFilter(char const * cur, int c)
 {
        int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) -
-               int(std::strlen(cur));
+               int(strlen(cur));
        if (n < 0)
                return FL_INVALID;
 
index ec5f6929108a30bf1396dca29ec27f532011f40d..164d1fccb38a37af1d5a9dde111a7a29f567c96a 100644 (file)
@@ -26,6 +26,11 @@ using std::max;
 using std::endl;
 using std::ostream;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strstr;
+#endif
+
+
 /* Latex code for those bitmaps */
 
 #include "greek.xbm"
@@ -268,7 +273,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
                XpmCreateDataFromImage(fl_get_display(), const_cast<char***>(&data), sbima, sbima, 0);
 
                // Dirty hack to get blue symbols quickly
-               char * sx = const_cast<char*>(std::strstr(data[2], "FFFFFFFF"));
+               char * sx = const_cast<char*>(strstr(data[2], "FFFFFFFF"));
                if (sx) {
                        for (int k = 0; k < 8; ++k) sx[k] = '0';
                }
index be4ae284156d1f80da6b5d7750f5da4c930707bd..92977ef2f28b778b7bf993a579e20a07e601b254 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-31  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * figinset.C: add using std:: directive for the C functions which
+       need that.
+
 2001-05-31  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * insetfloat.C (Write): write out wide info
index 64f1e288cb0aa62859271b5beb87b0260c009e7e..f1a1e7212ad484cf19ccdc8ec2d30fb8b5e4bbef 100644 (file)
@@ -80,6 +80,15 @@ using std::copy;
 using std::pair;
 using std::make_pair;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::memcopy;
+using std::sin;
+using std::cos;
+using std::fabs;
+#endif
+
+
+
 extern BufferView * current_view;
 extern FL_OBJECT * figinset_canvas;
 
@@ -632,8 +641,8 @@ void runqueue()
                        env[0] = new char[tmp.size() + 1];
                        std::copy(tmp.begin(), tmp.end(), env[0]);
                        env[0][tmp.size()] = '\0';
-                       std::memcpy(&env[1], environ,
-                                   sizeof(char*) * (ne + 1));
+                       memcpy(&env[1], environ,
+                              sizeof(char*) * (ne + 1));
                        environ = env;
 
                        // now make gs command
@@ -1437,10 +1446,10 @@ void InsetFig::Recompute()
 
        if (changed) GetPSSizes();
 
-       float sin_a = std::sin (angle / DEG2PI);  /* rotation; H. Zeller 021296 */
-       float cos_a = std::cos (angle / DEG2PI);
-       int frame_wid = int(ceil(std::fabs(cos_a * pswid) + std::fabs(sin_a * pshgh)));
-       int frame_hgh= int(ceil(std::fabs(cos_a * pshgh) + std::fabs(sin_a * pswid)));
+       float sin_a = sin(angle / DEG2PI);  /* rotation; H. Zeller 021296 */
+       float cos_a = cos(angle / DEG2PI);
+       int frame_wid = int(ceil(fabs(cos_a * pswid) + fabs(sin_a * pshgh)));
+       int frame_hgh= int(ceil(fabs(cos_a * pshgh) + fabs(sin_a * pswid)));
 
        string lfname = fname;
        if (GetExtension(fname).empty())
index 8954a03ce4433632d1f9732399bd83151ccc51b0..2a8c8456657d347bb523f92531cb82144cb70a50 100644 (file)
@@ -235,7 +235,7 @@ void LyX::init(bool gui)
                searchpath= MakeAbsPath(system_lyxdir) + ';';
 
        // LYX_DIR_11x environment variable
-       string lyxdir = GetEnvPath("LYX_DIR_11x");
+       string const lyxdir = GetEnvPath("LYX_DIR_11x");
        
        if (!lyxdir.empty()) {
                lyxerr[Debug::INIT] << "LYX_DIR_11x: " << lyxdir << endl;
@@ -256,7 +256,7 @@ void LyX::init(bool gui)
                build_lyxdir.erase();
        }
 
-        bool FollowLink;
+        bool followlink;
        do {
          // Path of binary/../share/name of binary/
                searchpath += NormalizePath(AddPath(binpath, "../share/") + 
@@ -264,18 +264,18 @@ void LyX::init(bool gui)
 
          // Follow Symlinks
                FileInfo file(fullbinpath, true);
-               FollowLink = file.isLink();
-               if (FollowLink) {
-                       string Link;
-                       if (LyXReadLink(fullbinpath, Link)) {
-                               fullbinpath = Link;
+               followlink = file.isLink();
+               if (followlink) {
+                       string link;
+                       if (LyXReadLink(fullbinpath, link)) {
+                               fullbinpath = link;
                                binpath = MakeAbsPath(OnlyPath(fullbinpath));
                        }
                        else {
-                               FollowLink = false;
+                               followlink = false;
                        }
                }
-       } while (FollowLink);
+       } while (followlink);
 
        // Hardcoded dir
        searchpath += LYX_DIR;
index 8aae34aac23a3c5168ffcf9df1570bb8276c6099..c481050584c1a0131b1fb87af4cf8ae0f6f071e3 100644 (file)
 using std::ostream;
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
 //
 // Names for the GUI
 //
@@ -841,21 +846,21 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
                os << '\\'
                   << LaTeXFamilyNames[f.family()]
                   << '{';
-               count += std::strlen(LaTeXFamilyNames[f.family()]) + 2;
+               count += strlen(LaTeXFamilyNames[f.family()]) + 2;
                env = true; //We have opened a new environment
        }
        if (f.series() != INHERIT_SERIES) {
                os << '\\'
                   << LaTeXSeriesNames[f.series()]
                   << '{';
-               count += std::strlen(LaTeXSeriesNames[f.series()]) + 2;
+               count += strlen(LaTeXSeriesNames[f.series()]) + 2;
                env = true; //We have opened a new environment
        }
        if (f.shape() != INHERIT_SHAPE) {
                os << '\\'
                   << LaTeXShapeNames[f.shape()]
                   << '{';
-               count += std::strlen(LaTeXShapeNames[f.shape()]) + 2;
+               count += strlen(LaTeXShapeNames[f.shape()]) + 2;
                env = true; //We have opened a new environment
        }
        if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
@@ -890,7 +895,7 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
                os << '\\'
                   << LaTeXSizeNames[f.size()]
                   << ' ';
-               count += std::strlen(LaTeXSizeNames[f.size()]) + 2;
+               count += strlen(LaTeXSizeNames[f.size()]) + 2;
        }
        return count;
 }
index 173d542ceebec217572749e68a97ef8a70274664..84412bf08c9b3777549538edef4f3541f8f112a6 100644 (file)
@@ -397,8 +397,8 @@ bool LyXLex::Pimpl::EatLine()
        while(is && c != '\n' && i != (LEX_MAX_BUFF - 1)) {
                is.get(cc);
                c = cc;
-               lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
-                                     << c << "'" << endl;
+               //lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
+               //                    << c << "'" << endl;
                if (c != '\r')
                        buff[i++] = c;
        }
index b99f004de118cabbd8bd21efe2810049c34b6e5b..89e9b20ac33c944473cf5c7755c95381e19284a1 100644 (file)
@@ -1,3 +1,7 @@
+2001-05-31  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * array.C: bring memmove into main namespace if necessary
+
 2001-05-31  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * math_parser.C (yylex): use contains instead of strchr
index 40ec0bcc8f6e681d7ab14106fee8c6ef96002275..85f1e88b80fb07e001be04c3c233c6be8f709861 100644 (file)
 using std::ostream;
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::memmove;
+#endif
+
+
 namespace {
 
 inline
@@ -227,7 +232,7 @@ void MathedArray::move(int p, int shift)
 {
        if (p <= last_) {
                need_size(last_ + shift);
-               std::memmove(&bf_[p + shift], &bf_[p], last_ - p);
+               memmove(&bf_[p + shift], &bf_[p], last_ - p);
                last_ += shift;
                bf_[last_] = 0;
        }
index e594b487ce628da95b56a869f56a31c1310addcb..696af6d90223848a2c0e27a28f4a9c05863c59e5 100644 (file)
@@ -57,6 +57,11 @@ using std::endl;
 using std::vector;
 using std::max;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
 extern string mathed_label;
 
 extern char const * latex_special_chars;
@@ -982,7 +987,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
 
                if (mathcursor) {
                        MathMatrixInset * p = new MathMatrixInset(m, n);
-                       if (k > 2 && int(std::strlen(s)) > m)
+                       if (k > 2 && int(strlen(s)) > m)
                                p->SetAlign(s[0], &s[1]);
                        mathcursor->insertInset(p, LM_TC_ACTIVE_INSET);
                        // Andre:
index 021dcb535a7dad1d6bb59b11a5480e7633d7ee51..21358d8efc9761098f242092f32878ee7d0276ea 100644 (file)
@@ -1,3 +1,14 @@
+2001-06-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * lstrings.C: 
+       * syscall.C:
+       * syscontr.C: 
+       * LSubstring.C: bring C functions in global namespace if
+       necessary. 
+
+       * lstrings.h (compare): use the std:: version of str[n]cmp only
+       when it exists.
+
 2001-05-31  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * syscontr.C: add std::
index 3abf851057a323f6537cbd05ed52857121f5b184..b873c23cf39dad73c58f189b3063c63e33f90436 100644 (file)
 
 #include "LSubstring.h"
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
 
 LSubstring::LSubstring(string & s, size_type i, size_type l)
        : ps(&s), pos(i), n(l)
@@ -35,7 +40,7 @@ LSubstring::LSubstring(string & s, string const & s2)
 LSubstring::LSubstring(string & s, string::value_type const * p)
        : ps(&s)
 {
-       n = std::strlen(p);
+       n = strlen(p);
        pos = s.find(p);
 }
 
index 88327571fb1735ba4ca35b39bbe4a38e836f7563..d4047936bd226729d2cb1ecc9809af9c074104e6 100644 (file)
@@ -30,6 +30,7 @@ using std::transform;
 #ifndef CXX_GLOBAL_CSTD
 using std::tolower;
 using std::toupper;
+using std::strlen;
 #endif
 
 
@@ -232,7 +233,7 @@ bool prefixIs(string const & a, char const * pre)
 {
        lyx::Assert(pre);
        
-       size_t const l = std::strlen(pre);
+       size_t const l = strlen(pre);
        string::size_type const alen = a.length();
        
        if (l > alen || a.empty())
@@ -280,7 +281,7 @@ bool suffixIs(string const & a, char const * suf)
 {
        lyx::Assert(suf);
        
-       size_t const suflen = std::strlen(suf);
+       size_t const suflen = strlen(suf);
        string::size_type const alen = a.length();
        
        if (suflen > alen)
@@ -478,7 +479,7 @@ string const subst(string const & a,
        
        string lstr(a);
        string::size_type i = 0;
-       string::size_type olen = std::strlen(oldstr);
+       string::size_type olen = strlen(oldstr);
        while((i = lstr.find(oldstr, i)) != string::npos) {
                lstr.replace(i, olen, newstr);
                i += newstr.length(); // We need to be sure that we dont
index 73971a78b9d185a145b49c5c75714736236e56ad..2477b1fff6ff1928a0f103e24df68d90340d6dae 100644 (file)
@@ -34,14 +34,22 @@ int compare_no_case(string const & s, string const & s2, unsigned int len);
 inline
 int compare(char const * a, char const * b)
 {
+#ifndef CXX_GLOBAL_CSTD
        return std::strcmp(a, b);
+#else
+       return strcmp(a, b);
+#endif 
 }
 
 ///
 inline
 int compare(char const * a, char const * b, unsigned int len)
 {
+#ifndef CXX_GLOBAL_CSTD
        return std::strncmp(a, b, len);
+#else
+       return strncmp(a, b, len);
+#endif 
 }
 
 ///
index f308f770f49eea03ac249d3dc2bb841f5cb06d2d..b43fcc699560e3047a009d159ed45680c612b813 100644 (file)
 
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strerror;
+#endif
+
 
 Systemcalls::Systemcalls() {
        pid = 0; // No child yet
@@ -111,7 +115,7 @@ void Systemcalls::waitForChild() {
                pid_t waitrpid = waitpid(pid, &status, WUNTRACED);
                if (waitrpid == -1) {
                        lyxerr << "LyX: Error waiting for child:"
-                              << std::strerror(errno) << endl;
+                              << strerror(errno) << endl;
                        wait = false;
                } else if (WIFEXITED(status)) {
                        // Child exited normally. Update return value.
@@ -178,14 +182,14 @@ pid_t Systemcalls::fork()
                execvp(syscmd, argv);
                // If something goes wrong, we end up here:
                lyxerr << "LyX: execvp failed: "
-                      << std::strerror(errno) << endl;
+                      << strerror(errno) << endl;
        } else if (cpid < 0) { // error
 #else
        pid_t cpid = spawnvp(P_SESSION|P_DEFAULT|P_MINIMIZE|P_BACKGROUND, syscmd, argv);
        if (cpid < 0) { // error
 #endif
                lyxerr << "LyX: Could not fork: "
-                      << std::strerror(errno) << endl;
+                      << strerror(errno) << endl;
        } else { // parent
                return cpid;
        }
index 56d46b810e08a21a5bd56733bb3cc11a8bf21a76..e15294fcdc5625997f0c84af4de60a7d7418eb92 100644 (file)
 
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strerror;
+#endif
+
 //
 // Default constructor
 //
@@ -76,7 +80,7 @@ SystemcallsSingletoncontroller::timer() {
                int waitrpid = waitpid(pid, &stat_loc, WNOHANG);
                if (waitrpid == -1) {
                        lyxerr << "LyX: Error waiting for child:" 
-                              << std::strerror(errno) << endl;
+                              << strerror(errno) << endl;
                } else if (WIFEXITED(stat_loc) || WIFSIGNALED(stat_loc)) {
                        if (WIFEXITED(stat_loc)) {
                                // Ok, the return value goes into retval.
index b769acc2296cb0103ab58a7764b710c802a76664..eb6219ea2e569333a96dcd9d4579b57c2fd49140 100644 (file)
@@ -20,12 +20,15 @@ using std::istream;
 using std::getline;
 using std::endl;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
 
 namespace {
 
 bool getTokenValue(string const & str, const char * token, string & ret)
 {
-    size_t token_length = std::strlen(token);
+    size_t token_length = strlen(token);
     string::size_type pos = str.find(token);
 
     if (pos == string::npos || pos + token_length + 1 >= str.length()
@@ -48,12 +51,12 @@ bool getTokenValue(string const & str, const char * token, string & ret)
 bool getTokenValue(string const & str, const char * token, int & num)
 {
     string::size_type pos = str.find(token);
-    char ch = str[pos + std::strlen(token)];
+    char ch = str[pos + strlen(token)];
 
     if ((pos == string::npos) || (ch != '='))
        return false;
     string ret;
-    pos += std::strlen(token) + 1;
+    pos += strlen(token) + 1;
     ch = str[pos];
     if ((ch != '"') && (ch != '\'')) { // only read till next space
        if (!isdigit(ch))
@@ -101,12 +104,12 @@ bool getTokenValue(string const & str, const char * token,
 bool getTokenValue(string const & str, const char * token, bool & flag)
 {
     string::size_type pos = str.find(token);
-    char ch = str[pos + std::strlen(token)];
+    char ch = str[pos + strlen(token)];
 
     if ((pos == string::npos) || (ch != '='))
        return false;
     string ret;
-    pos += std::strlen(token) + 1;
+    pos += strlen(token) + 1;
     ch = str[pos];
     if ((ch != '"') && (ch != '\'')) { // only read till next space
        if (!isdigit(ch))
index e7f3822031a997edb022305dc02abdffe1e86499..e7321f7d743a7c2182f243f8cc8e1b52f259e3aa 100644 (file)
@@ -41,6 +41,10 @@ using std::max;
 using std::endl;
 using std::vector;
 
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
 namespace {
 
        int const WIDTH_OF_LINE = 5;
@@ -1149,7 +1153,7 @@ bool string2type(string const str, bool & num)
 
 bool getTokenValue(string const & str, const char * token, string & ret)
 {
-       size_t token_length = std::strlen(token);
+       size_t token_length = strlen(token);
        string::size_type pos = str.find(token);
 
        if (pos == string::npos || pos + token_length + 1 >= str.length()