Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xinstall Don't do the madvise(2) call if __APPLE__. ...



details:   https://anonhg.NetBSD.org/src/rev/98f90804f114
branches:  trunk
changeset: 544179:98f90804f114
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Mar 13 18:23:02 2003 +0000

description:
Don't do the madvise(2) call if __APPLE__.  Even though madvise(2)
exists on Mac OS X, and we pass valid arguments, the call always
results in EINVAL, and the warning annoys me.

diffstat:

 usr.bin/xinstall/xinstall.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f5dba32addd3 -r 98f90804f114 usr.bin/xinstall/xinstall.c
--- a/usr.bin/xinstall/xinstall.c       Thu Mar 13 17:55:57 2003 +0000
+++ b/usr.bin/xinstall/xinstall.c       Thu Mar 13 18:23:02 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xinstall.c,v 1.76 2002/12/23 06:24:15 lukem Exp $      */
+/*     $NetBSD: xinstall.c,v 1.77 2003/03/13 18:23:02 thorpej Exp $    */
 
 /*
  * Copyright (c) 1987, 1993
@@ -50,7 +50,7 @@
 #if 0
 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
 #else
-__RCSID("$NetBSD: xinstall.c,v 1.76 2002/12/23 06:24:15 lukem Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.77 2003/03/13 18:23:02 thorpej Exp $");
 #endif
 #endif /* not lint */
 
@@ -725,7 +725,7 @@
                            == MAP_FAILED) {
                                goto mmap_failed;
                        }
-#ifdef MADV_SEQUENTIAL
+#if defined(MADV_SEQUENTIAL) && !defined(__APPLE__)
                        if (madvise(p, (size_t)size, MADV_SEQUENTIAL) == -1
                            && errno != EOPNOTSUPP)
                                warnx("madvise: %s", strerror(errno));



Home | Main Index | Thread Index | Old Index