2020-10-20 05:54:00 -04:00
|
|
|
/* sys.h - misc portable functions
|
2011-03-30 23:59:22 -04:00
|
|
|
*
|
2020-10-20 04:23:55 -04:00
|
|
|
* Copyright 2010-2020 Nicholas J. Kain <njkain at gmail dot com>
|
2011-07-25 02:30:57 -04:00
|
|
|
* All rights reserved.
|
2011-03-30 23:59:22 -04:00
|
|
|
*
|
2011-07-25 02:30:57 -04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
2011-03-30 23:59:22 -04:00
|
|
|
*
|
2011-07-25 02:30:57 -04:00
|
|
|
* - Redistributions of source code must retain the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer.
|
2011-03-30 23:59:22 -04:00
|
|
|
*
|
2011-07-25 02:30:57 -04:00
|
|
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
2011-03-30 23:59:22 -04:00
|
|
|
*/
|
2010-12-24 09:47:09 -05:00
|
|
|
#ifndef SYS_H_
|
|
|
|
#define SYS_H_
|
|
|
|
|
|
|
|
#include "ndhc-defines.h"
|
|
|
|
|
2014-03-18 03:13:51 -04:00
|
|
|
static inline size_t min_size_t(size_t a, size_t b)
|
|
|
|
{
|
|
|
|
return a < b ? a : b;
|
|
|
|
}
|
|
|
|
|
2017-02-24 08:51:36 -05:00
|
|
|
#define curms() IMPL_curms(__func__)
|
|
|
|
long long IMPL_curms(const char *parent_function);
|
2010-12-24 09:47:09 -05:00
|
|
|
|
2020-10-20 04:23:55 -04:00
|
|
|
void setup_signals_subprocess(void);
|
2014-04-15 20:55:13 -04:00
|
|
|
|
2010-12-24 09:47:09 -05:00
|
|
|
#endif /* SYS_H_ */
|
2014-04-15 20:55:13 -04:00
|
|
|
|