remove left-over from config, USE_PLEDGE -> ifdef for OpenBSD - saait - the mos… | |
git clone git://git.codemadness.org/saait | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 859530fbd840b9467593f90a707e3c3ce080b8ac | |
parent bbeb92b4aff16a77b15252423abd24c4b2fb46ed | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 22 Sep 2018 12:24:30 +0200 | |
remove left-over from config, USE_PLEDGE -> ifdef for OpenBSD | |
Diffstat: | |
M config.mk | 6 ------ | |
M saait.c | 10 +++++----- | |
2 files changed, 5 insertions(+), 11 deletions(-) | |
--- | |
diff --git a/config.mk b/config.mk | |
@@ -7,9 +7,6 @@ MANPREFIX = ${PREFIX}/man | |
# compiler and linker | |
#CC = cc | |
-GITINC = /usr/local/include | |
-GITLIB = /usr/local/lib | |
- | |
# includes and libs | |
INCS = | |
LIBS = | |
@@ -27,6 +24,3 @@ LDFLAGS = -s ${LIBS} | |
#LDFLAGS = -static -s ${LIBS} | |
CPPFLAGS = -D_DEFAULT_SOURCE ${INCS} | |
- | |
-# OpenBSD 5.9+: use pledge(2) | |
-#CPPFLAGS = -D_DEFAULT_SOURCE -DUSE_PLEDGE ${INCS} | |
diff --git a/saait.c b/saait.c | |
@@ -4,8 +4,12 @@ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
-#ifdef USE_PLEDGE | |
+ | |
+/* OpenBSD pledge(2) */ | |
+#ifdef __OpenBSD__ | |
#include <unistd.h> | |
+#else | |
+#define pledge(p1,p2) 0 | |
#endif | |
/* This is the blocksize of my disk, use atleast an equal or higher value and | |
@@ -25,10 +29,6 @@ char *argv0; | |
static struct variable *global; | |
-#ifndef USE_PLEDGE | |
-#define pledge(p1,p2) 0 | |
-#endif | |
- | |
/* Escape characters below as HTML 2.0 / XML 1.0. */ | |
void | |
xmlencode(const char *s, FILE *fp) |