summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-01 00:10:58 -0400
committerJune McEnroe <june@causal.agency>2020-08-01 00:10:58 -0400
commitcbbee0458299355ccae4d9c1510cd85353b5c0cd (patch)
treea1a577b597612eb1f26aa6469eb84b6b04648822
parentDefine explicit_bzero using memset_s on macOS (diff)
downloadpounce-cbbee0458299355ccae4d9c1510cd85353b5c0cd.tar.gz
pounce-cbbee0458299355ccae4d9c1510cd85353b5c0cd.zip
Remove compat.h
-rw-r--r--Makefile2
-rw-r--r--README.74
-rw-r--r--bounce.c4
-rw-r--r--bounce.h2
-rw-r--r--compat.h37
-rw-r--r--dispatch.c2
-rw-r--r--local.c4
7 files changed, 10 insertions, 45 deletions
diff --git a/Makefile b/Makefile
index 1d8b74a..a325b8a 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ calico: dispatch.o
 pounce: ${OBJS}
 	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
 
-${OBJS}: bounce.h compat.h
+${OBJS}: bounce.h
 
 .SUFFIXES: .in
 
diff --git a/README.7 b/README.7
index 2eb4a93..a0ce567 100644
--- a/README.7
+++ b/README.7
@@ -1,4 +1,4 @@
-.Dd July 24, 2020
+.Dd August  1, 2020
 .Dt README 7
 .Os "Causal Agency"
 .
@@ -88,8 +88,6 @@ buffer between server and clients
 configuration parsing
 .It Pa dispatch.c
 SNI socket dispatch
-.It Pa compat.h
-compatibility with other systems
 .It Pa rc.d/
 .Fx
 .Xr rc 8
diff --git a/bounce.c b/bounce.c
index fc820a3..8b9ea11 100644
--- a/bounce.c
+++ b/bounce.c
@@ -52,6 +52,10 @@
 #include <sys/capsicum.h>
 #endif
 
+#ifndef SIGINFO
+#define SIGINFO SIGUSR2
+#endif
+
 #include "bounce.h"
 
 bool verbose;
diff --git a/bounce.h b/bounce.h
index 21a1d4e..e4a65c7 100644
--- a/bounce.h
+++ b/bounce.h
@@ -32,8 +32,6 @@
 #include <sys/time.h>
 #include <tls.h>
 
-#include "compat.h"
-
 #ifndef CERTBOT_PATH
 #define CERTBOT_PATH "/etc/letsencrypt"
 #endif
diff --git a/compat.h b/compat.h
deleted file mode 100644
index 320dfc9..0000000
--- a/compat.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2019  C. McEnroe <june@causal.agency>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- *
- * Additional permission under GNU GPL version 3 section 7:
- *
- * If you modify this Program, or any covered work, by linking or
- * combining it with LibreSSL (or a modified version of that library),
- * containing parts covered by the terms of the OpenSSL License and the
- * original SSLeay license, the licensors of this Program grant you
- * additional permission to convey the resulting work. Corresponding
- * Source for a non-source form of such a combination shall include the
- * source code for the parts of LibreSSL used as well as that of the
- * covered work.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#ifndef SIGINFO
-#define SIGINFO SIGUSR2
-#endif
-
-#ifdef __APPLE__
-#define TCP_KEEPIDLE TCP_KEEPALIVE
-#endif
diff --git a/dispatch.c b/dispatch.c
index 2db4fe0..2c052ef 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -44,8 +44,6 @@
 #include <sys/capsicum.h>
 #endif
 
-#include "compat.h"
-
 static struct {
 	struct pollfd *ptr;
 	size_t len, cap;
diff --git a/local.c b/local.c
index b3670ee..22e6f59 100644
--- a/local.c
+++ b/local.c
@@ -49,6 +49,10 @@
 
 #include "bounce.h"
 
+#ifdef __APPLE__
+#define TCP_KEEPIDLE TCP_KEEPALIVE
+#endif
+
 static struct tls *server;
 
 static byte *readFile(size_t *len, FILE *file) {