source: EcnlProtoTool/trunk/mruby-1.3.0/include/mruby/common.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 1.4 KB
Line 
1/*
2**"common.h - mruby common platform definition"
3**
4** See Copyright Notice in mruby.h
5*/
6
7#ifndef MRUBY_COMMON_H
8#define MRUBY_COMMON_H
9
10
11#ifdef __cplusplus
12#ifdef MRB_ENABLE_CXX_ABI
13#define MRB_BEGIN_DECL
14#define MRB_END_DECL
15#else
16# define MRB_BEGIN_DECL extern "C" {
17# define MRB_END_DECL }
18#endif
19#else
20/** Start declarations in C mode */
21# define MRB_BEGIN_DECL
22/** End declarations in C mode */
23# define MRB_END_DECL
24#endif
25
26/**
27 * Shared compiler macros
28 */
29MRB_BEGIN_DECL
30
31/** Declare a function that never returns. */
32#if __STDC_VERSION__ >= 201112L
33# define mrb_noreturn _Noreturn
34#elif defined __GNUC__ && !defined __STRICT_ANSI__
35# define mrb_noreturn __attribute__((noreturn))
36#elif defined _MSC_VER
37# define mrb_noreturn __declspec(noreturn)
38#else
39# define mrb_noreturn
40#endif
41
42/** Mark a function as deprecated. */
43#if defined __GNUC__ && !defined __STRICT_ANSI__
44# define mrb_deprecated __attribute__((deprecated))
45#elif defined _MSC_VER
46# define mrb_deprecated __declspec(deprecated)
47#else
48# define mrb_deprecated
49#endif
50
51/** Declare a function as always inlined. */
52#if defined(_MSC_VER)
53# define MRB_INLINE static __inline
54#else
55# define MRB_INLINE static inline
56#endif
57
58
59/** Declare a public MRuby API function. */
60#if defined(MRB_BUILD_AS_DLL)
61#if defined(MRB_CORE) || defined(MRB_LIB)
62# define MRB_API __declspec(dllexport)
63#else
64# define MRB_API __declspec(dllimport)
65#endif
66#else
67# define MRB_API extern
68#endif
69
70MRB_END_DECL
71
72#endif /* MRUBY_COMMON_H */
Note: See TracBrowser for help on using the repository browser.