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