backtrace-supported.h.in 2.8 KB

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