summaryrefslogtreecommitdiff
path: root/include/ruby/backward/2
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/backward/2')
-rw-r--r--include/ruby/backward/2/assume.h6
-rw-r--r--include/ruby/backward/2/attributes.h6
-rw-r--r--include/ruby/backward/2/bool.h6
-rw-r--r--include/ruby/backward/2/extern.h11
-rw-r--r--include/ruby/backward/2/gcc_version_since.h6
-rw-r--r--include/ruby/backward/2/inttypes.h6
-rw-r--r--include/ruby/backward/2/limits.h6
-rw-r--r--include/ruby/backward/2/long_long.h11
-rw-r--r--include/ruby/backward/2/r_cast.h6
-rw-r--r--include/ruby/backward/2/rmodule.h7
-rw-r--r--include/ruby/backward/2/stdalign.h6
-rw-r--r--include/ruby/backward/2/stdarg.h6
12 files changed, 57 insertions, 26 deletions
diff --git a/include/ruby/backward/2/assume.h b/include/ruby/backward/2/assume.h
index 2be231093b..095a43876d 100644
--- a/include/ruby/backward/2/assume.h
+++ b/include/ruby/backward/2/assume.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_ASSUME_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -37,3 +39,5 @@
# define RB_LIKELY(x) (x)
# define RB_UNLIKELY(x) (x)
#endif
+
+#endif /* RUBY_BACKWARD2_ASSUME_H */
diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h
index 0735385292..043646eb4b 100644
--- a/include/ruby/backward/2/attributes.h
+++ b/include/ruby/backward/2/attributes.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_ATTRIBUTES_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_ATTRIBUTES_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -26,8 +28,6 @@
* - A: Don't know. Don't blame me. Backward compatibility is the key here.
* I'm just preserving what they have been.
*/
-#ifndef RUBY_BACKWARD2_ATTRIBUTES_H
-#define RUBY_BACKWARD2_ATTRIBUTES_H
#include "ruby/3/config.h"
#include "ruby/3/attr/alloc_size.h"
#include "ruby/3/attr/cold.h"
diff --git a/include/ruby/backward/2/bool.h b/include/ruby/backward/2/bool.h
index 8c619b8215..b2cca2a206 100644
--- a/include/ruby/backward/2/bool.h
+++ b/include/ruby/backward/2/bool.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_BOOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_BOOL_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -31,3 +33,5 @@
#elif ! TRUE
# error TRUE must be true
#endif
+
+#endif /* RUBY_BACKWARD2_BOOL_H */
diff --git a/include/ruby/backward/2/extern.h b/include/ruby/backward/2/extern.h
index e7018342ea..697c593000 100644
--- a/include/ruby/backward/2/extern.h
+++ b/include/ruby/backward/2/extern.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_EXTERN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_EXTERN_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -24,10 +26,7 @@
* @brief Synonym of #RUBY_EXTERN.
* @deprecated #EXTERN is deprecated, use #RUBY_EXTERN instead.
*/
-#ifdef EXTERN
-# /* Stop bothering then. */
-
-#elif defined __GNUC__
+#if defined __GNUC__
# define EXTERN \
_Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \
RUBY_EXTERN
@@ -43,3 +42,5 @@
# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
#endif
+
+#endif /* RUBY_BACKWARD2_EXTERN_H */
diff --git a/include/ruby/backward/2/gcc_version_since.h b/include/ruby/backward/2/gcc_version_since.h
index 4e2abc45f9..553b982147 100644
--- a/include/ruby/backward/2/gcc_version_since.h
+++ b/include/ruby/backward/2/gcc_version_since.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_GCC_VERSION_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -31,3 +33,5 @@
((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
(RUBY3_COMPILER_VERSION_PATCH == (z))))))
#endif
+
+#endif /* RUBY_BACKWARD2_GCC_VERSION_SINCE_H */
diff --git a/include/ruby/backward/2/inttypes.h b/include/ruby/backward/2/inttypes.h
index 7e9b525a52..c6419bc7b3 100644
--- a/include/ruby/backward/2/inttypes.h
+++ b/include/ruby/backward/2/inttypes.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_INTTYPES_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_INTTYPES_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -126,3 +128,5 @@
# define PRIxSIZE PRI_SIZE_PREFIX"x"
# define PRIXSIZE PRI_SIZE_PREFIX"X"
#endif
+
+#endif /* RUBY_BACKWARD2_INTTYPES_H */
diff --git a/include/ruby/backward/2/limits.h b/include/ruby/backward/2/limits.h
index 28eb1596a9..f003d86057 100644
--- a/include/ruby/backward/2/limits.h
+++ b/include/ruby/backward/2/limits.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_LIMITS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_LIMITS_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -94,3 +96,5 @@
# define SSIZE_MAX SHRT_MAX
# define SSIZE_MIN SHRT_MIN
#endif
+
+#endif /* RUBY_BACKWARD2_LIMITS_H */
diff --git a/include/ruby/backward/2/long_long.h b/include/ruby/backward/2/long_long.h
index 29b930625e..2a9b9e7f40 100644
--- a/include/ruby/backward/2/long_long.h
+++ b/include/ruby/backward/2/long_long.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_LONG_LONG_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -25,10 +27,7 @@
*/
#include "ruby/3/config.h"
-#if defined(LONG_LONG)
-# /* Take that. */
-
-#elif RUBY3_HAS_WARNING("-Wc++11-long-long")
+#if RUBY3_HAS_WARNING("-Wc++11-long-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
RUBY3_WARNING_PUSH() \
@@ -60,3 +59,5 @@
# error Remember to attach a detailed description of your environment.
# error Thank you!
#endif
+
+#endif /* RUBY3_BACKWARD2_LONG_LONG_H */
diff --git a/include/ruby/backward/2/r_cast.h b/include/ruby/backward/2/r_cast.h
index ed529c8968..15f5339227 100644
--- a/include/ruby/backward/2/r_cast.h
+++ b/include/ruby/backward/2/r_cast.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_R_CAST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_R_CAST_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -20,8 +22,6 @@
*
* Nobody is actively using this macro.
*/
-#ifndef RUBY_BACKWARD2_R_CAST_H
-#define RUBY_BACKWARD2_R_CAST_H
#define R_CAST(st) (struct st*)
#define RMOVED(obj) (R_CAST(RMoved)(obj))
#endif /* RUBY_BACKWARD2_R_CAST_H */
diff --git a/include/ruby/backward/2/rmodule.h b/include/ruby/backward/2/rmodule.h
index bb0fc047a6..6b79636ac7 100644
--- a/include/ruby/backward/2/rmodule.h
+++ b/include/ruby/backward/2/rmodule.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_RMODULE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_RMODULE_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -22,9 +24,8 @@
* who is implementing the internals) could have used those macros for a while.
* Kept public as-is here to keep some theoretical backwards compatibility.
*/
-#ifndef RMODULE_IV_TBL
#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
#define RMODULE_SUPER(m) RCLASS_SUPER(m)
-#endif
+#endif /* RUBY_BACKWARD2_RMODULE_H */
diff --git a/include/ruby/backward/2/stdalign.h b/include/ruby/backward/2/stdalign.h
index 2d970edc9d..bdea030a41 100644
--- a/include/ruby/backward/2/stdalign.h
+++ b/include/ruby/backward/2/stdalign.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_STDALIGN_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -24,3 +26,5 @@
#undef RUBY_ALIGNOF
#define RUBY_ALIGNAS RUBY3_ALIGNAS
#define RUBY_ALIGNOF RUBY3_ALIGNOF
+
+#endif /* RUBY_BACKWARD2_STDALIGN_H */
diff --git a/include/ruby/backward/2/stdarg.h b/include/ruby/backward/2/stdarg.h
index 7b37bd4571..2270e66b77 100644
--- a/include/ruby/backward/2/stdarg.h
+++ b/include/ruby/backward/2/stdarg.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY_BACKWARD2_STDARG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_STDARG_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -41,3 +43,5 @@
#else
#define ANYARGS
#endif
+
+#endif /* RUBY_BACKWARD2_STDARG_H */