Blame


1 8d1b399b 2021-07-22 op /*
2 8d1b399b 2021-07-22 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 8d1b399b 2021-07-22 op *
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.
7 8d1b399b 2021-07-22 op *
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.
15 8d1b399b 2021-07-22 op */
16 8d1b399b 2021-07-22 op
17 8d1b399b 2021-07-22 op #ifndef COMPAT_H
18 8d1b399b 2021-07-22 op #define COMPAT_H
19 8d1b399b 2021-07-22 op
20 8d1b399b 2021-07-22 op #include "config.h"
21 8d1b399b 2021-07-22 op
22 8d1b399b 2021-07-22 op #include <sys/types.h>
23 8d1b399b 2021-07-22 op #include <sys/uio.h>
24 8d1b399b 2021-07-22 op
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>
28 8d1b399b 2021-07-22 op
29 8d1b399b 2021-07-22 op #ifdef HAVE_QUEUE_H
30 8d1b399b 2021-07-22 op # include <sys/queue.h>
31 8d1b399b 2021-07-22 op #else
32 8d1b399b 2021-07-22 op # include "compat/queue.h"
33 8d1b399b 2021-07-22 op #endif
34 8d1b399b 2021-07-22 op
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>
39 8d1b399b 2021-07-22 op #else
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 *);
44 8d1b399b 2021-07-22 op #endif
45 8d1b399b 2021-07-22 op
46 8d1b399b 2021-07-22 op #ifndef HAVE_GETPROGNAME
47 8d1b399b 2021-07-22 op const char *getprogname(void);
48 8d1b399b 2021-07-22 op #endif
49 8d1b399b 2021-07-22 op
50 8d1b399b 2021-07-22 op #ifndef HAVE_SETPROGNAME
51 8d1b399b 2021-07-22 op void setproctitle(const char *, ...);
52 8d1b399b 2021-07-22 op #endif
53 8d1b399b 2021-07-22 op
54 8d1b399b 2021-07-22 op #endif