Closed c-bik closed 5 years ago
@acautin Can you please try once more with Mac?
@c-bik this is how it looks now in OS X:
cd c_src/odpi && make
make[1]: Nothing to be done for `all'.
gcc -o priv/dpi_nif.so -Ic_src -I"/Users/agustin/kerl/20.2/erts-9.2/include" -I"c_src/odpi/include" -O2 -ggdb -Wall -fPIC -std=c11 -dynamiclib c_src/dpiConn_nif.c c_src/dpiContext_nif.c c_src/dpiData_nif.c c_src/dpiQueryInfo_nif.c c_src/dpiStmt_nif.c c_src/dpiVar_nif.c c_src/dpi_nif.c -Lc_src/odpi/lib -shared -lodpic -flat_namespace -undefined suppress
c_src/dpiData_nif.c:187:39: warning: incompatible pointer types passing 'int64_t *' (aka 'long long *') to parameter of type 'long *' [-Wincompatible-pointer-types]
if (!enif_get_int64(env, argv[1], &amount))
^~~~~~~
/Users/agustin/kerl/20.2/erts-9.2/include/erl_nif_api_funcs.h:104:79: note: passing argument to parameter 'ip' here
ERL_NIF_API_FUNC_DECL(int,enif_get_long,(ErlNifEnv*, ERL_NIF_TERM term, long* ip));
^
1 warning generated.
@acautin
@c-bik this is how it looks now in OS X:
cd c_src/odpi && make make[1]: Nothing to be done for `all'. gcc -o priv/dpi_nif.so -Ic_src -I"/Users/agustin/kerl/20.2/erts-9.2/include" -I"c_src/odpi/include" -O2 -ggdb -Wall -fPIC -std=c11 -dynamiclib c_src/dpiConn_nif.c c_src/dpiContext_nif.c c_src/dpiData_nif.c c_src/dpiQueryInfo_nif.c c_src/dpiStmt_nif.c c_src/dpiVar_nif.c c_src/dpi_nif.c -Lc_src/odpi/lib -shared -lodpic -flat_namespace -undefined suppress c_src/dpiData_nif.c:187:39: warning: incompatible pointer types passing 'int64_t *' (aka 'long long *') to parameter of type 'long *' [-Wincompatible-pointer-types] if (!enif_get_int64(env, argv[1], &amount)) ^~~~~~~ /Users/agustin/kerl/20.2/erts-9.2/include/erl_nif_api_funcs.h:104:79: note: passing argument to parameter 'ip' here ERL_NIF_API_FUNC_DECL(int,enif_get_long,(ErlNifEnv*, ERL_NIF_TERM term, long* ip)); ^ 1 warning generated.
It seems ERL_NIF_TERM enif_make_int64(ErlNifEnv* env, ErlNifSInt64 i)
is internally mapped to enif_get_long(ErlNifEnv*, ERL_NIF_TERM term, long* ip)
where (long *) != (int64_t *)
(in Mac).
Unfortunately ErlNifSInt64
isn't public (not with the current Erlang version anyway).
Perhaps I can't fix this one yet, have to wait for erlang version upgrade and revisit. @acautin Can you please create this into a issue?
and if there aren't anything else, please approve too
@acautin and @KarlKeiser resolved some merge conflicts with master, can you please test?
@acautin
Also with
-O2
in CentOs6