Compare commits

..

4 Commits

Author SHA1 Message Date
Pavel Sanda
2facf6eecc Merged compilation does not exist anymore. 2024-10-04 20:53:26 +02:00
Pavel Sanda
854b53bff5 Document gcc 5 dependency.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223072.html
2024-10-04 20:51:51 +02:00
Pavel Sanda
b8f1f113f3 Remove trivstring.
Needed in times when std:string was not thread-safe,
but should be ok nowadays.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223068.html
2024-10-04 20:49:55 +02:00
Pavel Sanda
9ccda98e6e Remove strfwd.h.
Will break cygwin due to trivstring header.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223056.html
2024-10-04 20:49:33 +02:00
113 changed files with 115 additions and 641 deletions

View File

@ -53,7 +53,7 @@ Requirements
------------
First of all, you will need a C++11 standard conforming compiler, like g++ (at
least 4.9, to have proper srd::regex) or clang++.
least 5.0, to have proper std::regex & std::string) or clang++.
LyX makes great use of the C++ Standard Library. This means that gcc
users will have to install the relevant libstdc++ library to be able

4
README
View File

@ -87,8 +87,8 @@ How do I upgrade from an earlier LyX version?
What do I need to compile LyX from the source distribution?
* A C++11 compiler. Development is being done mainly with gcc/g++,
but clang and MSVC are known to work too. As of LyX 2.4.0, you
need at least gcc 4.9.
but clang and MSVC are known to work too. As of LyX 2.5.0, you
need at least gcc 5.0.
* The Qt library, at least version 5.2 (5.6 recommended). It is
also possible to compile with Qt 6.x.

View File

@ -168,9 +168,4 @@
#define HAVE_MODE_T
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
#include "support/strfwd.h" // always first, to prevent compiler's interpretation/instantiations of some typedef
#endif
#endif

View File

@ -38,6 +38,8 @@
- The support for (long unmaintained) eLyXer was removed.
- When compiling with GCC, LyX know needs at least version >= 5.
!!Known issues in version 2.5.0

View File

@ -12,7 +12,7 @@
#ifndef BOX_H
#define BOX_H
#include "support/strfwd.h"
#include <ostream>
namespace lyx {

View File

@ -16,13 +16,12 @@
#include "OutputEnums.h"
#include "support/unique_ptr.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#include "support/types.h"
#include <map>
#include <list>
#include <set>
#include <string>
#include <vector>

View File

@ -16,8 +16,6 @@
#include "Encoding.h"
#include "support/strfwd.h"
namespace lyx {
class Buffer;

View File

@ -12,8 +12,7 @@
#ifndef BUFFER_LIST_H
#define BUFFER_LIST_H
#include "support/strfwd.h"
#include <string>
#include <vector>

View File

@ -20,7 +20,6 @@
#include "TexRow.h"
#include "update_flags.h"
#include "support/strfwd.h"
#include "support/types.h"
namespace lyx {

View File

@ -15,7 +15,6 @@
#ifndef CHANGES_H
#define CHANGES_H
#include "support/strfwd.h"
#include "support/types.h"
#include "support/lyxtime.h"

View File

@ -13,7 +13,6 @@
#define CITATION_H
#include "support/docstring.h"
#include <string>
#include <vector>
namespace lyx {

View File

@ -12,10 +12,9 @@
#ifndef CMDDEF_H
#define CMDDEF_H
#include "support/strfwd.h"
#include <map>
#include <set>
#include <string>
namespace lyx {

View File

@ -21,7 +21,7 @@
#include "ColorCode.h"
#include "support/strfwd.h"
#include <string>
namespace lyx {

View File

@ -19,10 +19,10 @@
#ifndef COLORSET_H
#define COLORSET_H
#include "support/docstring.h"
#include "Color.h"
#include <map>
#include <string>
namespace lyx {

View File

@ -13,12 +13,11 @@
#define CONVERTER_H
#include "Graph.h"
#include "support/trivstring.h"
#include "support/docstring.h"
#include <memory>
#include <vector>
#include <set>
#include <string>
namespace lyx {

View File

@ -21,7 +21,7 @@
#ifndef CONVERTERCACHE_H
#define CONVERTERCACHE_H
#include "support/strfwd.h"
#include <string>
namespace lyx {

View File

@ -18,7 +18,6 @@
#define CURSORSLICE_H
#include "support/types.h"
#include "support/strfwd.h"
#include "insets/Inset.h"

View File

@ -17,7 +17,6 @@
#include "Author.h"
#include "DocumentClassPtr.h"
#include "support/strfwd.h"
#include "support/types.h"
#include "frontends/Clipboard.h"

View File

@ -14,7 +14,6 @@
#define ENCODING_H
#include "support/docstring.h"
#include "support/trivstring.h"
#include "support/types.h"
#include <map>

View File

@ -14,8 +14,6 @@
#include "TexRow.h"
#include "support/strfwd.h"
#include <vector>

View File

@ -12,10 +12,7 @@
#ifndef FLOATING_H
#define FLOATING_H
#include "support/strfwd.h"
#include <string>
#include "support/docstring.h"
namespace lyx {

View File

@ -17,8 +17,6 @@
#include "FontInfo.h"
#include "support/strfwd.h"
namespace lyx {

View File

@ -27,7 +27,6 @@
#include "support/lstrings.h"
#include <algorithm>
#include <ostream>
#include <sstream>
using namespace std;

View File

@ -20,7 +20,7 @@
#include "FontEnums.h"
#include "support/Changer.h"
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -12,11 +12,9 @@
#ifndef FORMAT_H
#define FORMAT_H
#include "support/strfwd.h"
#include "support/trivstring.h"
#include "support/docstring.h"
#include <vector>
#include <string>
namespace lyx {

View File

@ -17,8 +17,6 @@
#include "FuncRequest.h"
#include "KeySequence.h"
#include "support/strfwd.h"
#include <memory>
#include <vector>

View File

@ -16,7 +16,6 @@
#include "OutputParams.h"
#include "support/strfwd.h"
#include "support/FileName.h"
#include "support/signals.h"

View File

@ -16,7 +16,6 @@
#define LANGUAGE_H
#include "support/docstring.h"
#include "support/trivstring.h"
#include <map>
#include <set>

View File

@ -22,7 +22,6 @@
#include <map>
#include <set>
#include <string>
namespace lyx {

View File

@ -15,8 +15,6 @@
#include "TextClass.h"
#include "support/strfwd.h"
#include <string>
#include <vector>

View File

@ -14,8 +14,7 @@
#ifndef LYX_H
#define LYX_H
#include "support/strfwd.h"
#include <string>
#include <vector>
namespace lyx {

View File

@ -22,7 +22,6 @@
#include "update_flags.h"
#include "support/Length.h"
#include "support/strfwd.h"
#include "support/userinfo.h"
#include <map>

View File

@ -15,8 +15,6 @@
#include "support/docstring.h"
#include "support/unique_ptr.h"
#include <string>
namespace lyx {

View File

@ -17,7 +17,6 @@
#include "ColorCode.h"
#include "FontInfo.h"
#include "support/strfwd.h"
#include "support/Changer.h"
#include "insets/Inset.h"

View File

@ -26,7 +26,6 @@
#include "support/lstrings.h"
#include <sstream>
#include <string>
#include <algorithm>
using namespace std;

View File

@ -19,7 +19,6 @@
#include "LayoutEnums.h"
#include "SpellChecker.h"
#include "support/strfwd.h"
#include "support/types.h"
#include "insets/InsetCode.h"

View File

@ -18,7 +18,6 @@
#include "Spacing.h"
#include "support/types.h"
#include "support/strfwd.h"
#include "support/Length.h"

View File

@ -12,7 +12,6 @@
#ifndef PERSONAL_WORD_LIST_H
#define PERSONAL_WORD_LIST_H
#include "support/strfwd.h"
#include "support/docstring_list.h"
#include "support/FileName.h"

View File

@ -12,8 +12,6 @@
#ifndef SPACING_H
#define SPACING_H
#include "support/strfwd.h"
#include <string>
namespace lyx {

View File

@ -13,7 +13,7 @@
#ifndef SPELL_BASE_H
#define SPELL_BASE_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include <vector>

View File

@ -12,7 +12,7 @@
#ifndef STATISTICS_H
#define STATISTICS_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include "support/types.h"
namespace lyx {

View File

@ -26,7 +26,6 @@
#include <list>
#include <map>
#include <set>
#include <string>
#include <vector>
#ifdef ERROR

View File

@ -13,7 +13,7 @@
#ifndef THESAURUS_H
#define THESAURUS_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include <map>
#include <vector>

View File

@ -21,7 +21,6 @@
#include "Toc.h"
#include "TocBuilder.h"
#include "support/strfwd.h"
#include "support/unique_ptr.h"

View File

@ -14,7 +14,7 @@
#include "Toc.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#include <stack>

View File

@ -15,7 +15,7 @@
#include "FuncCode.h"
#include "update_flags.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#include <functional>

View File

@ -14,8 +14,6 @@
#ifndef BASE_CLIPBOARD_H
#define BASE_CLIPBOARD_H
#include "support/strfwd.h"
namespace lyx {
class Cursor;

View File

@ -12,7 +12,7 @@
#ifndef DELEGATES_H
#define DELEGATES_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef FONTLOADER_H
#define FONTLOADER_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -16,7 +16,7 @@
#include "support/mute_warning.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#include <vector>

View File

@ -13,7 +13,7 @@
#ifndef PAINTER_H
#define PAINTER_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include "support/types.h"
namespace lyx {

View File

@ -14,7 +14,7 @@
#ifndef SELECTION_H
#define SELECTION_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {
namespace frontend {

View File

@ -12,7 +12,7 @@
#ifndef LYX_ALERT_H
#define LYX_ALERT_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -17,8 +17,6 @@
#ifndef LYX_CATEGORIZEDCOMBO_H
#define LYX_CATEGORIZEDCOMBO_H
#include "support/strfwd.h"
#include <QComboBox>

View File

@ -16,8 +16,6 @@
#include "insets/InsetCode.h"
#include "support/strfwd.h"
#include <QString>
class QSettings;

View File

@ -18,7 +18,6 @@
#include "ui_FindAndReplaceUi.h"
#include "support/docstring.h"
#include <string>
namespace lyx {

View File

@ -49,7 +49,6 @@
#include <algorithm>
#include <regex>
#include <string>
#include <vector>
using namespace std;

View File

@ -34,7 +34,6 @@
#include <QScrollBar>
#include <map>
#include <string>
using namespace std;

View File

@ -12,6 +12,8 @@
#ifndef GUIDELIMITERDIALOG_H
#define GUIDELIMITERDIALOG_H
#include "support/docstring.h"
#include "GuiDialog.h"
#include "ui_DelimiterUi.h"

View File

@ -12,11 +12,12 @@
#ifndef GUISYMBOLSDIALOG_H
#define GUISYMBOLSDIALOG_H
#include "support/docstring.h"
#include "DialogView.h"
#include "ui_SymbolsUi.h"
#include <map>
#include <string>
#include <vector>
namespace lyx {

View File

@ -20,8 +20,6 @@
#include <QToolBar>
#include <QToolButton>
#include "support/strfwd.h"
class QSettings;
namespace lyx {

View File

@ -4437,8 +4437,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
case LFUN_BUFFER_EXPORT: {
if (!doc_buffer)
break;
// GCC only sees strfwd.h when building merged
if (::lyx::operator==(cmd.argument(), "custom")) {
if (cmd.argument() == "custom") {
// LFUN_MASTER_BUFFER_EXPORT is not enabled for this case,
// so the following test should not be needed.
// In principle, we could try to switch to such a view...

View File

@ -17,8 +17,6 @@
#include "frontends/Delegates.h"
#include "support/strfwd.h"
#include <QMainWindow>
#include <QLabel>
#include <QMenu>

View File

@ -12,6 +12,8 @@
#ifndef INSET_PARAMS_DIALOG_H
#define INSET_PARAMS_DIALOG_H
#include "support/docstring.h"
#include "DialogView.h"
#include "ui_InsetParamsUi.h"

View File

@ -16,7 +16,7 @@
#include "FuncCode.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#include <QWidget>

View File

@ -16,7 +16,7 @@
#ifndef LYX_LAYOUT_BOX_H
#define LYX_LAYOUT_BOX_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include <QComboBox>

View File

@ -15,9 +15,6 @@
#ifndef GRAPHICSTYPES_H
#define GRAPHICSTYPES_H
#include "support/strfwd.h"
namespace lyx {
namespace graphics {

View File

@ -12,7 +12,7 @@
#ifndef PREVIEWIMAGE_H
#define PREVIEWIMAGE_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -24,7 +24,6 @@
#include "RowFlags.h"
#include "support/docstring.h"
#include "support/strfwd.h"
#include "support/types.h"
#include <climits>

View File

@ -18,7 +18,6 @@
#include "support/docstring.h"
#include <string>
#include <vector>
#include <map>

View File

@ -20,7 +20,6 @@
#include "support/docstring.h"
#include <set>
#include <string>
namespace lyx {

View File

@ -16,8 +16,6 @@
#ifndef LYXFIND_H
#define LYXFIND_H
#include "support/strfwd.h"
// FIXME
#include "support/docstring.h"

View File

@ -30,7 +30,6 @@
#include "support/lstrings.h"
#include <algorithm>
#include <ostream>
using namespace lyx::support;

View File

@ -13,7 +13,6 @@
#define MATH_MATRIXINSET_H
#include "InsetMathGrid.h"
#include "support/strfwd.h"
namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef MATHAUTOCORRECT_H
#define MATHAUTOCORRECT_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -20,8 +20,6 @@
#include "support/docstring.h"
#include "support/lassert.h"
#include <ostream>
using namespace std;
namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef MATH_CLASS_H
#define MATH_CLASS_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -21,8 +21,6 @@
#include "Dimension.h"
#include "OutputEnums.h"
#include "support/strfwd.h"
#include <cstddef>
#include <vector>

View File

@ -12,7 +12,7 @@
#ifndef MATH_EXTERN_H
#define MATH_EXTERN_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -14,8 +14,6 @@
#include "MathParser.h"
#include "support/strfwd.h"
#include <map>
namespace lyx {

View File

@ -25,7 +25,6 @@
#include <algorithm>
#include <cstring>
#include <ostream>
#include <FontInfo.h>
using namespace std;

View File

@ -19,7 +19,6 @@
#include "texstream.h"
#include "support/Changer.h"
#include "support/strfwd.h"
namespace lyx {

View File

@ -14,7 +14,7 @@
#define MATH_SUPPORT_H
#include "MathParser_flags.h"
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -28,7 +28,6 @@
#include "ParagraphList.h"
#include "support/docstream.h"
#include "support/strfwd.h"
#include "xml.h"
namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef OUTPUT_PLAINTEXT_H
#define OUTPUT_PLAINTEXT_H
#include "support/strfwd.h"
#include "support/docstring.h"
#include "support/types.h"
#include <climits>

View File

@ -14,7 +14,6 @@
#include "LayoutEnums.h"
#include "support/strfwd.h"
#include "xml.h"

View File

@ -11,7 +11,7 @@
#ifndef CONSOLEAPPLICATION_H
#define CONSOLEAPPLICATION_H
#include "support/strfwd.h"
#include <string>
namespace lyx {

View File

@ -13,7 +13,6 @@
#define FILENAME_H
#include "support/os.h"
#include "support/strfwd.h"
#include <ctime>
#include <set>

View File

@ -15,7 +15,7 @@
#define FORKEDCALLS_H
#include "support/signals.h"
#include "support/strfwd.h"
#include "support/docstring.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>

View File

@ -15,7 +15,7 @@
#ifndef LENGTH_H
#define LENGTH_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -17,8 +17,7 @@
#ifndef LEXER_H
#define LEXER_H
#include "support/strfwd.h"
#include <string>
#include "support/docstring.h"
namespace lyx {

View File

@ -106,7 +106,6 @@ liblyxsupport_a_SOURCES = \
signals.h \
socktools.cpp \
socktools.h \
strfwd.h \
Systemcall.cpp \
Systemcall.h \
SystemcallPrivate.h \
@ -116,8 +115,6 @@ liblyxsupport_a_SOURCES = \
Translator.h \
Timeout.cpp \
Timeout.h \
trivstring.cpp \
trivstring.h \
types.h \
unique_ptr.h \
userinfo.cpp \

View File

@ -14,7 +14,6 @@
#include "support/docstring.h"
#include <map>
#include <string>
namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef LYX_SUPPORT_PROGRESSINTERFACE_H
#define LYX_SUPPORT_PROGRESSINTERFACE_H
#include "support/strfwd.h"
#include "support/docstring.h"
class QString;

View File

@ -15,8 +15,6 @@
#ifndef SYSTEMCALL_H
#define SYSTEMCALL_H
#include "strfwd.h"
namespace lyx {
namespace support {

View File

@ -14,7 +14,6 @@
#include "support/convert.h"
#include "support/docstring.h"
#include <string>
#include <sstream>
//needed for Mac OSX 10.5.2 Leopard
#include <cstdlib>

View File

@ -16,7 +16,7 @@
#ifndef CONVERT_H
#define CONVERT_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -17,7 +17,7 @@
#ifndef COUNTER_REPS_H
#define COUNTER_REPS_H
#include "support/strfwd.h"
#include "support/docstring.h"
namespace lyx {

View File

@ -15,7 +15,7 @@
#ifndef LYXDEBUG_H
#define LYXDEBUG_H
#include "support/strfwd.h"
#include "support/docstring.h"
// Forward definitions do not work with libc++
// but ios_base has already been defined in strfwd

View File

@ -13,12 +13,68 @@
#ifndef LYX_DOCSTRING_H
#define LYX_DOCSTRING_H
#include "support/strfwd.h"
#ifdef USE_WCHAR_T
// Prefer this if possible because GNU libstdc++ has usable
// std::ctype<wchar_t> locale facets but not
// std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
// usable std::char_traits<boost::uint32_t>.
namespace lyx { typedef wchar_t char_type; }
#else
#include <cstdint>
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
namespace lyx { typedef uint32_t char_type; }
#include "support/numpunct_lyx_char_type.h" // implementation for our char_type needed
#else
namespace lyx { typedef std::uint32_t char_type; }
#endif
#endif
#include <string>
namespace lyx {
/**
* String type for storing the main text in UCS4 encoding.
* Use std::string only in cases 7-bit ASCII is to be manipulated
* within the variable.
*/
typedef std::basic_string<char_type, std::char_traits<char_type>,
std::allocator<char_type> > docstring;
/// Base class for UCS4 input streams
typedef std::basic_istream<char_type, std::char_traits<char_type> > idocstream;
/// Base class for UCS4 output streams
typedef std::basic_ostream<char_type, std::char_traits<char_type> > odocstream;
/// UCS4 output stringstream
typedef std::basic_ostringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > odocstringstream;
#if ! defined(USE_WCHAR_T)
extern odocstream & operator<<(odocstream &, char);
#endif
// defined in lstrings.cpp
docstring const & empty_docstring();
std::string const & empty_string();
// defined in docstring.cpp
bool operator==(docstring const &, char const *);
//trivstring signalizes thread-safety request; should not be needed for any
//C++11 conformant std::basic_string, e.g. GCC >= 5.
//Once properly tested we can ditch these two in favour of std::string/docstring.
typedef std::string trivstring;
typedef docstring trivdocstring;
} // namespace lyx
namespace lyx {
/// Creates a docstring from a C string of ASCII characters
docstring const from_ascii(char const *);

Some files were not shown because too many files have changed in this diff Show More