зеркало из https://github.com/github/ruby.git
Use `dllexport` as `RUBY_FUNC_EXPORTED` on Windows
This commit is contained in:
Родитель
dd8903fed7
Коммит
906a86e4de
|
@ -1761,7 +1761,7 @@ AS_IF([test "$GCC" = yes], [
|
|||
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
|
||||
rb_cv_func_exported=no
|
||||
RUBY_WERROR_FLAG([
|
||||
for mac in '__attribute__ ((__visibility__("default")))' '__declspec(dllexport)'; do
|
||||
for mac in '__declspec(dllexport)' '__attribute__ ((__visibility__("default")))'; do
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define RUBY_FUNC_EXPORTED $mac extern
|
||||
RUBY_FUNC_EXPORTED void conftest_attribute_check(void);]], [[]])],
|
||||
[rb_cv_func_exported="$mac"; break])
|
||||
|
|
5
parse.y
5
parse.y
|
@ -1568,7 +1568,7 @@ static void numparam_pop(struct parser_params *p, NODE *prev_inner);
|
|||
#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
|
||||
|
||||
#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
|
||||
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
|
||||
RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
|
||||
|
||||
#define TOKEN2ID(tok) ( \
|
||||
tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
|
||||
|
@ -8613,7 +8613,6 @@ flush_string_content(struct parser_params *p, rb_encoding *enc)
|
|||
dispatch_scan_event(p, tSTRING_CONTENT);
|
||||
}
|
||||
|
||||
RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
||||
/* this can be shared with ripper, since it's independent from struct
|
||||
* parser_params. */
|
||||
#ifndef RIPPER
|
||||
|
@ -15935,7 +15934,7 @@ count_char(const char *str, int c)
|
|||
*
|
||||
* "\"`class' keyword\"" => "`class' keyword"
|
||||
*/
|
||||
RUBY_FUNC_EXPORTED size_t
|
||||
size_t
|
||||
rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
|
||||
{
|
||||
if (*yystr == '"') {
|
||||
|
|
7
symbol.h
7
symbol.h
|
@ -100,7 +100,12 @@ sym_type(VALUE sym)
|
|||
#define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
|
||||
#define is_junk_sym(sym) (sym_type(sym)==ID_JUNK)
|
||||
|
||||
RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
||||
#ifndef RIPPER
|
||||
RUBY_FUNC_EXPORTED
|
||||
#else
|
||||
RUBY_EXTERN
|
||||
#endif
|
||||
const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
||||
|
||||
static inline int
|
||||
is_global_name_punct(const int c)
|
||||
|
|
|
@ -746,6 +746,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
|||
#define RBIMPL_ATTR_PACKED_STRUCT_END() __pragma(pack(pop))
|
||||
!endif
|
||||
#define RUBY_EXTERN extern __declspec(dllimport)
|
||||
#define RUBY_FUNC_EXPORTED extern __declspec(dllexport)
|
||||
#define RUBY_ALIGNAS(n) __declspec(align(n))
|
||||
#define RUBY_ALIGNOF __alignof
|
||||
#define HAVE_DECL_SYS_NERR 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче