diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-11-27 11:55:39 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-11-27 11:55:39 +0000 |
commit | 13158f86e3904284dce3dad36b64f07414459551 (patch) | |
tree | 12cc7b8d1b808c8c3505bb44cf067bd9ab98b1e6 /mcon/U/d_munmap.U | |
parent | 194d1db97053d853d5f81c362c461d71c05ea80e (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_munmap.U')
-rw-r--r-- | mcon/U/d_munmap.U | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/mcon/U/d_munmap.U b/mcon/U/d_munmap.U index d1cc5a0..3ce01ec 100644 --- a/mcon/U/d_munmap.U +++ b/mcon/U/d_munmap.U @@ -12,7 +12,7 @@ ?RCS: Revision 3.0.1.1 1993/12/15 08:19:22 ram ?RCS: patch15: created ?RCS: -?MAKE:d_munmap: Inlibc +?MAKE:d_munmap: Trylink cat i_sysmman ?MAKE: -pick add $@ %< ?S:d_munmap: ?S: This variable conditionally defines HAS_MUNMAP if munmap() is @@ -26,6 +26,20 @@ ?H:. ?LINT:set d_munmap : see if munmap exists -set munmap d_munmap -eval $inlibc +$cat >try.c <<EOC +#$i_sysmman I_SYS_MMAN +#ifdef I_SYS_MMAN +#include <sys/mman.h> +#endif +int main(void) +{ + static int ret; + static void *addr; + static size_t len; + ret |= munmap(addr, len); + return ret ? 0 : 1; +} +EOC +set d_munmap +eval $trylink |