Blame


1 dd038bc6 2021-09-21 thomas.ad noinst_LIBRARIES = libopenbsd-compat.a
2 dd038bc6 2021-09-21 thomas.ad
3 0ca5b679 2021-10-09 thomas include $(top_builddir)/Makefile.common
4 dd038bc6 2021-09-21 thomas.ad
5 206be139 2023-03-08 thomas LDADD = $(libbsd_LIBS)
6 206be139 2023-03-08 thomas AM_CPPFLAGS += $(libbsd_CFLAGS)
7 206be139 2023-03-08 thomas
8 dd038bc6 2021-09-21 thomas.ad libopenbsd_compat_a_SOURCES = \
9 dd038bc6 2021-09-21 thomas.ad asprintf.c \
10 dd038bc6 2021-09-21 thomas.ad fmt_scaled.c \
11 dd038bc6 2021-09-21 thomas.ad freezero.c \
12 dd038bc6 2021-09-21 thomas.ad getdtablecount.c \
13 dd038bc6 2021-09-21 thomas.ad getprogname.c \
14 dd038bc6 2021-09-21 thomas.ad merge.c \
15 dd038bc6 2021-09-21 thomas.ad reallocarray.c \
16 dd038bc6 2021-09-21 thomas.ad recallocarray.c \
17 dd038bc6 2021-09-21 thomas.ad strndup.c \
18 dd038bc6 2021-09-21 thomas.ad strnlen.c \
19 dd038bc6 2021-09-21 thomas.ad strsep.c \
20 dd038bc6 2021-09-21 thomas.ad strtonum.c \
21 dd514345 2021-09-21 thomas.ad imsg.h \
22 dd514345 2021-09-21 thomas.ad tree.h
23 d24ddaa6 2022-02-26 thomas
24 d24ddaa6 2022-02-26 thomas # For MacOS, don't build the compat versions of strl{cat,cpy}, but do for all
25 d24ddaa6 2022-02-26 thomas # other systems.
26 d24ddaa6 2022-02-26 thomas if !HOST_DARWIN
27 d24ddaa6 2022-02-26 thomas libopenbsd_compat_a_SOURCES += strlcat.c strlcpy.c
28 d24ddaa6 2022-02-26 thomas endif
29 d24ddaa6 2022-02-26 thomas
30 d24ddaa6 2022-02-26 thomas if HOST_DARWIN
31 d24ddaa6 2022-02-26 thomas libopenbsd_compat_a_SOURCES += uuid.c bsd-poll.c bsd-poll.h
32 d24ddaa6 2022-02-26 thomas endif
33 d24ddaa6 2022-02-26 thomas
34 8d60d668 2023-03-16 thomas if !HAVE_GETOPT
35 8d60d668 2023-03-16 thomas libopenbsd_compat_a_SOURCES += getopt.c
36 8d60d668 2023-03-16 thomas endif
37 8d60d668 2023-03-16 thomas
38 206be139 2023-03-08 thomas if !HAVE_B64
39 206be139 2023-03-08 thomas libopenbsd_compat_a_SOURCES += base64.c
40 206be139 2023-03-08 thomas LDADD += $(libresolv_LIBS)
41 206be139 2023-03-08 thomas endif
42 206be139 2023-03-08 thomas
43 4fccd2fe 2023-03-08 thomas if !HAVE_CLOSEFROM
44 4fccd2fe 2023-03-08 thomas libopenbsd_compat_a_SOURCES += closefrom.c
45 4fccd2fe 2023-03-08 thomas endif
46 4fccd2fe 2023-03-08 thomas
47 a3732bb6 2022-02-26 thomas if HOST_NETBSD
48 a3732bb6 2022-02-26 thomas libopenbsd_compat_a_SOURCES += bsd-poll.c bsd-poll.h
49 a3732bb6 2022-02-26 thomas endif
50 a3732bb6 2022-02-26 thomas
51 d24ddaa6 2022-02-26 thomas if HOST_LINUX
52 92a9e85d 2021-09-24 thomas libopenbsd_compat_a_SOURCES += uuid.c
53 92a9e85d 2021-09-24 thomas endif
54 dd038bc6 2021-09-21 thomas.ad
55 97799ccd 2022-02-06 thomas if HAVE_LINUX_LANDLOCK
56 97799ccd 2022-02-06 thomas libopenbsd_compat_a_SOURCES += landlock.c
57 97799ccd 2022-02-06 thomas endif
58 97799ccd 2022-02-06 thomas
59 ddd12270 2022-04-22 thomas if !HAVE_SIPHASH
60 ddd12270 2022-04-22 thomas libopenbsd_compat_a_SOURCES += siphash.c siphash.h
61 ddd12270 2022-04-22 thomas endif
62 ddd12270 2022-04-22 thomas
63 c4e2e0d0 2022-07-16 thomas if !HAVE_SETPROCTITLE
64 c4e2e0d0 2022-07-16 thomas libopenbsd_compat_a_SOURCES += setproctitle.c
65 c4e2e0d0 2022-07-16 thomas endif
66 c4e2e0d0 2022-07-16 thomas
67 f600ad76 2023-01-06 thomas if !HAVE_IMSG
68 f600ad76 2023-01-06 thomas libopenbsd_compat_a_SOURCES += imsg-buffer.c imsg.c
69 f600ad76 2023-01-06 thomas endif
70 f600ad76 2023-01-06 thomas
71 b1ec8cee 2023-02-25 thomas if !HOST_DARWIN
72 b1ec8cee 2023-02-25 thomas # Fake an assigment here. It does nothing, but you cannot have consecutive
73 b1ec8cee 2023-02-25 thomas # nested if statements in Makefiles, so we have to do something here, even if
74 b1ec8cee 2023-02-25 thomas # it's a dummy assignment.
75 b1ec8cee 2023-02-25 thomas NOTING=something
76 b1ec8cee 2023-02-25 thomas if !HAVE_SHA2
77 b1ec8cee 2023-02-25 thomas libopenbsd_compat_a_SOURCES += sha2.c sha2.h
78 b1ec8cee 2023-02-25 thomas endif
79 b1ec8cee 2023-02-25 thomas endif
80 b1ec8cee 2023-02-25 thomas
81 dd038bc6 2021-09-21 thomas.ad EXTRA_DIST = \
82 dd038bc6 2021-09-21 thomas.ad $(top_srcdir)/include/got_compat.h \
83 dd038bc6 2021-09-21 thomas.ad imsg.h \
84 d24ddaa6 2022-02-26 thomas tree.h \
85 d24ddaa6 2022-02-26 thomas bsd-poll.h