etc/services - sync with NetBSD-8
[minix.git] / minix / tests / test45.c
blobc12513c757c264aa75c09ef76b06997b10c948fc
1 #include <errno.h>
2 #include <stdint.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <unistd.h>
7 #if defined(__clang__)
8 #pragma clang diagnostic ignored "-Wtautological-compare"
9 #endif
11 int max_error = 4;
12 #include "common.h"
15 /* test strtol */
16 #define TYPE long
17 #define TYPEU unsigned long
18 #define TYPE_FUNC strtol
19 #include "test45.h"
20 #undef TYPE
21 #undef TYPEU
22 #undef TYPE_FUNC
24 /* test strtoul */
25 #define TYPE unsigned long
26 #define TYPEU unsigned long
27 #define TYPE_FUNC strtoul
28 #include "test45.h"
29 #undef TYPE
30 #undef TYPEU
31 #undef TYPE_FUNC
33 /* test strtoll */
34 #define TYPE long long
35 #define TYPEU unsigned long long
36 #define TYPE_FUNC strtoll
37 #include "test45.h"
38 #undef TYPE
39 #undef TYPEU
40 #undef TYPE_FUNC
42 /* test strtoull */
43 #define TYPE long long
44 #define TYPEU unsigned long long
45 #define TYPE_FUNC strtoull
46 #include "test45.h"
47 #undef TYPE
48 #undef TYPEU
49 #undef TYPE_FUNC
51 int main(int argc, char **argv)
53 start(45);
55 /* run long/unsigned long tests */
56 test_strtol();
57 test_strtoul();
59 /* run long long/unsigned long long tests */
60 test_strtoll();
61 test_strtoull();
63 quit();
64 return -1; /* never happens */