diff options
author | Lukas Larsson <[email protected]> | 2013-08-15 17:04:52 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-08-21 15:20:04 +0200 |
commit | 94d174949635cd4e641daaac0a7df98ea35f2c55 (patch) | |
tree | 1c7f6848a3ac2b2d5559c97fe1b8ac2225f1b4a0 /erts/emulator/beam/erl_driver.h | |
parent | 20e0509d4e04fada3019639bc82d78b89f06b0fc (diff) | |
download | otp-94d174949635cd4e641daaac0a7df98ea35f2c55.tar.gz otp-94d174949635cd4e641daaac0a7df98ea35f2c55.tar.bz2 otp-94d174949635cd4e641daaac0a7df98ea35f2c55.zip |
erts: Add support for static linked-in drivers
None of the OTP linked-in driver are supported
Diffstat (limited to 'erts/emulator/beam/erl_driver.h')
-rw-r--r-- | erts/emulator/beam/erl_driver.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h index e280563de1..f43f5a766e 100644 --- a/erts/emulator/beam/erl_driver.h +++ b/erts/emulator/beam/erl_driver.h @@ -365,17 +365,23 @@ typedef struct erl_drv_entry { * It must initialize a ErlDrvEntry structure and return a pointer to it. */ +#ifdef STATIC_ERLANG_DRIVER +# define ERLANG_DRIVER_NAME(NAME) NAME ## _driver_init +#else +# define ERLANG_DRIVER_NAME(NAME) driver_init +#endif + /* For windows dynamic drivers */ #ifndef ERL_DRIVER_TYPES_ONLY #if defined(__WIN32__) # define DRIVER_INIT(DRIVER_NAME) \ - __declspec(dllexport) ErlDrvEntry* driver_init(void); \ - __declspec(dllexport) ErlDrvEntry* driver_init(void) + __declspec(dllexport) ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void); \ + __declspec(dllexport) ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void) #else # define DRIVER_INIT(DRIVER_NAME) \ - ErlDrvEntry* driver_init(void); \ - ErlDrvEntry* driver_init(void) + ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void); \ + ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void) #endif #define ERL_DRV_BUSY_MSGQ_DISABLED (~((ErlDrvSizeT) 0)) |