diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2013-07-12 15:01:45 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2013-07-12 15:01:45 +0000 |
commit | daffe00d4a57c0ef6a21947a8121b8d233d8d3a5 (patch) | |
tree | 713942325bda393305edb21d46cd7f38d213aebc /graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c | |
parent | - Update to 20110724.002 (diff) |
- Trim Makefile headers
- Drop ABI versions from LIB_DEPENDS
- OptionsNG
- Pet portlint
- Switch to dynamic plist where useful
- Canonicalize patch names
- Fix DOS line endings in patch files
Diffstat (limited to 'graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c')
-rw-r--r-- | graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c b/graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c new file mode 100644 index 000000000000..853f7e98bcb7 --- /dev/null +++ b/graphics/wings-devel/files/patch-plugins__src-accel-wings__pick__drv.c @@ -0,0 +1,67 @@ + +$FreeBSD$ + +--- plugins_src/accel/wings_pick_drv.c.orig ++++ plugins_src/accel/wings_pick_drv.c +@@ -20,14 +20,19 @@ + #endif + #include <string.h> + ++#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 ++typedef int ErlDrvSizeT; ++typedef int ErlDrvSSizeT; ++#endif ++ + /* + * Interface routines. + */ + static ErlDrvData wings_file_start(ErlDrvPort port, char *buff); + static void wings_file_stop(ErlDrvData handle); +-static int control(ErlDrvData handle, unsigned int command, +- char* buff, int count, +- char** res, int res_size); ++static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, ++ char* buff, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size); + static void outputv(ErlDrvData drv_data, ErlIOVec* ev); + + /* +@@ -47,7 +52,18 @@ + NULL, /* void * that is not used (BC) */ + control, /* F_PTR control, port_control callback */ + NULL, /* F_PTR timeout, driver_set_timer callback */ +- outputv /* F_PTR outputv, reserved */ ++ outputv, /* F_PTR outputv, reserved */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ ERL_DRV_EXTENDED_MARKER, ++ ERL_DRV_EXTENDED_MAJOR_VERSION, ++ ERL_DRV_EXTENDED_MINOR_VERSION, ++ 0, ++ NULL, ++ NULL, ++ NULL + }; + + struct vertex_struct { +@@ -107,14 +123,14 @@ + * Handle commands. + */ + +-static int ++static ErlDrvSSizeT + control(ErlDrvData handle, unsigned int command, +- char* buf, int count, +- char** res, int res_size) ++ char* buf, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size) + { + switch (command) { + case 0: { /* Define matrix */ +- memcpy((void *) m, (void *) buf, count); ++ memcpy((void *) m, (void *) buf, (size_t) count); + #if 0 + { + int i, j; |