aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/port_bif_SUITE_data
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-07 11:15:58 +0100
committerBjörn Gustavsson <[email protected]>2011-12-09 11:46:27 +0100
commitbe84eaa111299aa575cde2c2bb9f88fb11274025 (patch)
tree4a3a48179108d10f3506c7152a91084d3fba0e16 /erts/emulator/test/port_bif_SUITE_data
parent730d92a26a92eec601689c62e914371227dc4238 (diff)
downloadotp-be84eaa111299aa575cde2c2bb9f88fb11274025.tar.gz
otp-be84eaa111299aa575cde2c2bb9f88fb11274025.tar.bz2
otp-be84eaa111299aa575cde2c2bb9f88fb11274025.zip
port_bif_SUITE_data/control_drv.c: Conform to updated driver API
Also include <string.h> to include a prototype for memcpy().
Diffstat (limited to 'erts/emulator/test/port_bif_SUITE_data')
-rw-r--r--erts/emulator/test/port_bif_SUITE_data/control_drv.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/erts/emulator/test/port_bif_SUITE_data/control_drv.c b/erts/emulator/test/port_bif_SUITE_data/control_drv.c
index e9f57a887a..b937a8bb15 100644
--- a/erts/emulator/test/port_bif_SUITE_data/control_drv.c
+++ b/erts/emulator/test/port_bif_SUITE_data/control_drv.c
@@ -1,13 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "erl_driver.h"
static ErlDrvPort erlang_port;
static ErlDrvData control_start(ErlDrvPort, char*);
static void control_stop(ErlDrvData);
-static void control_read(ErlDrvData, char*, int);
-static int control_control(ErlDrvData, unsigned int, char*, int, char**, int);
+static void control_read(ErlDrvData, char*, ErlDrvSizeT);
+static ErlDrvSSizeT control_control(ErlDrvData, unsigned int, char*,
+ ErlDrvSizeT, char**, ErlDrvSizeT);
static ErlDrvEntry control_driver_entry =
{
@@ -21,9 +23,19 @@ static ErlDrvEntry control_driver_entry =
NULL,
NULL,
control_control,
+ NULL, /* timeout */
+ NULL, /* outputv */
+ NULL, /* ready_async */
+ NULL,
+ NULL,
+ NULL,
+ ERL_DRV_EXTENDED_MARKER,
+ ERL_DRV_EXTENDED_MAJOR_VERSION,
+ ERL_DRV_EXTENDED_MINOR_VERSION,
+ 0,
+ NULL,
NULL,
NULL,
- NULL
};
DRIVER_INIT(control_drv)
@@ -41,7 +53,7 @@ static ErlDrvData control_start(ErlDrvPort port,char *buf)
return (ErlDrvData)port;
}
-static void control_read(ErlDrvData port, char *buf, int count)
+static void control_read(ErlDrvData port, char *buf, ErlDrvSizeT count)
{
driver_output(erlang_port, buf, count);
}
@@ -51,8 +63,9 @@ static void control_stop(ErlDrvData port)
erlang_port = (ErlDrvPort)-1;
}
-static int control_control(ErlDrvData port, unsigned command, char* buf, int count,
- char** res, int res_size)
+static ErlDrvSSizeT control_control(ErlDrvData port, unsigned command,
+ char* buf, ErlDrvSizeT count,
+ char** res, ErlDrvSizeT res_size)
{
switch (command) {
case 'e':