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 /src | |
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>
Diffstat (limited to 'src')
-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 |
6 files changed, 19 insertions, 20 deletions
@@ -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) { |