summaryrefslogtreecommitdiff
path: root/include/ruby/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/util.h')
-rw-r--r--include/ruby/util.h68
1 files changed, 53 insertions, 15 deletions
diff --git a/include/ruby/util.h b/include/ruby/util.h
index af022dacbd..3fecba8ebc 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -1,20 +1,51 @@
-#ifndef RUBY_UTIL_H /*-*-C++-*-vi:se ft=cpp:*/
+/**********************************************************************
+
+ util.h -
+
+ $Author$
+ created at: Thu Mar 9 11:55:53 JST 1995
+
+ Copyright (C) 1993-2007 Yukihiro Matsumoto
+
+**********************************************************************/
+
+#ifndef RUBY_UTIL_H
#define RUBY_UTIL_H 1
-/**
- * @file
- * @author $Author$
- * @date Thu Mar 9 11:55:53 JST 1995
- * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
- * @copyright This file is a part of the programming language Ruby.
- * Permission is hereby granted, to either redistribute and/or
- * modify this file, provided that the conditions mentioned in the
- * file COPYING are met. Consult the file for details.
- */
-#include "ruby/internal/config.h"
-#include "ruby/internal/dllexport.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#if 0
+} /* satisfy cc-mode */
+#endif
+#endif
+
#include "ruby/defines.h"
+#ifdef RUBY_EXTCONF_H
+#include RUBY_EXTCONF_H
+#endif
-RBIMPL_SYMBOL_EXPORT_BEGIN()
+#ifndef _
+#ifdef __cplusplus
+# ifndef HAVE_PROTOTYPES
+# define HAVE_PROTOTYPES 1
+# endif
+# ifndef HAVE_STDARG_PROTOTYPES
+# define HAVE_STDARG_PROTOTYPES 1
+# endif
+#endif
+#ifdef HAVE_PROTOTYPES
+# define _(args) args
+#else
+# define _(args) ()
+#endif
+#ifdef HAVE_STDARG_PROTOTYPES
+# define __(args) args
+#else
+# define __(args) ()
+#endif
+#endif
+
+RUBY_SYMBOL_EXPORT_BEGIN
#define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999)
/* an approximation of ceil(n * log10(2)), up to 65536 at least */
@@ -46,6 +77,13 @@ double ruby_strtod(const char *, char **);
void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
-RBIMPL_SYMBOL_EXPORT_END()
+RUBY_SYMBOL_EXPORT_END
+
+#if defined(__cplusplus)
+#if 0
+{ /* satisfy cc-mode */
+#endif
+} /* extern "C" { */
+#endif
#endif /* RUBY_UTIL_H */