summaryrefslogtreecommitdiff
path: root/general.h
diff options
context:
space:
mode:
Diffstat (limited to 'general.h')
-rw-r--r--general.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/general.h b/general.h
index 14cbe833..d89eec8e 100644
--- a/general.h
+++ b/general.h
@@ -110,6 +110,13 @@ extern char *strcpy __P((char *, const char *));
((TYPE_WIDTH (t) - TYPE_SIGNED (t)) * 302 / 1000 \
+ 1 + TYPE_SIGNED (t))
+/* Updated version adapted from gnulib/intprops.h, not used right now.
+ Changes the approximation of log10(2) from 302/1000 to 146/485. */
+#if 0
+#define INT_STRLEN_BOUND(t) \
+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - TYPE_SIGNED (t)) + TYPE_SIGNED(t))
+#endif
+
/* Bound on buffer size needed to represent an integer type or expression T,
including the terminating null. */
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)