Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Mark Kettenis <kettenis@wins.uva.nl>, gdb-patches@sources.redhat.com
Subject: Re: SETPGRP and autoconf
Date: Fri, 27 Jul 2001 10:21:00 -0000	[thread overview]
Message-ID: <20010727102017.A5627@nevyn.them.org> (raw)
In-Reply-To: <3B60505D.5080304@cygnus.com>

On Thu, Jul 26, 2001 at 01:16:13PM -0400, Andrew Cagney wrote:
> native - already covered, test works
> cross debugger - N/A procfs et.al. do not need the results of the test
> canadian cross - try headers; test is against the build systems 
> build-X-host cross compiler and not the build systems build-X-build 
> native compiler.
> 
> I can't see anyone trying to canadian-cross GDB to anything but a fairly 
> modern operating system, consequently, the headers test should work.

How does this look?

Only gotcha - I regenerated configure (not included) with autoconf
2.13, and the existing one claims to be autoconf 2.13, but they have
some noticeable differences - -site-file for instance.  Is there a
particular autoconf I should be using?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2001-07-27  Daniel Jacobowitz  <drow@mvista.com>

	* configure.in: Only invoke AC_FUNC_SETPGRP if not cross-compiling.
	Check for SETPGRP_VOID separately if cross-compiling and ISO C
	headers are available.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.68
diff -u -r1.68 configure.in
--- configure.in	2001/07/27 16:35:27	1.68
+++ configure.in	2001/07/27 17:14:08
@@ -134,7 +134,24 @@
 AC_CHECK_FUNCS(setpgid setpgrp sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
 AC_FUNC_VFORK
 AC_FUNC_ALLOCA
-AC_FUNC_SETPGRP
+dnl AC_FUNC_SETPGRP does not work if cross compiling
+dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
+if test "$cross_compiling" = no; then
+  AC_FUNC_SETPGRP
+else
+  AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void,
+    [AC_TRY_COMPILE([
+#include <unistd.h>
+], [
+  if (setpgrp(1,1) == -1)
+    exit (0);
+  else
+    exit (1);
+], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
+if test $ac_cv_func_setpgrp_void = yes; then
+  AC_DEFINE(SETPGRP_VOID, 1)
+fi
+fi
 
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.


       reply	other threads:[~2001-07-27 10:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010725162420.A13860@nevyn.them.org>
     [not found] ` <200107261040.f6QAe2T05377@delius.kettenis.local>
     [not found]   ` <20010726084450.A2941@nevyn.them.org>
     [not found]     ` <3B60505D.5080304@cygnus.com>
2001-07-27 10:21       ` Daniel Jacobowitz [this message]
2001-07-27 13:09         ` Andrew Cagney
2001-07-27 13:33         ` Andrew Cagney
2001-07-27 13:42           ` Daniel Jacobowitz
2001-07-30 15:09           ` Daniel Jacobowitz
2001-07-30 15:48             ` Andrew Cagney
2001-07-30 15:52               ` Daniel Jacobowitz
2001-07-30 15:58                 ` Andrew Cagney
2001-07-30 15:59                   ` Daniel Jacobowitz
2001-07-31  8:51                     ` Andrew Cagney
2001-08-02 14:31                       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010727102017.A5627@nevyn.them.org \
    --to=dmj+@andrew.cmu.edu \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@wins.uva.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox