Gitweb links:
...log
http://git.netsurf-browser.org/librufl.git/shortlog/4043bcdd57ab21b1308f68db524fdaeb7c5abcd7
...commit
http://git.netsurf-browser.org/librufl.git/commit/4043bcdd57ab21b1308f68db524fdaeb7c5abcd7
...tree
http://git.netsurf-browser.org/librufl.git/tree/4043bcdd57ab21b1308f68db524fdaeb7c5abcd7
The branch, master has been updated
via 4043bcdd57ab21b1308f68db524fdaeb7c5abcd7 (commit)
via 294770f746d4bf95d04d8dce39ed05a03b2b0b29 (commit)
from a25da61adc32f94cd304d6465cb1423723b31564 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/librufl.git/commit/?id=4043bcdd57ab21b1308f68db524fdaeb7c5abcd7
commit 4043bcdd57ab21b1308f68db524fdaeb7c5abcd7
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
Tweak RISC OS host detection for new tooling.
The new toolchain has a different machine triplet, so update the
things that care about it to work either way.
diff --git a/Makefile b/Makefile
index 7bc8c9d..0af5e97 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl
WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
-ifeq ($(HOST),arm-unknown-riscos)
+ifeq ($(findstring -riscos,$(HOST)),-riscos)
WARNFLAGS := $(WARNFLAGS) -pedantic
endif
# BeOS/Haiku/AmigaOS4 standard library headers create warnings
@@ -35,7 +35,7 @@ CFLAGS := $(CFLAGS) -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500
# OSLib
ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
- ifeq ($(HOST),arm-unknown-riscos)
+ ifeq ($(findstring -riscos,$(HOST)),-riscos)
CFLAGS := $(CFLAGS) -I$(PREFIX)/include
LDFLAGS := $(LDFLAGS) -lOSLib32
TESTLDFLAGS := $(TESTLDFLAGS) -static
diff --git a/test/Makefile b/test/Makefile
index 451ea46..65c3170 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,5 +1,5 @@
# Tests
-ifeq ($(HOST),arm-unknown-riscos)
+ifeq ($(findstring -riscos,$(HOST)),-riscos)
DIR_TEST_ITEMS := $(DIR_TEST_ITEMS) \
rufl_test:rufl_test.c \
rufl_chars:rufl_chars.c
commitdiff
http://git.netsurf-browser.org/librufl.git/commit/?id=294770f746d4bf95d04d8dce39ed05a03b2b0b29
commit 294770f746d4bf95d04d8dce39ed05a03b2b0b29
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
Modernize logging
Ensure that only one copy of the storage for the log state is
needed (previously, it injected these into every compilation unit,
which now results in compiler warnings).
Replace __PRETTY_FUNCTION__ with the standardised __func__. The
output is the same in either case in our usage here (and testing
all the way back to GCC 3.4.6 yields no difference in output).
This also fixes compilation with GCC 10 (which warns about the
use of __PRETTY_FUNCTION__ in -pedantic mode).
diff --git a/src/rufl_init.c b/src/rufl_init.c
index 6c06a8f..a4fe618 100644
--- a/src/rufl_init.c
+++ b/src/rufl_init.c
@@ -45,6 +45,10 @@ bool rufl_old_font_manager = false;
static bool rufl_broken_font_enumerate_characters = false;
wimp_w rufl_status_w = 0;
char rufl_status_buffer[80];
+#if 1 /* ndef NDEBUG */
+bool rufl_log_got_start_time;
+time_t rufl_log_start_time;
+#endif
/** An entry in rufl_weight_table. */
struct rufl_weight_table_entry {
diff --git a/src/rufl_internal.h b/src/rufl_internal.h
index 8438bd8..42ed5c4 100644
--- a/src/rufl_internal.h
+++ b/src/rufl_internal.h
@@ -250,22 +250,20 @@ extern const size_t rufl_glyph_map_size;
#if 1 /*ndef NDEBUG*/
-#ifdef __CC_NORCROFT
-#define __PRETTY_FUNCTION__ __func__
-#endif
#include <time.h>
-bool log_got_start_time;
-time_t log_start_time;
+extern bool rufl_log_got_start_time;
+extern time_t rufl_log_start_time;
#define LOG(format, ...) \
do { \
- if (log_got_start_time == false) { \
- log_start_time = time(NULL); \
- log_got_start_time = true; \
+ if (rufl_log_got_start_time == false) { \
+ rufl_log_start_time = time(NULL); \
+ rufl_log_got_start_time = true; \
} \
\
fprintf(stderr,"(%.6fs) " __FILE__ " %s %i: ", \
- difftime(time(NULL), log_start_time), \
- __PRETTY_FUNCTION__, __LINE__); \
+ difftime(time(NULL), \
+ rufl_log_start_time), \
+ __func__, __LINE__); \
fprintf(stderr, format, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} while (0)
-----------------------------------------------------------------------
Summary of changes:
Makefile | 4 ++--
src/rufl_init.c | 4 ++++
src/rufl_internal.h | 18 ++++++++----------
test/Makefile | 2 +-
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index 7bc8c9d..0af5e97 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl
WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
-ifeq ($(HOST),arm-unknown-riscos)
+ifeq ($(findstring -riscos,$(HOST)),-riscos)
WARNFLAGS := $(WARNFLAGS) -pedantic
endif
# BeOS/Haiku/AmigaOS4 standard library headers create warnings
@@ -35,7 +35,7 @@ CFLAGS := $(CFLAGS) -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500
# OSLib
ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
- ifeq ($(HOST),arm-unknown-riscos)
+ ifeq ($(findstring -riscos,$(HOST)),-riscos)
CFLAGS := $(CFLAGS) -I$(PREFIX)/include
LDFLAGS := $(LDFLAGS) -lOSLib32
TESTLDFLAGS := $(TESTLDFLAGS) -static
diff --git a/src/rufl_init.c b/src/rufl_init.c
index 6c06a8f..a4fe618 100644
--- a/src/rufl_init.c
+++ b/src/rufl_init.c
@@ -45,6 +45,10 @@ bool rufl_old_font_manager = false;
static bool rufl_broken_font_enumerate_characters = false;
wimp_w rufl_status_w = 0;
char rufl_status_buffer[80];
+#if 1 /* ndef NDEBUG */
+bool rufl_log_got_start_time;
+time_t rufl_log_start_time;
+#endif
/** An entry in rufl_weight_table. */
struct rufl_weight_table_entry {
diff --git a/src/rufl_internal.h b/src/rufl_internal.h
index 8438bd8..42ed5c4 100644
--- a/src/rufl_internal.h
+++ b/src/rufl_internal.h
@@ -250,22 +250,20 @@ extern const size_t rufl_glyph_map_size;
#if 1 /*ndef NDEBUG*/
-#ifdef __CC_NORCROFT
-#define __PRETTY_FUNCTION__ __func__
-#endif
#include <time.h>
-bool log_got_start_time;
-time_t log_start_time;
+extern bool rufl_log_got_start_time;
+extern time_t rufl_log_start_time;
#define LOG(format, ...) \
do { \
- if (log_got_start_time == false) { \
- log_start_time = time(NULL); \
- log_got_start_time = true; \
+ if (rufl_log_got_start_time == false) { \
+ rufl_log_start_time = time(NULL); \
+ rufl_log_got_start_time = true; \
} \
\
fprintf(stderr,"(%.6fs) " __FILE__ " %s %i: ", \
- difftime(time(NULL), log_start_time), \
- __PRETTY_FUNCTION__, __LINE__); \
+ difftime(time(NULL), \
+ rufl_log_start_time), \
+ __func__, __LINE__); \
fprintf(stderr, format, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} while (0)
diff --git a/test/Makefile b/test/Makefile
index 451ea46..65c3170 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,5 +1,5 @@
# Tests
-ifeq ($(HOST),arm-unknown-riscos)
+ifeq ($(findstring -riscos,$(HOST)),-riscos)
DIR_TEST_ITEMS := $(DIR_TEST_ITEMS) \
rufl_test:rufl_test.c \
rufl_chars:rufl_chars.c
--
RISC OS Unicode Font Library
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]