summaryrefslogtreecommitdiff
path: root/mcon/U/d_tcstpgrp.U
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
commit13158f86e3904284dce3dad36b64f07414459551 (patch)
tree12cc7b8d1b808c8c3505bb44cf067bd9ab98b1e6 /mcon/U/d_tcstpgrp.U
parent194d1db97053d853d5f81c362c461d71c05ea80e (diff)
Applied mega patch from Christian Biere to greatly improve feature detection
and make a huge step towards better support for cross-compiling. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@34 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/d_tcstpgrp.U')
-rw-r--r--mcon/U/d_tcstpgrp.U20
1 files changed, 17 insertions, 3 deletions
diff --git a/mcon/U/d_tcstpgrp.U b/mcon/U/d_tcstpgrp.U
index ba7aa42..03c2321 100644
--- a/mcon/U/d_tcstpgrp.U
+++ b/mcon/U/d_tcstpgrp.U
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:12:11 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_tcsetpgrp: Inlibc
+?MAKE:d_tcsetpgrp: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_tcsetpgrp:
?S: This variable conditionally defines the HAS_TCSETPGRP symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_tcsetpgrp
: see if tcsetpgrp exists
-set tcsetpgrp d_tcsetpgrp
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ static pid_t pid;
+ ret |= tcsetpgrp(fd, pid);
+ return ret ? 0 : 1;
+}
+EOC
+set d_tcsetpgrp
+eval $trylink