diff options
author | June McEnroe <june@causal.agency> | 2020-10-29 11:34:56 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-10-29 11:35:34 -0400 |
commit | f17f882b5e748c71d9365d8769711d8ff8af015f (patch) | |
tree | 9eadef4e8d2cf8eb2bc010b0edd2a506e4f12286 /imbox.c | |
parent | Refactor IMAP struct (diff) | |
download | imbox-f17f882b5e748c71d9365d8769711d8ff8af015f.tar.gz imbox-f17f882b5e748c71d9365d8769711d8ff8af015f.zip |
Rewrite compat and add configure script
Diffstat (limited to 'imbox.c')
-rw-r--r-- | imbox.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/imbox.c b/imbox.c index e58663e..7e2233d 100644 --- a/imbox.c +++ b/imbox.c @@ -25,8 +25,6 @@ * covered work. */ -#include "compat.h" - #include <err.h> #include <inttypes.h> #include <stdio.h> @@ -36,18 +34,17 @@ #include <sysexits.h> #include <unistd.h> -#ifndef NO_READPASSPHRASE_H +#ifdef DECLARE_RPP +#define RPP_STDIN 1 +char * readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags); +#else #include <readpassphrase.h> #endif #include "imap.h" -#if !defined(DIG_PATH) && !defined(DRILL_PATH) -# ifdef __FreeBSD__ -# define DRILL_PATH "/usr/bin/drill" -# else -# define DIG_PATH "dig" -# endif +#ifndef DIG_PATH +#define DIG_PATH "dig" #endif #define FETCH_HEADERS \ @@ -91,10 +88,10 @@ static void lookup(const char **host, const char **port, const char *domain) { dup2(rw[1], STDERR_FILENO); close(rw[1]); #ifdef DRILL_PATH - execlp(DRILL_PATH, DRILL_PATH, buf, "SRV", NULL); + execlp(DRILL_PATH, "drill", buf, "SRV", NULL); err(EX_CONFIG, "%s", DRILL_PATH); #else - execlp(DIG_PATH, DIG_PATH, "-t", "SRV", "-q", buf, "+short", NULL); + execlp(DIG_PATH, "dig", "-t", "SRV", "-q", buf, "+short", NULL); err(EX_CONFIG, "%s", DIG_PATH); #endif } |