From: Jean-Marc Lasgouttes Date: Thu, 21 Mar 2019 13:05:50 +0000 (+0100) Subject: Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d21fb151ab4c06fd2ad70feb43eee59a805f6602;p=features.git Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG It seems that the extra complication hurts more than it helps (for example with OpenBSD). Some adaptation will be needed for cmake. --- diff --git a/configure.ac b/configure.ac index 703d267836..f4a6caf5dd 100644 --- a/configure.ac +++ b/configure.ac @@ -123,10 +123,6 @@ AC_SUBST([HAVE_WCHAR_T]) # Needed for Mingw-w64 AC_TYPE_LONG_LONG_INT -if test "$ac_cv_type_long_long_int" = yes; then - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(long long) -fi ### We need iconv for unicode support (Qt4 frontend requires it too) LYX_USE_INCLUDED_ICONV @@ -309,12 +305,6 @@ char * strerror(int n); # define USE_WCHAR_T #endif -#ifdef HAVE_LONG_LONG_INT -#if SIZEOF_LONG_LONG > SIZEOF_LONG -#define LYX_USE_LONG_LONG -#endif -#endif - #endif ]) diff --git a/src/support/convert.cpp b/src/support/convert.cpp index b1c554e083..9455643a66 100644 --- a/src/support/convert.cpp +++ b/src/support/convert.cpp @@ -105,7 +105,7 @@ docstring convert(unsigned long ul) } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template<> string convert(unsigned long long ull) { @@ -135,7 +135,7 @@ docstring convert(long l) } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template<> string convert(long long ll) { diff --git a/src/support/convert.h b/src/support/convert.h index fb069c98c3..3b97fb6c88 100644 --- a/src/support/convert.h +++ b/src/support/convert.h @@ -33,13 +33,13 @@ template<> std::string convert(unsigned int ui); template<> docstring convert(unsigned int ui); template<> std::string convert(unsigned long ul); template<> docstring convert(unsigned long ul); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template<> std::string convert(unsigned long long ull); template<> docstring convert(unsigned long long ull); #endif template<> std::string convert(long l); template<> docstring convert(long l); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template<> std::string convert(long long ll); template<> docstring convert(long long ll); #endif diff --git a/src/support/debug.cpp b/src/support/debug.cpp index 3026df09f2..e72a43dbd1 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -240,7 +240,7 @@ LyXErr & operator<<(LyXErr & l, long t) { return toStream(l, t); } LyXErr & operator<<(LyXErr & l, unsigned long t) { return toStream(l, t); } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT LyXErr & operator<<(LyXErr & l, long long t) { return toStream(l, t); } LyXErr & operator<<(LyXErr & l, unsigned long long t) diff --git a/src/support/debug.h b/src/support/debug.h index f6b06d5c3e..212049a609 100644 --- a/src/support/debug.h +++ b/src/support/debug.h @@ -202,7 +202,7 @@ LyXErr & operator<<(LyXErr &, int); LyXErr & operator<<(LyXErr &, unsigned int); LyXErr & operator<<(LyXErr &, long); LyXErr & operator<<(LyXErr &, unsigned long); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT LyXErr & operator<<(LyXErr &, long long); LyXErr & operator<<(LyXErr &, unsigned long long); #endif diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp index 496d4c0242..c53222da6d 100644 --- a/src/support/docstring.cpp +++ b/src/support/docstring.cpp @@ -514,7 +514,7 @@ protected: return do_put_helper(oit, b, fill, v); } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT iter_type do_put(iter_type oit, ios_base & b, char_type fill, long long v) const { @@ -675,7 +675,7 @@ protected: return do_get_integer(iit, eit, b, err, v); } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT iter_type do_get(iter_type iit, iter_type eit, ios_base & b, ios_base::iostate & err, long long & v) const diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index e69fc8837b..3195762a4a 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1475,7 +1475,7 @@ docstring bformat(docstring const & fmt, long arg1) } -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT docstring bformat(docstring const & fmt, long long arg1) { LATTEST(contains(fmt, from_ascii("%1$d"))); diff --git a/src/support/lstrings.h b/src/support/lstrings.h index fcf1cbb6fe..1ff9dfd811 100644 --- a/src/support/lstrings.h +++ b/src/support/lstrings.h @@ -360,7 +360,7 @@ docstring to_percent_encoding(docstring const & in, docstring const & ex = docst docstring bformat(docstring const & fmt, int arg1); docstring bformat(docstring const & fmt, long arg1); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT docstring bformat(docstring const & fmt, long long arg1); #endif docstring bformat(docstring const & fmt, unsigned int arg1); diff --git a/src/texstream.cpp b/src/texstream.cpp index f8f298bdaf..1523ca9470 100644 --- a/src/texstream.cpp +++ b/src/texstream.cpp @@ -330,7 +330,7 @@ template otexrowstream & operator<< (otexrowstream &, template otexrowstream & operator<< (otexrowstream &, unsigned long); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template otexrowstream & operator<< (otexrowstream &, unsigned long long); #endif @@ -351,7 +351,7 @@ template otexstream & operator<< (otexstream &, double); template otexstream & operator<< (otexstream &, int); template otexstream & operator<< (otexstream &, unsigned int); template otexstream & operator<< (otexstream &, unsigned long); -#ifdef LYX_USE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT template otexstream & operator<< (otexstream &, unsigned long long); #endif