aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.c
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-01-31 11:34:03 +0100
committerMicael Karlberg <[email protected]>2019-02-01 17:35:53 +0100
commit875825874d4a8d52ec5cc593f5024afc696c29df (patch)
tree630ae902108597454cb9bb1670f4c14351932c5f /erts/emulator/nifs/common/socket_util.c
parent060338c0a6904cc4aaf5226dc7fb321ad3d23862 (diff)
downloadotp-875825874d4a8d52ec5cc593f5024afc696c29df.tar.gz
otp-875825874d4a8d52ec5cc593f5024afc696c29df.tar.bz2
otp-875825874d4a8d52ec5cc593f5024afc696c29df.zip
[socket-nif] nosup expection of win32 and type(s) replacements
The nif callback functions (nif_open) now instead cause an 'nosup' exception if called (instead of badarg). The basic type uint16_t, uint32_t and int32_t (C99) replaced "own" (that is, defined by "us") types Uint16, Uint32 and Sint32. The point of this is that our Windows build system seems to be a bit lacking when it comes to types... Removed "some stuff" that was if-defed. Different solution when win32 support for sockets has been improved. Make sure the socket_*.c util modules are not included in the building for windows. OTP-15526
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.c')
-rw-r--r--erts/emulator/nifs/common/socket_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/nifs/common/socket_util.c b/erts/emulator/nifs/common/socket_util.c
index 766d3724c1..f6e4781977 100644
--- a/erts/emulator/nifs/common/socket_util.c
+++ b/erts/emulator/nifs/common/socket_util.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2018-2018. All Rights Reserved.
+ * Copyright Ericsson AB 2018-2019. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,9 +31,9 @@
#include <stddef.h>
#include "socket_int.h"
+#include "sys.h"
#include "socket_util.h"
#include "socket_dbg.h"
-#include "sys.h"
/* We don't have a "debug flag" to check here, so we
* should use the compile debug flag, whatever that is...
@@ -89,7 +89,7 @@ char* esock_encode_iov(ErlNifEnv* env,
ERL_NIF_TERM* eIOV)
{
int rem = read;
- uint16_t i;
+ Uint16 i;
BOOLEAN_T done = FALSE;
ERL_NIF_TERM a[len]; // At most this length
@@ -158,7 +158,7 @@ char* esock_decode_iov(ErlNifEnv* env,
size_t len,
ssize_t* totSize)
{
- uint16_t i;
+ Uint16 i;
ssize_t sz;
ERL_NIF_TERM elem, tail, list;