diff options
author | Brent Cook <bcook@openbsd.org> | 2015-10-01 07:40:26 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-10-01 07:40:26 -0500 |
commit | a7f031ba55ac4a69263000357eb7f6d7fb88101a (patch) | |
tree | 22683754da45f65561d4ae8465311b8eb0a43ec5 /include/compat | |
parent | 497a47c5fcf137b73816ee8e9165ddd12f90fcef (diff) | |
download | portable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.tar.gz portable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.tar.bz2 portable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.zip |
add b64_ntop checking and fallback for nc(1)
Diffstat (limited to 'include/compat')
-rw-r--r-- | include/compat/readpassphrase.h | 4 | ||||
-rw-r--r-- | include/compat/resolv.h | 24 |
2 files changed, 24 insertions, 4 deletions
diff --git a/include/compat/readpassphrase.h b/include/compat/readpassphrase.h index aedf16c..3416919 100644 --- a/include/compat/readpassphrase.h +++ b/include/compat/readpassphrase.h | |||
@@ -37,11 +37,7 @@ | |||
37 | #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ | 37 | #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ |
38 | #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ | 38 | #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ |
39 | 39 | ||
40 | #include <sys/cdefs.h> | ||
41 | |||
42 | __BEGIN_DECLS | ||
43 | char * readpassphrase(const char *, char *, size_t, int); | 40 | char * readpassphrase(const char *, char *, size_t, int); |
44 | __END_DECLS | ||
45 | 41 | ||
46 | #endif /* !_READPASSPHRASE_H_ */ | 42 | #endif /* !_READPASSPHRASE_H_ */ |
47 | 43 | ||
diff --git a/include/compat/resolv.h b/include/compat/resolv.h new file mode 100644 index 0000000..42dec07 --- /dev/null +++ b/include/compat/resolv.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * resolv.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_RESOLV_H | ||
7 | #define LIBCRYPTOCOMPAT_RESOLV_H | ||
8 | |||
9 | #ifdef _MSC_VER | ||
10 | #if _MSC_VER >= 1900 | ||
11 | #include <../ucrt/resolv.h> | ||
12 | #else | ||
13 | #include <../include/resolv.h> | ||
14 | #endif | ||
15 | #else | ||
16 | #include_next <resolv.h> | ||
17 | #endif | ||
18 | |||
19 | #ifndef HAVE_B64_NTOP | ||
20 | int b64_ntop(unsigned char const *, size_t, char *, size_t); | ||
21 | int b64_pton(char const *, unsigned char *, size_t); | ||
22 | #endif | ||
23 | |||
24 | #endif | ||