summaryrefslogtreecommitdiff
path: root/mcon/U/d_memchr.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_memchr.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_memchr.U')
-rw-r--r--mcon/U/d_memchr.U17
1 files changed, 14 insertions, 3 deletions
diff --git a/mcon/U/d_memchr.U b/mcon/U/d_memchr.U
index 00b5b87..14d4e4a 100644
--- a/mcon/U/d_memchr.U
+++ b/mcon/U/d_memchr.U
@@ -12,7 +12,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:32 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memchr: Inlibc
+?MAKE:d_memchr: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memchr:
?S: This variable conditionally defines the HAS_MEMCHR symbol, which
@@ -27,6 +27,17 @@
?H:.
?LINT:set d_memchr
: see if memchr exists
-set memchr d_memchr
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char s[] = "xxx";
+ static size_t n = sizeof(s);
+ void *p;
+ p = memchr(s, 'x', n);
+ return p ? 0 : 1;
+}
+EOC
+set d_memchr
+eval $trylink