summaryrefslogtreecommitdiff
path: root/utils/utils.h
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-19 18:24:43 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-19 18:24:43 +0000
commit57676ad1c0209b3e4fee9043a3850b272fa7f05e (patch)
tree9f4ef6095a06b9a0955e2a2377fadab0aaaeaa4a /utils/utils.h
parent18b3ae0dec117ec313b83fa314a7c5578f46e223 (diff)
downloadnetsurf-57676ad1c0209b3e4fee9043a3850b272fa7f05e.tar.gz
netsurf-57676ad1c0209b3e4fee9043a3850b272fa7f05e.tar.bz2
Reworked r13532 in a cleaner way. The FLEX_ARRAY_LEN_DECL macro from utils.h should be used when declaring an empty array at end of struct.
svn path=/trunk/netsurf/; revision=13535
Diffstat (limited to 'utils/utils.h')
-rw-r--r--utils/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h
index f00ea286a..02bf75fea 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -52,6 +52,12 @@
#define PRId64 "lld"
#endif
+#if defined(__GNUC__) && (__GNUC__ < 3)
+#define FLEX_ARRAY_LEN_DECL 0
+#else
+#define FLEX_ARRAY_LEN_DECL
+#endif
+
#if defined(__HAIKU__) || defined(__BEOS__)
#define strtof(s,p) ((float)(strtod((s),(p))))
#endif