Loading CMakeLists.txt +9 −4 Original line number Diff line number Diff line Loading @@ -145,12 +145,17 @@ set(_pkg_config_private_reqs) set(_pkg_config_libs) set(_pkg_config_private_libs) check_function_exists(sqrt HAVE_SQRT) include(CheckCSourceCompiles) set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){sqrt(f);return 0;}") check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_MATH) if(NOT HAVE_SQRT) check_library_exists(m sqrt "" HAVE_LIBM_SQRT) if(NOT HAVE_LIBM_SQRT) message(FATAL_ERROR "Unable to use C math library functions (with or without -lm)") set(CMAKE_REQUIRED_LIBRARIES m) check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_LIBM_MATH) unset(CMAKE_REQUIRED_LIBRARIES) if(NOT HAVE_LIBM_MATH) message(FATAL_ERROR "Unable to use C math library functions") endif() target_link_libraries(EVPath PRIVATE m) list(APPEND _pkg_config_private_libs m) endif() Loading cmenet.c +1 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ libcmenet_LTX_non_blocking_listen(CManager cm, CMtrans_services svc, /* we're already listening */ if (port_num == 0) { /* not requesting a specific port, return what we have */ return build_listen_attrs(cm, svc, NULL, listen_info, address.port); return build_listen_attrs(cm, svc, NULL, listen_info, enet_data->listen_port); } else { printf("CMlisten_specific() requesting a specific port follows other Enet operation which initiated listen at another port. Only one listen allowed, second listen fails.\n"); return NULL; Loading evpath.h +11 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,17 @@ CMConnection_close (CMConnection conn); extern void CMConnection_add_reference (CMConnection conn); /*! * manually decrement the reference count of a connection. * * \param conn the CMConnection whose count should be decremented. * \note Used if some mechanism other than CMget_conn() is used to "share" * connection in multiple contexts so that it is closed only when all users * have closed it. */ extern void CMConnection_dereference (CMConnection conn); /*! * register a function to be called when a connection is closed. * Loading Loading
CMakeLists.txt +9 −4 Original line number Diff line number Diff line Loading @@ -145,12 +145,17 @@ set(_pkg_config_private_reqs) set(_pkg_config_libs) set(_pkg_config_private_libs) check_function_exists(sqrt HAVE_SQRT) include(CheckCSourceCompiles) set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){sqrt(f);return 0;}") check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_MATH) if(NOT HAVE_SQRT) check_library_exists(m sqrt "" HAVE_LIBM_SQRT) if(NOT HAVE_LIBM_SQRT) message(FATAL_ERROR "Unable to use C math library functions (with or without -lm)") set(CMAKE_REQUIRED_LIBRARIES m) check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_LIBM_MATH) unset(CMAKE_REQUIRED_LIBRARIES) if(NOT HAVE_LIBM_MATH) message(FATAL_ERROR "Unable to use C math library functions") endif() target_link_libraries(EVPath PRIVATE m) list(APPEND _pkg_config_private_libs m) endif() Loading
cmenet.c +1 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ libcmenet_LTX_non_blocking_listen(CManager cm, CMtrans_services svc, /* we're already listening */ if (port_num == 0) { /* not requesting a specific port, return what we have */ return build_listen_attrs(cm, svc, NULL, listen_info, address.port); return build_listen_attrs(cm, svc, NULL, listen_info, enet_data->listen_port); } else { printf("CMlisten_specific() requesting a specific port follows other Enet operation which initiated listen at another port. Only one listen allowed, second listen fails.\n"); return NULL; Loading
evpath.h +11 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,17 @@ CMConnection_close (CMConnection conn); extern void CMConnection_add_reference (CMConnection conn); /*! * manually decrement the reference count of a connection. * * \param conn the CMConnection whose count should be decremented. * \note Used if some mechanism other than CMget_conn() is used to "share" * connection in multiple contexts so that it is closed only when all users * have closed it. */ extern void CMConnection_dereference (CMConnection conn); /*! * register a function to be called when a connection is closed. * Loading