commit cc9df61c573e7cd0bc2f2758d5cd65f95c4614d1
parent 56e7c4a74087d47889355c2c55352cc4d0482020
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Sun, 17 Jan 2016 18:34:23 +0100
use <stdint.h> to get a really portable 32 bit unsigned type
This in turn requires a compiler from the 21st century.
Diffstat:
7 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/CHANGES b/CHANGES
@@ -1,3 +1,4 @@
+20190904 code: use stdint.h to get the definition for uint32
20190903 code: do not parse header recipients for "qmail-inject -a"
20190826 code: if $QMAILREMOTE is set, it's invoked instead of qmail-remote.
20190822 cleanup: remove unused dnsmxip.
diff --git a/Makefile b/Makefile
@@ -2074,13 +2074,6 @@ uid.o: \
compile uid.c uidgid.h subfd.h substdio.h exit.h
./compile uid.c
-uint32.h: \
-tryulong32.c compile load uint32.h1 uint32.h2
- ( ( ./compile tryulong32.c && ./load tryulong32 && \
- ./tryulong32 ) >/dev/null 2>&1 \
- && cat uint32.h2 || cat uint32.h1 ) > uint32.h
- rm -f tryulong32.o tryulong32
-
wait.a: \
makelib wait_pid.o wait_nohang.o
./makelib wait.a wait_pid.o wait_nohang.o
diff --git a/TARGETS b/TARGETS
@@ -128,7 +128,6 @@ auto_patrn.c
auto_patrn.o
socket.lib
qmail-local
-uint32.h
qmail-lspawn.o
select.h
chkspawn.o
diff --git a/tryulong32.c b/tryulong32.c
@@ -1,11 +0,0 @@
-void main()
-{
- unsigned long u;
- u = 1;
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
- if (!u) _exit(0);
- _exit(1);
-}
diff --git a/uint32.h b/uint32.h
@@ -0,0 +1,8 @@
+#ifndef UINT32_H
+#define UINT32_H
+
+#include <stdint.h>
+
+typedef uint32_t uint32;
+
+#endif
diff --git a/uint32.h1 b/uint32.h1
@@ -1,6 +0,0 @@
-#ifndef UINT32_H
-#define UINT32_H
-
-typedef unsigned int uint32;
-
-#endif
diff --git a/uint32.h2 b/uint32.h2
@@ -1,6 +0,0 @@
-#ifndef UINT32_H
-#define UINT32_H
-
-typedef unsigned long uint32;
-
-#endif