* configure.in (AC_CHECK_FUNCS): Add setpggrp.

(AC_FUNC_SETPGRP): Add.
* aclocal.m4, configure, config.in: Regenerated.
* inflow.c (gdb_setpgid): Get rid of NEED_POSIX_SETPGID and
SETPGRP_ARGS.  Always use setpgid if it is available, fall back on
setpgrp if it isn't.  Use SETPGRP_VOID (defined by autoconf) to
distinguish between the two setpgrp flavours.
* config/xm-sysv4.h, config/arm/xm-linux.h,
config/i386/xm-i386aix.h, config/i386/xm-sco.h,
config/i386/xm-linux.h, config/i386/xm-ptx.h,
config/m68k/xm-linux.h, config/powerpc/xm-linux.h,
config/sparc/xm-linux.h, config/sparc/xm-sun4sol2.h,
config/ia64/xm-linux.h (NEED_POSIX_SETPGID): Remove.
* config/rs6000/xm-rs6000.h (SETPGRP_ARGS): Remove.
This commit is contained in:
Mark Kettenis 2001-07-23 19:21:57 +00:00
parent 413eca6f96
commit 0200359f12
18 changed files with 456 additions and 428 deletions

View File

@ -1,3 +1,20 @@
2001-07-23 Mark Kettenis <kettenis@gnu.org>
* configure.in (AC_CHECK_FUNCS): Add setpggrp.
(AC_FUNC_SETPGRP): Add.
* aclocal.m4, configure, config.in: Regenerated.
* inflow.c (gdb_setpgid): Get rid of NEED_POSIX_SETPGID and
SETPGRP_ARGS. Always use setpgid if it is available, fall back on
setpgrp if it isn't. Use SETPGRP_VOID (defined by autoconf) to
distinguish between the two setpgrp flavours.
* config/xm-sysv4.h, config/arm/xm-linux.h,
config/i386/xm-i386aix.h, config/i386/xm-sco.h,
config/i386/xm-linux.h, config/i386/xm-ptx.h,
config/m68k/xm-linux.h, config/powerpc/xm-linux.h,
config/sparc/xm-linux.h, config/sparc/xm-sun4sol2.h,
config/ia64/xm-linux.h (NEED_POSIX_SETPGID): Remove.
* config/rs6000/xm-rs6000.h (SETPGRP_ARGS): Remove.
2001-07-23 Eli Zaretskii <eliz@is.elta.co.il>
* go32-nat.c (read_memory_region): Set the granularity bit of the

3
gdb/aclocal.m4 vendored
View File

@ -1,7 +1,6 @@
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
dnl Free Software Foundation, Inc.
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -41,9 +41,15 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@ -229,6 +235,9 @@
/* Define if you have the setpgid function. */
#undef HAVE_SETPGID
/* Define if you have the setpgrp function. */
#undef HAVE_SETPGRP
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION

View File

@ -27,8 +27,6 @@
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -29,6 +29,3 @@
#define HAVE_SGTTY
#include <limits.h>
/* Use setpgid instead of setpgrp on AIX */
#define NEED_POSIX_SETPGID

View File

@ -38,6 +38,3 @@
So we use dots instead. This item must be coordinated with G++. */
#undef CPLUS_MARKER
#define CPLUS_MARKER '.'
/* Use setpgid instead of setpgrp on SCO */
#define NEED_POSIX_SETPGID

View File

@ -26,8 +26,6 @@
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -35,8 +35,6 @@
#define HAVE_TERMIOS
#define USG
#define NEED_POSIX_SETPGID
#define USE_O_NOCTTY
#define HOST_BYTE_ORDER LITTLE_ENDIAN

View File

@ -27,8 +27,6 @@
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -29,8 +29,6 @@
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -27,8 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -64,10 +64,6 @@
#define vfork fork
/* Setpgrp() takes arguments, unlike ordinary Sys V's. */
#define SETPGRP_ARGS 1
/* Signal handler for SIGWINCH `window size changed'. */
#define SIGWINCH_HANDLER aix_resizewindow

View File

@ -30,8 +30,6 @@
#define U_REGS_OFFSET 0
#define NEED_POSIX_SETPGID
/* Need R_OK etc, but USG isn't defined. */
#include <unistd.h>

View File

@ -31,9 +31,6 @@
#undef DO_DEFERRED_STORES
#undef CLEAR_DEFERRED_STORES
/* May be needed, may be not? From Pace Willisson's port. FIXME. */
#define NEED_POSIX_SETPGID
/* solaris doesn't have siginterrupt, though it has sigaction; however,
in this case siginterrupt would just be setting the default. */
#define NO_SIGINTERRUPT

View File

@ -28,10 +28,6 @@
#define USG
/* Use setpgid(0,0) to run inferior in a separate process group */
#define NEED_POSIX_SETPGID
/* We have to include these files now, so that GDB will not make
competing definitions in defs.h. */
#include <limits.h>

802
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -131,9 +131,10 @@ AC_HEADER_STAT
AC_C_CONST
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
AC_CHECK_FUNCS(setpgid setpgrp sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
AC_FUNC_VFORK
AC_FUNC_ALLOCA
AC_FUNC_SETPGRP
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.

View File

@ -709,21 +709,24 @@ gdb_setpgid (void)
if (job_control)
{
#if defined (NEED_POSIX_SETPGID) || (defined (HAVE_TERMIOS) && defined (HAVE_SETPGID))
/* setpgid (0, 0) is supposed to work and mean the same thing as
this, but on Ultrix 4.2A it fails with EPERM (and
#if defined (HAVE_TERMIOS) || defined (TIOCGPGRP)
#ifdef HAVE_SETPGID
/* The call setpgid (0, 0) is supposed to work and mean the same
thing as this, but on Ultrix 4.2A it fails with EPERM (and
setpgid (getpid (), getpid ()) succeeds). */
retval = setpgid (getpid (), getpid ());
#else
#if defined (TIOCGPGRP)
#if defined(USG) && !defined(SETPGRP_ARGS)
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
retval = setpgrp ();
#else
retval = setpgrp (getpid (), getpid ());
#endif /* USG */
#endif /* TIOCGPGRP. */
#endif /* NEED_POSIX_SETPGID */
#endif
#endif /* HAVE_SETPGRP */
#endif /* HAVE_SETPGID */
#endif /* defined (HAVE_TERMIOS) || defined (TIOCGPGRP) */
}
return retval;
}