opnsense-src/contrib/sendmail/include/sm/xtrap.h

39 lines
875 B
C
Raw Normal View History

2002-02-17 16:56:45 -05:00
/*
2014-01-26 15:46:55 -05:00
* Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
2002-02-17 16:56:45 -05:00
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
2014-05-21 23:45:17 -04:00
* $Id: xtrap.h,v 1.8 2013-11-22 20:51:32 ca Exp $
2002-02-17 16:56:45 -05:00
*/
/*
** scaffolding for testing exception handler code
*/
#ifndef SM_XTRAP_H
# define SM_XTRAP_H
# include <sm/debug.h>
# include <sm/exc.h>
extern SM_ATOMIC_UINT_T SmXtrapCount;
extern SM_DEBUG_T SmXtrapDebug;
extern SM_DEBUG_T SmXtrapReport;
# if SM_DEBUG_CHECK
# define sm_xtrap_check() (++SmXtrapCount == sm_debug_level(&SmXtrapDebug))
# else /* SM_DEBUG_CHECK */
# define sm_xtrap_check() (0)
# endif /* SM_DEBUG_CHECK */
# define sm_xtrap_raise_x(exc) \
if (sm_xtrap_check()) \
{ \
sm_exc_raise_x(exc); \
} else
#endif /* ! SM_XTRAP_H */