Module Name: src
Committed By: christos
Date: Tue Sep 13 19:07:44 UTC 2011
Modified Files:
src/external/bsd/bind/dist/lib/isc/include/isc: util.h
Log Message:
Some versions of linux have probably marked fwrite(3) as
__attribute__((__warn_unused_result__)) and the __builtin_expect()
use here is an attempt to silence the warning. This does not work
if the second argument of __builtin_expect() is not a constant,
but we are not linux, so instead of going through the
__builtin_constant_p() dance to correct this, just disable it for
non linux OS's.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/bind/dist/lib/isc/include/isc/util.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/bind/dist/lib/isc/include/isc/util.h
diff -u src/external/bsd/bind/dist/lib/isc/include/isc/util.h:1.5 src/external/bsd/bind/dist/lib/isc/include/isc/util.h:1.6
--- src/external/bsd/bind/dist/lib/isc/include/isc/util.h:1.5 Sun Sep 11 14:55:42 2011
+++ src/external/bsd/bind/dist/lib/isc/include/isc/util.h Tue Sep 13 15:07:44 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: util.h,v 1.5 2011/09/11 18:55:42 christos Exp $ */
+/* $NetBSD: util.h,v 1.6 2011/09/13 19:07:44 christos Exp $ */
/*
* Copyright (C) 2004-2007, 2010, 2011 Internet Systems Consortium, Inc. ("ISC")
@@ -240,7 +240,7 @@
/*%
* Prevent Linux spurious warnings
*/
-#if defined(__GNUC__) && (__GNUC__ > 3)
+#if defined(__linux__) && defined(__GNUC__) && (__GNUC__ > 3)
#define isc_util_fwrite(a, b, c, d) \
__builtin_expect(fwrite((a), (b), (c), (d)), (c))
#else