aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-07 03:18:44 +0100
committerDuncaen <mail@duncano.de>2017-03-07 03:18:44 +0100
commitf08fb6d197729278d09d3474f4fb19e302012acf (patch)
tree0b20beaa25a3a3d5b8977ae3e018efd9ce9ddfc1
parent5146697b9cbce0e6871802824c3373b90508f6ab (diff)
downloadlobase-f08fb6d197729278d09d3474f4fb19e302012acf.tar.gz
lib/libopnbsd: move base64.c into net subdirectory and move prototype to resolv.h
-rw-r--r--include/resolv.h9
-rw-r--r--lib/libopenbsd/Makefile3
-rw-r--r--lib/libopenbsd/net/base64.c (renamed from lib/libopenbsd/base64.c)0
-rw-r--r--lib/libopenbsd/openbsd.h13
4 files changed, 18 insertions, 7 deletions
diff --git a/include/resolv.h b/include/resolv.h
new file mode 100644
index 0000000..88f6336
--- /dev/null
+++ b/include/resolv.h
@@ -0,0 +1,9 @@
+#ifndef _COMPAT_RESOLV_H_
+#define _COMPAT_RESOLV_H_
+
+int b64_ntop(unsigned char const *, size_t, char *, size_t);
+int b64_pton(char const *, unsigned char *, size_t);
+
+#endif /* _COMPAT_RESOLV_H_ */
+
+#include_next <resolv.h>
diff --git a/lib/libopenbsd/Makefile b/lib/libopenbsd/Makefile
index 11c9a02..40944df 100644
--- a/lib/libopenbsd/Makefile
+++ b/lib/libopenbsd/Makefile
@@ -6,7 +6,7 @@ GEN_SRCS = hash/md5hl.c hash/rmd160hl.c hash/sha1hl.c hash/sha224hl.c \
CLEANFILES+=$(GEN_SRCS)
-SRCS = base64.c closefrom.c \
+SRCS = closefrom.c \
heapsort.c merge.c pledge-noop.c progname.c \
qsort.c radixsort.c random.c readpassphrase.c \
setproctitle.c strtoimax.c strtonum.c strtoumax.c \
@@ -17,6 +17,7 @@ SRCS = base64.c closefrom.c \
SRCS += gen/errc.c gen/fts.c gen/warnc.c gen/verrc.c gen/vwarnc.c gen/setmode.c\
SRCS += stdio/fgetwln.c
+SRCS += net/base64.c
include config.mk
diff --git a/lib/libopenbsd/base64.c b/lib/libopenbsd/net/base64.c
index e90696d..e90696d 100644
--- a/lib/libopenbsd/base64.c
+++ b/lib/libopenbsd/net/base64.c
diff --git a/lib/libopenbsd/openbsd.h b/lib/libopenbsd/openbsd.h
index edbd729..f0aa3d9 100644
--- a/lib/libopenbsd/openbsd.h
+++ b/lib/libopenbsd/openbsd.h
@@ -21,6 +21,13 @@
#define __BEGIN_DECLS
#define __END_DECLS
+#ifndef __CONCAT
+#define __CONCAT(x,y) x ## y
+#endif
+#ifndef __STRING
+#define __STRING(x) #x
+#endif
+
#undef __weak_alias
#define __weak_alias(new, old) \
extern __typeof(old) new __attribute__((weak, alias(#old)))
@@ -106,12 +113,6 @@ void setprogname(const char *progname);
/* getbsize.c */
char *getbsize(int *, long *);
-/* base64.c */
-/*
-int b64_ntop(unsigned char const *, size_t, char *, size_t);
-int b64_pton(char const *, unsigned char *, size_t);
-*/
-
#define strtoq strtoll
/* inttypes.h */