diff --git a/configure.ac b/configure.ac index 4c2adcc66..f957ce5ad 100644 --- a/configure.ac +++ b/configure.ac @@ -259,7 +259,7 @@ AC_CHECK_HEADER([regex.h], # Check for presense of various functions AC_CHECK_FUNCS( gettext wcsdup wcsndup wcslen wcscasecmp wcsncasecmp fwprintf ) AC_CHECK_FUNCS( futimes wcwidth wcswidth getopt_long wcstok fputwc fgetwc ) -AC_CHECK_FUNCS( wcstol dcgettext wcslcat wcslcpy lrand48_r) +AC_CHECK_FUNCS( wcstol dcgettext wcslcat wcslcpy lrand48_r killpg) # The Makefile also needs to know if we have gettext, so it knows if the translations should be installed. AC_CHECK_FUNC( gettext, AC_SUBST( HAVE_GETTEXT, 1 ), AC_SUBST( HAVE_GETTEXT, 0 ) ) diff --git a/fallback.c b/fallback.c index 3167f4608..41f5a886f 100644 --- a/fallback.c +++ b/fallback.c @@ -25,6 +25,7 @@ #include #include #include +#include #if HAVE_NCURSES_H #include @@ -1076,3 +1077,10 @@ int _nl_msg_cat_cntr=0; #endif +#ifndef HAVE_KILLPG +int killpg( int pgr, int sig ) +{ + assert( pgr > 0 ); + return kill( -pgr, sig ); +} +#endif diff --git a/fallback.h b/fallback.h index d9a119a82..c87145a18 100644 --- a/fallback.h +++ b/fallback.h @@ -376,5 +376,10 @@ extern int _nl_msg_cat_cntr; #endif + +#ifndef HAVE_KILLPG +int killpg( int pgr, int sig ); +#endif + #endif