1 1.1 mrg /* backtrace-supported.h.in -- Whether stack backtrace is supported. 2 1.1 mrg Copyright (C) 2012-2013 Free Software Foundation, Inc. 3 1.1 mrg Written by Ian Lance Taylor, Google. 4 1.1 mrg 5 1.1 mrg Redistribution and use in source and binary forms, with or without 6 1.1 mrg modification, are permitted provided that the following conditions are 7 1.1 mrg met: 8 1.1 mrg 9 1.1 mrg (1) Redistributions of source code must retain the above copyright 10 1.1 mrg notice, this list of conditions and the following disclaimer. 11 1.1 mrg 12 1.1 mrg (2) Redistributions in binary form must reproduce the above copyright 13 1.1 mrg notice, this list of conditions and the following disclaimer in 14 1.1 mrg the documentation and/or other materials provided with the 15 1.1 mrg distribution. 16 1.1 mrg 17 1.1 mrg (3) The name of the author may not be used to 18 1.1 mrg endorse or promote products derived from this software without 19 1.1 mrg specific prior written permission. 20 1.1 mrg 21 1.1 mrg THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 1.1 mrg IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 1.1 mrg WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 1.1 mrg DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 1.1 mrg INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 1.1 mrg (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 1.1 mrg SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 1.1 mrg HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 1.1 mrg STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 1.1 mrg IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 1.1 mrg POSSIBILITY OF SUCH DAMAGE. */ 32 1.1 mrg 33 1.1 mrg /* The file backtrace-supported.h.in is used by configure to generate 34 1.1 mrg the file backtrace-supported.h. The file backtrace-supported.h may 35 1.1 mrg be #include'd to see whether the backtrace library will be able to 36 1.1 mrg get a backtrace and produce symbolic information. */ 37 1.1 mrg 38 1.1 mrg 39 1.1 mrg /* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library 40 1.1 mrg should work, 0 if it will not. Libraries may #include this to make 41 1.1 mrg other arrangements. */ 42 1.1 mrg 43 1.1 mrg #define BACKTRACE_SUPPORTED @BACKTRACE_SUPPORTED@ 44 1.1 mrg 45 1.1 mrg /* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace 46 1.1 mrg library will call malloc as it works, 0 if it will call mmap 47 1.1 mrg instead. This may be used to determine whether it is safe to call 48 1.1 mrg the backtrace functions from a signal handler. In general this 49 1.1 mrg only applies to calls like backtrace and backtrace_pcinfo. It does 50 1.1 mrg not apply to backtrace_simple, which never calls malloc. It does 51 1.1 mrg not apply to backtrace_print, which always calls fprintf and 52 1.1 mrg therefore malloc. */ 53 1.1 mrg 54 1.1 mrg #define BACKTRACE_USES_MALLOC @BACKTRACE_USES_MALLOC@ 55 1.1 mrg 56 1.1 mrg /* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace 57 1.1 mrg library is configured with threading support, 0 if not. If this is 58 1.1 mrg 0, the threaded parameter to backtrace_create_state must be passed 59 1.1 mrg as 0. */ 60 1.1 mrg 61 1.1 mrg #define BACKTRACE_SUPPORTS_THREADS @BACKTRACE_SUPPORTS_THREADS@ 62