/** Private includes * * This file is part of the Pollcat Library. * Copyright (C) 2022,2025 Expatria Technologies Inc. * Contact: Morgan Hughes * * The Pollcat Library is free software: you can redistribute it and/or modify it under * the terms of the the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received copies of the GNU General Public License and the GNU Lesser * General Public License along with the Pollcat Library. If not, see * https://www.gnu.org/licenses/ * * vim:ts=4:noexpandtab */ #ifndef _SRC_PRIVATE_H_ #define _SRC_PRIVATE_H_ #include /** Local assert macro */ #define POLLCAT_ASSERT(test) \ do { \ if ( !(test) ) { \ if ( pollcat_assert_func ) \ pollcat_assert_func(__FILE__, __LINE__, #test); \ else if ( stderr ) \ fprintf(stderr, "%s[%d]: assertion failed: %s (%s)\n", \ __FILE__, __LINE__, #test, strerror(errno)); \ abort(); \ } \ } while(0) extern pollcat_assert_f pollcat_assert_func; /** Return the current timeout and reset the current timeout to the base value */ int pollcat_time_value (void); #endif /* _SRC_PRIVATE_H_ */