Skip to content

Commit

Permalink
removed unnecessary HAVE_DISALLOW_SIGNAL_DURING_SENDING
Browse files Browse the repository at this point in the history
  • Loading branch information
vasiliyk committed Oct 23, 2024
1 parent 0e0ff0e commit 073efc6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ check_symbol_exists(SO_NOSIGPIPE "sys/socket.h" HAVE_SO_NOSIGPIPE)
# Check if MSG_NOSIGNAL exists
check_symbol_exists(MSG_NOSIGNAL "sys/socket.h" HAVE_MSG_NOSIGNAL)

if(HAVE_SO_NOSIGPIPE OR HAVE_MSG_NOSIGNAL)
set(HAVE_DISALLOW_SIGNAL_DURING_SENDING TRUE)
endif()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(SUPPORT_ABSTRACT_SOCKET_NAMES TRUE)
list(APPEND STUMPLESS_SOURCES ${PROJECT_SOURCE_DIR}/src/config/abstract_socket_names_supported.c)
Expand Down
4 changes: 3 additions & 1 deletion include/private/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
#cmakedefine HAVE_VSNPRINTF_S 1
#cmakedefine HAVE_WCSRTOMBS_S 1
#cmakedefine HAVE_WCSTOMBS_S 1
#cmakedefine HAVE_SO_NOSIGPIPE 1
#cmakedefine HAVE_MSG_NOSIGNAL 1


/* function support checks */
#cmakedefine SUPPORT_ABSTRACT_SOCKET_NAMES 1
#cmakedefine HAVE_DISALLOW_SIGNAL_DURING_SENDING 1
#cmakedefine SUPPORT_GETHOSTBYNAME 1
#cmakedefine SUPPORT_UNISTD_SYSCONF_GETPAGESIZE 1
#cmakedefine SUPPORT_WINDOWS_GET_NOW 1
Expand Down
12 changes: 4 additions & 8 deletions include/private/config/wrapper/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,10 @@
# define config_get_local_socket_name no_abstract_socket_names_get_local_socket_name
# endif

# ifdef HAVE_DISALLOW_SIGNAL_DURING_SENDING
# if defined(__APPLE__)
# define config_disallow_signal_during_sending_flag SO_NOSIGPIPE
# elif defined(__linux__)
# define config_disallow_signal_during_sending_flag MSG_NOSIGNAL
# elif defined(unix) || defined(__unix__)
# define config_disallow_signal_during_sending_flag MSG_NOSIGNAL
# endif
# ifdef HAVE_SO_NOSIGPIPE
# define config_disallow_signal_during_sending_flag SO_NOSIGPIPE
# elif defined(HAVE_MSG_NOSIGNAL)
# define config_disallow_signal_during_sending_flag MSG_NOSIGNAL
# endif

#endif /* __STUMPLESS_PRIVATE_CONFIG_WRAPPER_SOCKET_H */

0 comments on commit 073efc6

Please sign in to comment.