]> git.lyx.org Git - features.git/commitdiff
Patch from Yves to check whether C functions are defined in std:: namespace
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Nov 2000 12:33:01 +0000 (12:33 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Nov 2000 12:33:01 +0000 (12:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1209 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
config/lyxinclude.m4
configure.in
lib/CREDITS
src/support/lstrings.C

index 18c071e2dd5ec67da072c315dff8c9295f3dc868..2e3dde696672f738152cecc3de63cbeef4537cd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-11-10  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * lib/CREDITS: add Yves Bastide
+
+2000-11-03  Yves Bastide  <stid@libd-pc11.univ-bpclermont.fr>
+
+       * config/lyxinclude.m4 (LYX_CXX_GLOBAL_CSTD): new function to
+       check whether C library functions are in the global namespace.
+
+       * configure.in: calls it.
+
+       * src/support/lstrings.C: #ifndef CXX_GLOBAL_CSTD instead of
+       #ifndef __GLIBCPP__.
+
 2000-11-08  Dekel Tsur  <dekelts@tau.ac.il>
 
        * src/frontends/xforms/FormParagraph.C (updateLanguage): Check
index e5522afec824651a24ec991ad8a4eef7e717e393..5e202115541acece508d4d9936730a22738eded2 100644 (file)
@@ -519,6 +519,22 @@ if test $lyx_cv_cxx_cheaders = no ; then
   LYX_ADD_INC_DIR(lyx_cppflags,\$(top_srcdir)/src/cheaders)  
 fi])
 
+dnl Usage: LYX_CXX_GLOBAL_CSTD: checks whether C library functions
+dnl   are already in the global namespace
+AC_DEFUN(LYX_CXX_GLOBAL_CSTD,[
+    AC_CACHE_CHECK(whether C library functions are already in the global namespace,
+    lyx_cv_cxx_global_cstd,
+    [AC_TRY_COMPILE([
+    #include <cctype>
+    using std::tolower;
+    ],[
+    return 0;
+    ],[lyx_cv_cxx_global_cstd=no],[lyx_cv_cxx_global_cstd=yes])])
+    if test x$lyx_cv_cxx_global_cstd = xyes; then
+       AC_DEFINE(CXX_GLOBAL_CSTD,1,
+       [Define if your C++ compiler puts C library functions in the global namespace])
+    fi
+])
 
 dnl Usage LYX_PATH_XPM: Checks for xpm library and header
 AC_DEFUN(LYX_PATH_XPM,[
index 10410de357393b7f5c59150330aadb3c9581fe95..5aeaf8a50ca5273d360234ec5af5d1857f050197 100644 (file)
@@ -91,6 +91,7 @@ LYX_CXX_STL_STRING
 LYX_CXX_GOOD_STD_STRING
 LYX_CXX_NAMESPACES
 LYX_CXX_CHEADERS
+LYX_CXX_GLOBAL_CSTD
 LYX_STD_COUNT
 dnl we disable rtti for now
 dnl LYX_CXX_RTTI
index 12061c50788989be83a040909c3dac038c09431a..777e224b81ae5204777ff48132ef241b7bc7afdd 100644 (file)
@@ -15,6 +15,9 @@
    external style definition files,
    linuxdoc sgml support and more
    ftp-site ftp.lyx.org
+@bYves Bastide
+@iE-mail: stid@acm.org
+   Bug fixes
 @bHeinrich Bauer
 @iE-mail: heinrich.bauer@t-mobil.de
    Fixes for dvi output
index 547d0790aa234b5876a600fffa0b6cde410fc414..5592d825b38b7e6f557bc9d0543ca1c7becc3517 100644 (file)
@@ -26,9 +26,7 @@
 
 using std::count;
 using std::transform;
-#ifndef __GLIBCPP__
-// The new glibstdc++-v3 has not worked out all the quirks regarding cctype
-// yet. So currently it failes if the to using lines below are stated.
+#ifndef CXX_GLOBAL_CSTD
 using std::tolower;
 using std::toupper;
 #endif