Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed May 30, 2023
1 parent 6c2009c commit 9825b02
Showing 1 changed file with 1 addition and 51 deletions.
52 changes: 1 addition & 51 deletions st2.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,7 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
#include "ruby/config.h"

/* From include/ruby/internal/has/warning.h */
#if defined(__has_warning)
# define RBIMPL_HAS_WARNING(_) __has_warning(_)
#else
# define RBIMPL_HAS_WARNING(_) 0
#endif


/* From include/ruby/backward/2/long_long.h */
#if defined(__DOXYGEN__)
# /** @cond INTERNAL_MACRO */
# define HAVE_LONG_LONG 1
# define HAVE_TRUE_LONG_LONG 1
# /** @endcond */
# /** @deprecated Just use `long long` directly. */
# define LONG_LONG long long.

#elif RBIMPL_HAS_WARNING("-Wc++11-long-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
RBIMPL_WARNING_PUSH() \
RBIMPL_WARNING_IGNORED(-Wc++11-long-long) \
long long \
RBIMPL_WARNING_POP()

#elif RBIMPL_HAS_WARNING("-Wlong-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
RBIMPL_WARNING_PUSH() \
RBIMPL_WARNING_IGNORED(-Wlong-long) \
long long \
RBIMPL_WARNING_POP()

#elif defined(HAVE_LONG_LONG)
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG long long

#elif SIZEOF___INT64 > 0
# define HAVE_LONG_LONG 1
# define LONG_LONG __int64
# undef SIZEOF_LONG_LONG
# define SIZEOF_LONG_LONG SIZEOF___INT64

#else
# error Hello! Ruby developers believe this message must not happen.
# error If you encounter this message, can you file a bug report?
# error Remember to attach a detailed description of your environment.
# error Thank you!
#endif

#include "ruby/backward/2/long_long.h"

RUBY_SYMBOL_EXPORT_BEGIN

Expand Down

0 comments on commit 9825b02

Please sign in to comment.