Fri Jan 5 17:54:31 2018 UTC ()
Include namespace.h in GCDAProfiling.c (compiler_rt)

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global name of the following symbols:
  - fdopen -> _fdopen
  - mmap -> _mmap
  - strdup -> _strdup

Sponsored by <The NetBSD Foundation>


(kamil)
diff -r1.1.1.5 -r1.2 src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c

cvs diff -r1.1.1.5 -r1.2 src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c (expand / switch to unified diff)

--- src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c 2016/02/27 18:59:31 1.1.1.5
+++ src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c 2018/01/05 17:54:31 1.2
@@ -10,26 +10,30 @@ @@ -10,26 +10,30 @@
10|* This file implements the call back routines for the gcov profiling 10|* This file implements the call back routines for the gcov profiling
11|* instrumentation pass. Link against this library when running code through 11|* instrumentation pass. Link against this library when running code through
12|* the -insert-gcov-profiling LLVM pass. 12|* the -insert-gcov-profiling LLVM pass.
13|* 13|*
14|* We emit files in a corrupt version of GCOV's "gcda" file format. These files 14|* We emit files in a corrupt version of GCOV's "gcda" file format. These files
15|* are only close enough that LCOV will happily parse them. Anything that lcov 15|* are only close enough that LCOV will happily parse them. Anything that lcov
16|* ignores is missing. 16|* ignores is missing.
17|* 17|*
18|* TODO: gcov is multi-process safe by having each exit open the existing file 18|* TODO: gcov is multi-process safe by having each exit open the existing file
19|* and append to it. We'd like to achieve that and be thread-safe too. 19|* and append to it. We'd like to achieve that and be thread-safe too.
20|* 20|*
21\*===----------------------------------------------------------------------===*/ 21\*===----------------------------------------------------------------------===*/
22 22
 23#ifdef _LIBC
 24#include "namespace.h"
 25#endif
 26
23#include "InstrProfilingUtil.h" 27#include "InstrProfilingUtil.h"
24 28
25#include <errno.h> 29#include <errno.h>
26#include <fcntl.h> 30#include <fcntl.h>
27#include <stdio.h> 31#include <stdio.h>
28#include <stdlib.h> 32#include <stdlib.h>
29#include <string.h> 33#include <string.h>
30 34
31#if defined(_WIN32) 35#if defined(_WIN32)
32#include "WindowsMMap.h" 36#include "WindowsMMap.h"
33#else 37#else
34#include <sys/mman.h> 38#include <sys/mman.h>
35#include <sys/file.h> 39#include <sys/file.h>