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.
This commit is contained in:
Jean-Marc Lasgouttes 2019-03-21 14:05:50 +01:00
parent cd9f52da89
commit 601244ba92
9 changed files with 12 additions and 22 deletions

View File

@ -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
])

View File

@ -105,7 +105,7 @@ docstring convert<docstring>(unsigned long ul)
}
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template<>
string convert<string>(unsigned long long ull)
{
@ -135,7 +135,7 @@ docstring convert<docstring>(long l)
}
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template<>
string convert<string>(long long ll)
{

View File

@ -33,13 +33,13 @@ template<> std::string convert<std::string>(unsigned int ui);
template<> docstring convert<docstring>(unsigned int ui);
template<> std::string convert<std::string>(unsigned long ul);
template<> docstring convert<docstring>(unsigned long ul);
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template<> std::string convert<std::string>(unsigned long long ull);
template<> docstring convert<docstring>(unsigned long long ull);
#endif
template<> std::string convert<std::string>(long l);
template<> docstring convert<docstring>(long l);
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template<> std::string convert<std::string>(long long ll);
template<> docstring convert<docstring>(long long ll);
#endif

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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")));

View File

@ -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);

View File

@ -330,7 +330,7 @@ template otexrowstream & operator<< <unsigned int>(otexrowstream &,
template otexrowstream & operator<< <unsigned long>(otexrowstream &,
unsigned long);
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template otexrowstream & operator<< <unsigned long long>(otexrowstream &,
unsigned long long);
#endif
@ -351,7 +351,7 @@ template otexstream & operator<< <double>(otexstream &, double);
template otexstream & operator<< <int>(otexstream &, int);
template otexstream & operator<< <unsigned int>(otexstream &, unsigned int);
template otexstream & operator<< <unsigned long>(otexstream &, unsigned long);
#ifdef LYX_USE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
template otexstream & operator<< <unsigned long long>(otexstream &, unsigned long long);
#endif