aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-10-27 15:48:19 +0200
committerSverker Eriksson <[email protected]>2011-10-27 15:49:56 +0200
commit7738a364192d95e82e45349b99dd177c660fb314 (patch)
tree0fea0aaf1f1a64a06121e62c0fd58dcae047398d /erts/emulator/beam
parentd76f146406eff8650969253708291c98a4110351 (diff)
downloadotp-7738a364192d95e82e45349b99dd177c660fb314.tar.gz
otp-7738a364192d95e82e45349b99dd177c660fb314.tar.bz2
otp-7738a364192d95e82e45349b99dd177c660fb314.zip
erts: Make erl_nif.h compile with gcc on Windows
and some added comments
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_nif_api_funcs.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h
index 0753c56c9b..6396af09d0 100644
--- a/erts/emulator/beam/erl_nif_api_funcs.h
+++ b/erts/emulator/beam/erl_nif_api_funcs.h
@@ -267,7 +267,11 @@ ERL_NIF_API_FUNC_DECL(int,enif_is_number,(ErlNifEnv*, ERL_NIF_TERM term));
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !(defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
+
+/* Inline functions for compile time type checking of arguments to
+ variadic functions.
+*/
# define ERL_NIF_INLINE __inline__
@@ -453,7 +457,7 @@ static ERL_NIF_INLINE ERL_NIF_TERM enif_make_list9(ErlNifEnv* env,
# undef ERL_NIF_INLINE
-#else
+#else /* fallback with macros */
#ifndef enif_make_list1
# define enif_make_list1(ENV,E1) enif_make_list(ENV,1,E1)
@@ -476,7 +480,7 @@ static ERL_NIF_INLINE ERL_NIF_TERM enif_make_list9(ErlNifEnv* env,
# define enif_make_tuple9(ENV,E1,E2,E3,E4,E5,E6,E7,E8,E9) enif_make_tuple(ENV,9,E1,E2,E3,E4,E5,E6,E7,E8,E9)
#endif
-#endif /* defined(__GNUC__) */
+#endif /* __GNUC__ && !WIN32 */
#ifndef enif_make_pid