Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,11 @@ static PyObject *
signal_strsignal_impl(PyObject *module, int signalnum)
/*[clinic end generated code: output=44e12e1e3b666261 input=b77914b03f856c74]*/
{
#ifdef __HAIKU__
const char * res;
#else
char *res;
#endif

if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
Expand Down Expand Up @@ -663,7 +667,7 @@ signal_strsignal_impl(PyObject *module, int signalnum)
}
#else
errno = 0;
res = strsignal(signalnum);
res = (const char *)strsignal(signalnum);

if (errno || res == NULL || strstr(res, "Unknown signal") != NULL)
Py_RETURN_NONE;
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
Linux*|GNU*|QNX*|VxWorks*)
Linux*|GNU*|QNX*|VxWorks*|Haiku*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
FreeBSD*)
Expand Down Expand Up @@ -2805,6 +2805,7 @@ then
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
Expand Down Expand Up @@ -3098,6 +3099,9 @@ AC_SUBST(TZPATH)
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets

# Haiku system library
AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [] $LIBS)

AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
Expand Down