Tue Feb 18 20:53:44 2014 UTC ()
- include <sys/cdefs.h> for compiler definitions
- add a lint comment


(christos)
diff -r1.1.1.2 -r1.2 src/sys/external/bsd/compiler_rt/dist/lib/int_util.c

cvs diff -r1.1.1.2 -r1.2 src/sys/external/bsd/compiler_rt/dist/lib/Attic/int_util.c (expand / switch to unified diff)

--- src/sys/external/bsd/compiler_rt/dist/lib/Attic/int_util.c 2014/01/15 21:06:10 1.1.1.2
+++ src/sys/external/bsd/compiler_rt/dist/lib/Attic/int_util.c 2014/02/18 20:53:44 1.2
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1/* ===-- int_util.c - Implement internal utilities --------------------------=== 1/* ===-- int_util.c - Implement internal utilities --------------------------===
2 * 2 *
3 * The LLVM Compiler Infrastructure 3 * The LLVM Compiler Infrastructure
4 * 4 *
5 * This file is dual licensed under the MIT and the University of Illinois Open 5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details. 6 * Source Licenses. See LICENSE.TXT for details.
7 * 7 *
8 * ===----------------------------------------------------------------------=== 8 * ===----------------------------------------------------------------------===
9 */ 9 */
10 10#include <sys/cdefs.h>
11#include "int_util.h" 11#include "int_util.h"
12#include "int_lib.h" 12#include "int_lib.h"
13 13
14/* NOTE: The definitions in this file are declared weak because we clients to be 14/* NOTE: The definitions in this file are declared weak because we clients to be
15 * able to arbitrarily package individual functions into separate .a files. If 15 * able to arbitrarily package individual functions into separate .a files. If
16 * we did not declare these weak, some link situations might end up seeing 16 * we did not declare these weak, some link situations might end up seeing
17 * duplicate strong definitions of the same symbol. 17 * duplicate strong definitions of the same symbol.
18 * 18 *
19 * We can't use this solution for kernel use (which may not support weak), but 19 * We can't use this solution for kernel use (which may not support weak), but
20 * currently expect that when built for kernel use all the functionality is 20 * currently expect that when built for kernel use all the functionality is
21 * packaged into a single library. 21 * packaged into a single library.
22 */ 22 */
23 23
@@ -44,18 +44,19 @@ __attribute__((visibility("hidden"))) @@ -44,18 +44,19 @@ __attribute__((visibility("hidden")))
44void compilerrt_abort_impl(const char *file, int line, const char *function) { 44void compilerrt_abort_impl(const char *file, int line, const char *function) {
45 __assert_rtn(function, file, line, "libcompiler_rt abort"); 45 __assert_rtn(function, file, line, "libcompiler_rt abort");
46} 46}
47 47
48#else 48#else
49 49
50/* Get the system definition of abort() */ 50/* Get the system definition of abort() */
51#include <stdlib.h> 51#include <stdlib.h>
52 52
53#ifndef _WIN32 53#ifndef _WIN32
54__attribute__((weak)) 54__attribute__((weak))
55__attribute__((visibility("hidden"))) 55__attribute__((visibility("hidden")))
56#endif 56#endif
 57/*ARGSUSED*/
57void compilerrt_abort_impl(const char *file, int line, const char *function) { 58void compilerrt_abort_impl(const char *file, int line, const char *function) {
58 abort(); 59 abort();
59} 60}
60 61
61#endif 62#endif