summaryrefslogtreecommitdiff
blob: 3b637f56b29257cc86160f7492a9d95d70e158ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
use stdint.h rather than hand guessing the underlying size

--- a/tryulong32.c
+++ /dev/null
@@ -1,11 +0,0 @@
-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);
-}
--- a/tryulong64.c
+++ /dev/null
@@ -1,11 +0,0 @@
-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(1);
-  _exit(0);
-}
--- a/uint32.h1
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef UINT32_H
-#define UINT32_H
-
-typedef unsigned int uint32;
-
-extern void uint32_pack(char *,uint32);
-extern void uint32_pack_big(char *,uint32);
-extern void uint32_unpack(const char *,uint32 *);
-extern void uint32_unpack_big(const char *,uint32 *);
-
-#endif
--- a/uint32.h2
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef UINT32_H
-#define UINT32_H
-
-typedef unsigned long uint32;
-
-extern void uint32_pack(char *,uint32);
-extern void uint32_pack_big(char *,uint32);
-extern void uint32_unpack(const char *,uint32 *);
-extern void uint32_unpack_big(const char *,uint32 *);
-
-#endif
--- a/uint64.h1
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef UINT64_H
-#define UINT64_H
-
-/* sysdep: -ulong64 */
-
-typedef unsigned long long uint64;
-
-#endif
--- a/uint64.h2
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef UINT64_H
-#define UINT64_H
-
-/* sysdep: +ulong64 */
-
-typedef unsigned long uint64;
-
-#endif
--- /dev/null
+++ b/uint32.h
@@ -0,0 +1,12 @@
+#ifndef UINT32_H
+#define UINT32_H
+
+#include <stdint.h>
+typedef uint32_t uint32;
+
+extern void uint32_pack(char *,uint32);
+extern void uint32_pack_big(char *,uint32);
+extern void uint32_unpack(const char *,uint32 *);
+extern void uint32_unpack_big(const char *,uint32 *);
+
+#endif
--- /dev/null
+++ b/uint64.h
@@ -0,0 +1,8 @@
+#ifndef UINT64_H
+#define UINT64_H
+
+#include <stdint.h>
+
+typedef uint64_t uint64;
+
+#endif
--- a/Makefile
+++ b/Makefile
@@ -788,13 +788,6 @@ uint16_unpack.o: \
 compile uint16_unpack.c uint16.h
 	./compile uint16_unpack.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
-
 uint32_pack.o: \
 compile uint32_pack.c uint32.h
 	./compile uint32_pack.c
@@ -803,10 +796,6 @@ uint32_unpack.o: \
 compile uint32_unpack.c uint32.h
 	./compile uint32_unpack.c
 
-uint64.h: \
-choose compile load tryulong64.c uint64.h1 uint64.h2
-	./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
-
 unix.a: \
 makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \
 buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \