2 8d1b399b 2021-07-22 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
4 8d1b399b 2021-07-22 op * Permission to use, copy, modify, and distribute this software for any
5 8d1b399b 2021-07-22 op * purpose with or without fee is hereby granted, provided that the above
6 8d1b399b 2021-07-22 op * copyright notice and this permission notice appear in all copies.
8 8d1b399b 2021-07-22 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 8d1b399b 2021-07-22 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 8d1b399b 2021-07-22 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 8d1b399b 2021-07-22 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 8d1b399b 2021-07-22 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 8d1b399b 2021-07-22 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 8d1b399b 2021-07-22 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 8d1b399b 2021-07-22 op #ifndef COMPAT_H
18 8d1b399b 2021-07-22 op #define COMPAT_H
20 8d1b399b 2021-07-22 op #include "config.h"
22 8d1b399b 2021-07-22 op #include <sys/types.h>
23 8d1b399b 2021-07-22 op #include <sys/uio.h>
25 8d1b399b 2021-07-22 op #include <stdarg.h>
26 8d1b399b 2021-07-22 op #include <stddef.h>
27 8d1b399b 2021-07-22 op #include <stdint.h>
29 8d1b399b 2021-07-22 op #ifdef HAVE_QUEUE_H
30 8d1b399b 2021-07-22 op # include <sys/queue.h>
32 8d1b399b 2021-07-22 op # include "compat/queue.h"
35 8d1b399b 2021-07-22 op #ifdef HAVE_LIBUTIL
36 8d1b399b 2021-07-22 op # include <imsg.h>
37 8d1b399b 2021-07-22 op # include <ohash.h>
38 8d1b399b 2021-07-22 op # include <util.h>
40 8d1b399b 2021-07-22 op # include "compat/imsg.h"
41 8d1b399b 2021-07-22 op # include "compat/ohash.h"
42 8d1b399b 2021-07-22 op # define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */
43 8d1b399b 2021-07-22 op int fmt_scaled(long long, char *);
46 8d1b399b 2021-07-22 op #ifndef HAVE_GETPROGNAME
47 8d1b399b 2021-07-22 op const char *getprogname(void);
50 8d1b399b 2021-07-22 op #ifndef HAVE_SETPROGNAME
51 8d1b399b 2021-07-22 op void setproctitle(const char *, ...);