]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/stacktrace/build/has_addr2line.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / stacktrace / build / has_addr2line.cpp
1 // Copyright Antony Polukhin, 2016-2017.
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6
7 #include <cstdlib>
8 #include <string>
9
10 #include <boost/config.hpp>
11 #include <unwind.h>
12 #include <sys/types.h>
13 #include <sys/wait.h>
14
15 int main() {
16
17 #ifdef BOOST_STACKTRACE_ADDR2LINE_LOCATION
18 std::string s = BOOST_STRINGIZE( BOOST_STACKTRACE_ADDR2LINE_LOCATION );
19 s += " -h";
20 #else
21 std::string s = "/usr/bin/addr2line -h";
22 #endif
23
24 return std::system(s.c_str());
25 }