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