summaryrefslogtreecommitdiff
path: root/internal/util.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-12-03 14:47:38 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-12-26 20:45:12 +0900
commitbf53d6c7d19f877c821901b3288d7f80955ffbb7 (patch)
tree4c4dbac564d721af8b295f55e6f81c21af8b0fbe /internal/util.h
parent3ae09b30f8ba5ff4dd148d358f51b99ae0ae6c38 (diff)
other minior internal header tweaks
These headers need no rewrite. Just add some minor tweaks, like addition of #include lines. Mainly cosmetic. TIMET_MAX_PLUS_ONE was deleted because the macro was used from only one place (directly write expression there).
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2711
Diffstat (limited to 'internal/util.h')
-rw-r--r--internal/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/util.h b/internal/util.h
index c1ba2a4323..528bee070e 100644
--- a/internal/util.h
+++ b/internal/util.h
@@ -10,6 +10,12 @@
* file COPYING are met. Consult the file for details.
* @warning DO NOT ADD RANDOM GARBAGE HERE THIS FILE IS FOR util.c
*/
+#include "ruby/config.h"
+#include <stddef.h> /* for size_t */
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
+#endif /* `#define`d in ruby/config.h) */
/* util.c */
char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);