aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Jung <mail@umaxx.net>2016-05-21 21:22:53 +0200
committerJoerg Jung <mail@umaxx.net>2016-05-21 21:22:53 +0200
commit2a9d1e104febe86bdb2257126ae808d4a0c689b9 (patch)
treee70de0cdd830b2b41ee28df27163f0708850d517
parentadd -c and -C chroot option to filter-dkim-signer as well (diff)
downloadOpenSMTPD-extras-2a9d1e104febe86bdb2257126ae808d4a0c689b9.tar.xz
OpenSMTPD-extras-2a9d1e104febe86bdb2257126ae808d4a0c689b9.zip
use SIZE_MAX instead of SIZE_T_MAX should fix build on ArchLinux and Slackware noticed by parchd and Richard
-rw-r--r--extras/wip/filters/filter-regex/filter-regex.8.in2
-rw-r--r--extras/wip/filters/filter-regex/filter_regex.c4
-rw-r--r--extras/wip/filters/filter-spamassassin/filter-spamassassin.82
-rw-r--r--extras/wip/filters/filter-spamassassin/filter_spamassassin.c3
-rw-r--r--openbsd-compat/defines.h6
5 files changed, 7 insertions, 10 deletions
diff --git a/extras/wip/filters/filter-regex/filter-regex.8.in b/extras/wip/filters/filter-regex/filter-regex.8.in
index fd2969b..33ffad3 100644
--- a/extras/wip/filters/filter-regex/filter-regex.8.in
+++ b/extras/wip/filters/filter-regex/filter-regex.8.in
@@ -43,7 +43,7 @@ Set the number of bytes
.Ar limit
after which the regular expression processing is stopped and the mail is
accepted.
-The accepted values are within the range of 1 and SIZE_T_MAX.
+The accepted values are within the range of 1 and SIZE_MAX.
.Pp
The default
.Ar limit
diff --git a/extras/wip/filters/filter-regex/filter_regex.c b/extras/wip/filters/filter-regex/filter_regex.c
index 5870ebd..1005a9e 100644
--- a/extras/wip/filters/filter-regex/filter_regex.c
+++ b/extras/wip/filters/filter-regex/filter_regex.c
@@ -23,9 +23,9 @@
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <ctype.h>
-#include <limits.h>
#include <regex.h>
#include <unistd.h>
@@ -283,7 +283,7 @@ main(int argc, char **argv)
fatalx("bogus argument(s)");
if (l) {
- regex_limit = strtonum(l, 1, SIZE_T_MAX, &errstr);
+ regex_limit = strtonum(l, 1, SIZE_MAX, &errstr);
if (errstr)
fatalx("limit option is %s: %s", errstr, l);
}
diff --git a/extras/wip/filters/filter-spamassassin/filter-spamassassin.8 b/extras/wip/filters/filter-spamassassin/filter-spamassassin.8
index 98ae4b5..c14b4a5 100644
--- a/extras/wip/filters/filter-spamassassin/filter-spamassassin.8
+++ b/extras/wip/filters/filter-spamassassin/filter-spamassassin.8
@@ -74,7 +74,7 @@ Set the number of bytes
passed to
.Xr spamd 1
after which the scanning is stopped and the mail is accepted.
-The accepted values are within the range of 1 and SIZE_T_MAX.
+The accepted values are within the range of 1 and SIZE_MAX.
.Pp
The default
.Ar limit
diff --git a/extras/wip/filters/filter-spamassassin/filter_spamassassin.c b/extras/wip/filters/filter-spamassassin/filter_spamassassin.c
index 32aa3f9..632958d 100644
--- a/extras/wip/filters/filter-spamassassin/filter_spamassassin.c
+++ b/extras/wip/filters/filter-spamassassin/filter_spamassassin.c
@@ -19,6 +19,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
@@ -369,7 +370,7 @@ main(int argc, char **argv)
if (p)
spamassassin_port = strip(p);
if (l) {
- spamassassin_limit = strtonum(l, 1, SIZE_T_MAX, &errstr);
+ spamassassin_limit = strtonum(l, 1, SIZE_MAX, &errstr);
if (errstr)
fatalx("limit option is %s: %s", errstr, l);
}
diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h
index 0a9f3ae..b59d54a 100644
--- a/openbsd-compat/defines.h
+++ b/openbsd-compat/defines.h
@@ -87,12 +87,8 @@
# define ULLONG_MAX ((unsigned long long)-1)
#endif
-#ifndef SIZE_T_MAX
-#define SIZE_T_MAX ULONG_MAX
-#endif /* SIZE_T_MAX */
-
#ifndef SIZE_MAX
-#define SIZE_MAX SIZE_T_MAX
+#define SIZE_MAX ((size_t)-1)
#endif
#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)