boost_has_sigaction.ipp 715 B

123456789101112131415161718192021222324252627282930313233343536
  1. // (C) Copyright John Maddock 2001.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_HAS_SIGACTION
  7. // TITLE: sigaction
  8. // DESCRIPTION: The platform supports POSIX standard API sigaction.
  9. #include <signal.h>
  10. namespace boost_has_sigaction{
  11. void f()
  12. {
  13. // this is never called, it just has to compile:
  14. struct sigaction* sa1 = 0 ;
  15. struct sigaction* sa2 = 0 ;
  16. int res = sigaction(0, sa1, sa2);
  17. (void) &res;
  18. }
  19. int test()
  20. {
  21. return 0;
  22. }
  23. }