aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-03-20 19:01:11 +0100
committerRickard Green <[email protected]>2014-03-21 13:24:40 +0100
commitbf3222f10edbd1f6a5186c8fb35c29900ad0665f (patch)
treefa761309c15de7996634a9474919c9621c126336 /erts/emulator/beam/erl_nif.h
parent3c06b5b3cdde72453d97910889e38e91c1dd4870 (diff)
downloadotp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.gz
otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.bz2
otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.zip
Introduce minimum allowed major driver and nif versions on load
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index c12ba4d554..5b93c2398e 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -46,6 +46,18 @@
#define ERL_NIF_MAJOR_VERSION 2
#define ERL_NIF_MINOR_VERSION 6
+/*
+ * The emulator will refuse to load a nif-lib with a major version
+ * lower than ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD. The load
+ * may however fail if user have not removed use of deprecated
+ * symbols.
+ *
+ * The ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD have to allow
+ * loading of nif-libs built at least two major OTP releases
+ * ago.
+ */
+#define ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD 2
+
#include <stdlib.h>
#ifdef SIZEOF_CHAR