Provide fallback of killpg function

darcs-hash:20060730205941-ac50b-ddcec32cc5ab74770b743fed3d131460ee576191.gz
This commit is contained in:
axel 2006-07-31 06:59:41 +10:00
parent e79fdcb194
commit 89d876d0f7
3 changed files with 14 additions and 1 deletions

View file

@ -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 ) )

View file

@ -25,6 +25,7 @@
#include <dirent.h>
#include <stdarg.h>
#include <limits.h>
#include <assert.h>
#if HAVE_NCURSES_H
#include <ncurses.h>
@ -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

View file

@ -376,5 +376,10 @@ extern int _nl_msg_cat_cntr;
#endif
#ifndef HAVE_KILLPG
int killpg( int pgr, int sig );
#endif
#endif