diff options
author | Claes Nästén <pekdon@gmail.com> | 2025-02-19 00:04:06 +0100 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-02-19 00:04:06 +0100 |
commit | 20ad6f765ed229411bb0b26c3cebcaa03346e739 (patch) | |
tree | 9bfdb26153eafc70be46f80b03869bf8733c629a | |
parent | 7a595afa37423b99f79efbbbb2241090cb56653a (diff) |
Fix build on Solaris 10 and old gcc 4.0.1
Remove extra semicolons and commas, as well as isinf() so it builds and
runs on Solaris 10.
Also add extra fixes for non C++11 courtesy of Sevan Janiyan, making
Dillo compile and run on OS X 10.4 PowerPC with GCC 4.0.1 and 8.5.
Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
-rw-r--r-- | dw/fltkui.cc | 6 | ||||
-rw-r--r-- | dw/ooffloatsmgr.cc | 2 | ||||
-rw-r--r-- | dw/style.hh | 8 | ||||
-rw-r--r-- | dw/types.hh | 2 | ||||
-rw-r--r-- | dw/widget.hh | 2 | ||||
-rw-r--r-- | src/css.hh | 16 | ||||
-rw-r--r-- | src/cssparser.cc | 2 | ||||
-rw-r--r-- | src/dillo.cc | 2 | ||||
-rw-r--r-- | src/html_common.hh | 2 | ||||
-rw-r--r-- | src/prefsparser.cc | 13 | ||||
-rw-r--r-- | src/xembed.cc | 4 |
11 files changed, 29 insertions, 30 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc index c650712a..db7c94e2 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -42,7 +42,7 @@ static Fl_Color fltkui_dimmed(Fl_Color c, Fl_Color bg) { return fl_color_average(c, bg, .33f); -}; +} //---------------------------------------------------------------------------- /* @@ -78,7 +78,7 @@ CustInput2::CustInput2 (int x, int y, int w, int h, const char* l) : placeholder = NULL; showing_placeholder = false; usual_color = FL_BLACK; /* just init until widget style is set */ -}; +} /* * Show normal text. @@ -235,7 +235,7 @@ CustTextEditor::CustTextEditor (int x, int y, int w, int h, const char* l) : buffer(new Fl_Text_Buffer()); usual_color = FL_BLACK; /* just init until widget style is set */ text_copy = NULL; -}; +} CustTextEditor::~CustTextEditor () { diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index a3175081..08a74924 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -1282,7 +1282,7 @@ bool OOFFloatsMgr::affectsLeftBorder (core::Widget *widget) bool OOFFloatsMgr::affectsRightBorder (core::Widget *widget) { return widget->getStyle()->vloat == core::style::FLOAT_RIGHT; -}; +} bool OOFFloatsMgr::mayAffectBordersAtAll () { diff --git a/dw/style.hh b/dw/style.hh index 587a8622..8e2d4ca5 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -262,14 +262,14 @@ enum VAlignType { VALIGN_SUB, VALIGN_SUPER, VALIGN_TEXT_TOP, - VALIGN_TEXT_BOTTOM, + VALIGN_TEXT_BOTTOM }; enum TextTransform { TEXT_TRANSFORM_NONE, TEXT_TRANSFORM_CAPITALIZE, TEXT_TRANSFORM_UPPERCASE, - TEXT_TRANSFORM_LOWERCASE, + TEXT_TRANSFORM_LOWERCASE }; /** @@ -345,7 +345,7 @@ enum Position { POSITION_STATIC, POSITION_RELATIVE, POSITION_ABSOLUTE, - POSITION_FIXED, + POSITION_FIXED }; enum TextDecoration { @@ -361,7 +361,7 @@ enum WhiteSpace { WHITE_SPACE_PRE, WHITE_SPACE_NOWRAP, WHITE_SPACE_PRE_WRAP, - WHITE_SPACE_PRE_LINE, + WHITE_SPACE_PRE_LINE }; enum FloatType { diff --git a/dw/types.hh b/dw/types.hh index bfe7ce89..36910d10 100644 --- a/dw/types.hh +++ b/dw/types.hh @@ -224,7 +224,7 @@ struct Content ALL = 0xff, REAL_CONTENT = 0xff ^ (START | END), SELECTION_CONTENT = TEXT | BREAK, // WIDGET_* must be set additionally - ANY_WIDGET = WIDGET_IN_FLOW | WIDGET_OOF_CONT | WIDGET_OOF_REF, + ANY_WIDGET = WIDGET_IN_FLOW | WIDGET_OOF_CONT | WIDGET_OOF_REF }; /* Content is embedded in struct Word therefore we diff --git a/dw/widget.hh b/dw/widget.hh index 8631b9db..3149c87b 100644 --- a/dw/widget.hh +++ b/dw/widget.hh @@ -93,7 +93,7 @@ protected: * * The dw::Image widget uses this flag, see dw::Image::setBuffer. */ - WAS_ALLOCATED = 1 << 6, + WAS_ALLOCATED = 1 << 6 }; /** @@ -24,13 +24,13 @@ typedef enum { CSS_PRIMARY_AUTHOR, CSS_PRIMARY_AUTHOR_IMPORTANT, CSS_PRIMARY_USER_IMPORTANT, - CSS_PRIMARY_LAST, + CSS_PRIMARY_LAST } CssPrimaryOrder; typedef enum { CSS_ORIGIN_USER_AGENT, CSS_ORIGIN_USER, - CSS_ORIGIN_AUTHOR, + CSS_ORIGIN_AUTHOR } CssOrigin; typedef enum { @@ -267,7 +267,7 @@ typedef union { typedef enum { CSS_BORDER_WIDTH_THIN, CSS_BORDER_WIDTH_MEDIUM, - CSS_BORDER_WIDTH_THICK, + CSS_BORDER_WIDTH_THICK } CssBorderWidthExtensions; typedef enum { @@ -275,7 +275,7 @@ typedef enum { CSS_FONT_WEIGHT_BOLDER, CSS_FONT_WEIGHT_LIGHT, CSS_FONT_WEIGHT_LIGHTER, - CSS_FONT_WEIGHT_NORMAL, + CSS_FONT_WEIGHT_NORMAL } CssFontWeightExtensions; typedef enum { @@ -287,7 +287,7 @@ typedef enum { CSS_FONT_SIZE_XX_LARGE, CSS_FONT_SIZE_XX_SMALL, CSS_FONT_SIZE_X_LARGE, - CSS_FONT_SIZE_X_SMALL, + CSS_FONT_SIZE_X_SMALL } CssFontSizeExtensions; typedef enum { @@ -361,14 +361,14 @@ class CssSimpleSelector { public: enum { ELEMENT_NONE = -1, - ELEMENT_ANY = -2, + ELEMENT_ANY = -2 }; typedef enum { SELECT_NONE, SELECT_CLASS, SELECT_PSEUDO_CLASS, - SELECT_ID, + SELECT_ID } SelectType; CssSimpleSelector (); @@ -400,7 +400,7 @@ class CssSelector { COMB_NONE, COMB_DESCENDANT, COMB_CHILD, - COMB_ADJACENT_SIBLING, + COMB_ADJACENT_SIBLING } Combinator; private: diff --git a/src/cssparser.cc b/src/cssparser.cc index 071f519f..065eb624 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -294,7 +294,7 @@ typedef struct { * determined by the type */ CSS_SHORTHAND_DIRECTIONS, /**< <t>{1,4} */ CSS_SHORTHAND_BORDER, /**< special, used for 'border' */ - CSS_SHORTHAND_FONT, /**< special, used for 'font' */ + CSS_SHORTHAND_FONT /**< special, used for 'font' */ } type; const CssPropertyName *properties; /* CSS_SHORTHAND_MULTIPLE: * must be terminated by diff --git a/src/dillo.cc b/src/dillo.cc index 5818e352..40740118 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -81,7 +81,7 @@ typedef enum { DILLO_CLI_VERSION = 1 << 3, DILLO_CLI_LOCAL = 1 << 4, DILLO_CLI_GEOMETRY = 1 << 5, - DILLO_CLI_ERROR = 1 << 15, + DILLO_CLI_ERROR = 1 << 15 } OptID; typedef struct { diff --git a/src/html_common.hh b/src/html_common.hh index de685d46..2bb6c935 100644 --- a/src/html_common.hh +++ b/src/html_common.hh @@ -103,7 +103,7 @@ typedef enum { IN_MEDIA = 1 << 12, IN_META_HACK = 1 << 13, IN_A = 1 << 14, - IN_EOF = 1 << 15, + IN_EOF = 1 << 15 } DilloHtmlProcessingState; /* diff --git a/src/prefsparser.cc b/src/prefsparser.cc index b5ab1b17..dd4e2ac3 100644 --- a/src/prefsparser.cc +++ b/src/prefsparser.cc @@ -18,7 +18,7 @@ #include <sys/types.h> #include <stdlib.h> #include <locale.h> /* for setlocale */ -#include <math.h> /* for isinf */ +#include <math.h> /* for HUGE_VAL */ #include <limits.h> #include "prefs.h" @@ -112,12 +112,11 @@ static int parseOption(char *name, char *value, case PREFS_FRACTION_100: { double d = strtod (value, NULL); - if (isinf(d)) { - if (d > 0) - *(int*)node->pref = INT_MAX; - else - *(int*)node->pref = INT_MIN; - } else + if (d == HUGE_VAL) + *(int*)node->pref = INT_MAX; + else if (d == -HUGE_VAL) + *(int*)node->pref = INT_MIN; + else *(int*)node->pref = 100 * d; } break; diff --git a/src/xembed.cc b/src/xembed.cc index eee40e2a..fb623f1d 100644 --- a/src/xembed.cc +++ b/src/xembed.cc @@ -149,10 +149,10 @@ void Xembed::createInternal(uint32_t parent) { #else // X_PROTOCOL void -Xembed::setXembedInfo(unsigned long flags) {}; +Xembed::setXembedInfo(unsigned long flags) {} void -Xembed::sendXembedEvent(uint32_t message) {}; +Xembed::sendXembedEvent(uint32_t message) {} int Xembed::handle(int e) { |