xdiary: Further reduce number of implicit and own declarations of libc functionsdiff -r1.2 -r1.3 pkgsrc/time/xdiary/Makefile
(nia)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.2 2023/05/27 15:22:36 he Exp $ | 1 | # $NetBSD: Makefile,v 1.3 2023/07/07 12:45:25 nia Exp $ | |
2 | 2 | |||
3 | DISTNAME= xmdiary-3.0.3 | 3 | DISTNAME= xmdiary-3.0.3 | |
4 | PKGNAME= ${DISTNAME:S/m//} | 4 | PKGNAME= ${DISTNAME:S/m//} | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= time x11 | 6 | CATEGORIES= time x11 | |
7 | MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/} | 7 | MASTER_SITES= ${MASTER_SITE_XCONTRIB:=office/} | |
8 | 8 | |||
9 | MAINTAINER= vins@NetBSD.org | 9 | MAINTAINER= vins@NetBSD.org | |
10 | HOMEPAGE= https://www.ibiblio.org/pub/X11/contrib/office/xmdiary-README | 10 | HOMEPAGE= https://www.ibiblio.org/pub/X11/contrib/office/xmdiary-README | |
11 | COMMENT= Calendar utility based on Motif/X | 11 | COMMENT= Calendar utility based on Motif/X | |
12 | LICENSE= 0-clause-bsd | 12 | LICENSE= 0-clause-bsd | |
13 | 13 | |||
14 | MKPIE_SUPPORTED= no | 14 | MKPIE_SUPPORTED= no | |
15 | 15 | |||
16 | USE_IMAKE= yes | 16 | USE_IMAKE= yes | |
17 | 17 | |||
18 | SUBST_CLASSES+= cc | 18 | SUBST_CLASSES+= cc |
@@ -1,33 +1,33 @@ | @@ -1,33 +1,33 @@ | |||
1 | $NetBSD: distinfo,v 1.2 2023/05/27 15:22:36 he Exp $ | 1 | $NetBSD: distinfo,v 1.3 2023/07/07 12:45:25 nia Exp $ | |
2 | 2 | |||
3 | BLAKE2s (xmdiary-3.0.3.tar.gz) = 225c678fd5e2a2d080346ca22fc5bf31393e63ea51506002098e3c8c7f0c5709 | 3 | BLAKE2s (xmdiary-3.0.3.tar.gz) = 225c678fd5e2a2d080346ca22fc5bf31393e63ea51506002098e3c8c7f0c5709 | |
4 | SHA512 (xmdiary-3.0.3.tar.gz) = a699703c2a71f702dbe25a5c57a461dc14581df108b85e7a092ee52be18dbd26c80b0df91c00a96a759816863c42519c77d22857eda916c66735634fdce9fe1c | 4 | SHA512 (xmdiary-3.0.3.tar.gz) = a699703c2a71f702dbe25a5c57a461dc14581df108b85e7a092ee52be18dbd26c80b0df91c00a96a759816863c42519c77d22857eda916c66735634fdce9fe1c | |
5 | Size (xmdiary-3.0.3.tar.gz) = 764331 bytes | 5 | Size (xmdiary-3.0.3.tar.gz) = 764331 bytes | |
6 | SHA1 (patch-XDiary.tmpl) = c9c6dab155fa6dd607e998134fbf1aa1d65937ef | 6 | SHA1 (patch-XDiary.tmpl) = c9c6dab155fa6dd607e998134fbf1aa1d65937ef | |
7 | SHA1 (patch-dtools_xtmCalendar.c) = 1106929782e3438e0fb90a7624cf723338d1f800 | 7 | SHA1 (patch-dtools_xtmCalendar.c) = 1106929782e3438e0fb90a7624cf723338d1f800 | |
8 | SHA1 (patch-dtools_xtmDbTools.c) = d6249849e091a11d08fecd31832a746e31ebda6a | 8 | SHA1 (patch-dtools_xtmDbTools.c) = e5913c95b89b1dad21abf9e085d0169b3768b33d | |
9 | SHA1 (patch-dtools_xtmEditEntry.c) = 32a483d44b1e2638c042184ba70585c212fb214c | 9 | SHA1 (patch-dtools_xtmEditEntry.c) = 32a483d44b1e2638c042184ba70585c212fb214c | |
10 | SHA1 (patch-dtools_xtmMsgSelect.c) = 3937992e9399b4de1104c3739fd8fac8df47d6ba | 10 | SHA1 (patch-dtools_xtmMsgSelect.c) = 3937992e9399b4de1104c3739fd8fac8df47d6ba | |
11 | SHA1 (patch-dtools_xtmMsgSend.c) = 282cc4c842bcb5929f80b62becb724da4273699d | 11 | SHA1 (patch-dtools_xtmMsgSend.c) = 282cc4c842bcb5929f80b62becb724da4273699d | |
12 | SHA1 (patch-dtools_xtmPlan.c) = 9e59061c656fe71da0b85d786b2a64f06e1eec6c | 12 | SHA1 (patch-dtools_xtmPlan.c) = 9e59061c656fe71da0b85d786b2a64f06e1eec6c | |
13 | SHA1 (patch-dtools_xtmPrEntries.c) = d8c917f3690d98b26939956c6f1374663f74bda0 | 13 | SHA1 (patch-dtools_xtmPrEntries.c) = d8c917f3690d98b26939956c6f1374663f74bda0 | |
14 | SHA1 (patch-dtools_xtmReminder.c) = d44b3e924dccabf8f5053d032485a325e28fa7f5 | 14 | SHA1 (patch-dtools_xtmReminder.c) = d44b3e924dccabf8f5053d032485a325e28fa7f5 | |
15 | SHA1 (patch-dtools_xtmSchedAct.c) = f9835884e17369fffd39e3679a0a5125255e36d3 | 15 | SHA1 (patch-dtools_xtmSchedAct.c) = f9835884e17369fffd39e3679a0a5125255e36d3 | |
16 | SHA1 (patch-dtools_xtmSchedMain.c) = 782a36ee32910ec9142dee05773e28f1e0990463 | 16 | SHA1 (patch-dtools_xtmSchedMain.c) = 782a36ee32910ec9142dee05773e28f1e0990463 | |
17 | SHA1 (patch-dtools_xtmShowToDo.c) = 5ca6b0b4939e7d55758546fb937066118c672677 | 17 | SHA1 (patch-dtools_xtmShowToDo.c) = 5ca6b0b4939e7d55758546fb937066118c672677 | |
18 | SHA1 (patch-ndbm_xdndbm.c) = f7709f8305c6cb68fea2721559efad8e2ac4fac5 | 18 | SHA1 (patch-ndbm_xdndbm.c) = 979d5b4212d6f33a110ed82565667ce4da76089e | |
19 | SHA1 (patch-tools_SigHandler.c) = 841cd0b3f67a498cad89af288eace1e7beaa1fdb | 19 | SHA1 (patch-tools_SigHandler.c) = 841cd0b3f67a498cad89af288eace1e7beaa1fdb | |
20 | SHA1 (patch-tools_System.c) = 165ac4c772e593b8671221c80a09059fc4044f75 | 20 | SHA1 (patch-tools_System.c) = 3b5b2ca9f3bee63f9732f8774a2051654f2a891d | |
21 | SHA1 (patch-xdaclunix_xtmAclUnix.c) = 9abbd51d9d96b46d71ec4835beabd058f7743601 | 21 | SHA1 (patch-xdaclunix_xtmAclUnix.c) = 9abbd51d9d96b46d71ec4835beabd058f7743601 | |
22 | SHA1 (patch-xdalarm_xtmAlarmProc.c) = 322a0aae64307f4aa9599d834b6e5fa34666e4c9 | 22 | SHA1 (patch-xdalarm_xtmAlarmProc.c) = 322a0aae64307f4aa9599d834b6e5fa34666e4c9 | |
23 | SHA1 (patch-xdcustom_xtmCustom.c) = e40509f3d0471838a8daa0134de5147ed1e8e02e | 23 | SHA1 (patch-xdcustom_xtmCustom.c) = e40509f3d0471838a8daa0134de5147ed1e8e02e | |
24 | SHA1 (patch-xdiary_xtmDiary.c) = f6bc11b6898001b02190044be3742af79869f46a | 24 | SHA1 (patch-xdiary_xtmDiary.c) = f6bc11b6898001b02190044be3742af79869f46a | |
25 | SHA1 (patch-xdlight_xtmDiaryLgt.c) = f1041d6dbdf9cd703678d0607b62de4b91c804c8 | 25 | SHA1 (patch-xdlight_xtmDiaryLgt.c) = f1041d6dbdf9cd703678d0607b62de4b91c804c8 | |
26 | SHA1 (patch-xdnotify_xtmNotify.c) = a2d0a3276cd6efb231b4b0106e64351aff534e50 | 26 | SHA1 (patch-xdnotify_xtmNotify.c) = a2d0a3276cd6efb231b4b0106e64351aff534e50 | |
27 | SHA1 (patch-xdprformat_xtmPrFormat.c) = 748b0a6ce74805e28b52d04fb74574ac219399af | 27 | SHA1 (patch-xdprformat_xtmPrFormat.c) = 748b0a6ce74805e28b52d04fb74574ac219399af | |
28 | SHA1 (patch-xdremind_xtmRemMain.c) = 44609d5af8c58f5d2782a32db3a94acb8355105a | 28 | SHA1 (patch-xdremind_xtmRemMain.c) = 44609d5af8c58f5d2782a32db3a94acb8355105a | |
29 | SHA1 (patch-xdremove_xtmRemove.c) = 4e6ce3410d7b8bd30e23aa4c424cb923e99728e1 | 29 | SHA1 (patch-xdremove_xtmRemove.c) = 4e6ce3410d7b8bd30e23aa4c424cb923e99728e1 | |
30 | SHA1 (patch-xdrestore_xtmRestore.c) = 37c69e18cad485addbc85a85fdf41e9991048c14 | 30 | SHA1 (patch-xdrestore_xtmRestore.c) = 37c69e18cad485addbc85a85fdf41e9991048c14 | |
31 | SHA1 (patch-xtools_XmUbTimeB.c) = f236503f1be2ac1fe6a21a33dfb6be0d7675d005 | 31 | SHA1 (patch-xtools_XmUbTimeB.c) = f236503f1be2ac1fe6a21a33dfb6be0d7675d005 | |
32 | SHA1 (patch-xtools_xitColorSel.c) = 69a808ce5ebf0215e6a89cb032ebca10c4892469 | 32 | SHA1 (patch-xtools_xitColorSel.c) = 69a808ce5ebf0215e6a89cb032ebca10c4892469 | |
33 | SHA1 (patch-xtools_xitError.c) = de21b543bfa68ab9b58c3ccc514d2a716ac34dc7 | 33 | SHA1 (patch-xtools_xitError.c) = de21b543bfa68ab9b58c3ccc514d2a716ac34dc7 |
@@ -1,87 +1,88 @@ | @@ -1,87 +1,88 @@ | |||
1 | $NetBSD: patch-dtools_xtmDbTools.c,v 1.1 2023/01/22 20:08:17 vins Exp $ | 1 | $NetBSD: patch-dtools_xtmDbTools.c,v 1.2 2023/07/07 12:45:25 nia Exp $ | |
2 | 2 | |||
3 | Avoid int to pointer conversion warnings. | 3 | Avoid int to pointer conversion warnings. | |
4 | Add a mode to open() call with O_CREAT. | 4 | Add a mode to open() call with O_CREAT. | |
5 | 5 | |||
6 | --- dtools/xtmDbTools.c.orig 1997-05-04 22:27:52.000000000 +0000 | 6 | --- dtools/xtmDbTools.c.orig 1997-05-04 22:27:52.000000000 +0000 | |
7 | +++ dtools/xtmDbTools.c | 7 | +++ dtools/xtmDbTools.c | |
8 | @@ -47,6 +47,7 @@ static char SCCSID[] = "@(#) Module: xtm | 8 | @@ -47,6 +47,8 @@ static char SCCSID[] = "@(#) Module: xtm | |
9 | 9 | |||
10 | #include <fcntl.h> | 10 | #include <fcntl.h> | |
11 | #include <stdio.h> | 11 | #include <stdio.h> | |
12 | +#include <stdint.h> | 12 | +#include <stdint.h> | |
13 | +#include <stdlib.h> | |||
13 | #include <unistd.h> | 14 | #include <unistd.h> | |
14 | #include <ctype.h> | 15 | #include <ctype.h> | |
15 | #include <sys/stat.h> | 16 | #include <sys/stat.h> | |
16 | @@ -1813,7 +1814,7 @@ XTM_DB_STATUS | 17 | @@ -1813,7 +1815,7 @@ XTM_DB_STATUS | |
17 | 18 | |||
18 | /* Insert the date in the sorted list. */ | 19 | /* Insert the date in the sorted list. */ | |
19 | lst_status = LstLinkSearchFirst( *list_ref, | 20 | lst_status = LstLinkSearchFirst( *list_ref, | |
20 | - (void *) record.date, | 21 | - (void *) record.date, | |
21 | + (void *)(uintptr_t)record.date, | 22 | + (void *)(uintptr_t)record.date, | |
22 | (EQUALS_FUNC_TYPE) dateSortFunc ); | 23 | (EQUALS_FUNC_TYPE) dateSortFunc ); | |
23 | 24 | |||
24 | if( lst_status == LST_OK ) | 25 | if( lst_status == LST_OK ) | |
25 | @@ -1896,7 +1897,7 @@ XTM_DB_STATUS | 26 | @@ -1896,7 +1898,7 @@ XTM_DB_STATUS | |
26 | case XTM_DB_DAY_NOTE: | 27 | case XTM_DB_DAY_NOTE: | |
27 | lst_status = LstLinkSearchFirst( | 28 | lst_status = LstLinkSearchFirst( | |
28 | *note_list_ref, | 29 | *note_list_ref, | |
29 | - (void *) entry_record.entry.time_stamp, | 30 | - (void *) entry_record.entry.time_stamp, | |
30 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 31 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
31 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | 32 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | |
32 | 33 | |||
33 | if( lst_status == LST_OK ) | 34 | if( lst_status == LST_OK ) | |
34 | @@ -1910,7 +1911,7 @@ XTM_DB_STATUS | 35 | @@ -1910,7 +1912,7 @@ XTM_DB_STATUS | |
35 | case XTM_DB_DAY_ENTRY: | 36 | case XTM_DB_DAY_ENTRY: | |
36 | lst_status = LstLinkSearchFirst( | 37 | lst_status = LstLinkSearchFirst( | |
37 | *entry_list_ref, | 38 | *entry_list_ref, | |
38 | - (void *) entry_record.entry.time_stamp, | 39 | - (void *) entry_record.entry.time_stamp, | |
39 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 40 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
40 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | 41 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | |
41 | 42 | |||
42 | if( lst_status == LST_OK ) | 43 | if( lst_status == LST_OK ) | |
43 | @@ -1984,7 +1985,7 @@ XTM_DB_STATUS | 44 | @@ -1984,7 +1986,7 @@ XTM_DB_STATUS | |
44 | case XTM_DB_DAY_NOTE: | 45 | case XTM_DB_DAY_NOTE: | |
45 | lst_status = LstLinkSearchFirst( | 46 | lst_status = LstLinkSearchFirst( | |
46 | *note_list_ref, | 47 | *note_list_ref, | |
47 | - (void *) entry_record.entry.time_stamp, | 48 | - (void *) entry_record.entry.time_stamp, | |
48 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 49 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
49 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | 50 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | |
50 | 51 | |||
51 | if( lst_status == LST_OK ) | 52 | if( lst_status == LST_OK ) | |
52 | @@ -1998,7 +1999,7 @@ XTM_DB_STATUS | 53 | @@ -1998,7 +2000,7 @@ XTM_DB_STATUS | |
53 | case XTM_DB_DAY_ENTRY: | 54 | case XTM_DB_DAY_ENTRY: | |
54 | lst_status = LstLinkSearchFirst( | 55 | lst_status = LstLinkSearchFirst( | |
55 | *entry_list_ref, | 56 | *entry_list_ref, | |
56 | - (void *) entry_record.entry.time_stamp, | 57 | - (void *) entry_record.entry.time_stamp, | |
57 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 58 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
58 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | 59 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | |
59 | 60 | |||
60 | if( lst_status == LST_OK ) | 61 | if( lst_status == LST_OK ) | |
61 | @@ -2072,7 +2073,7 @@ XTM_DB_STATUS | 62 | @@ -2072,7 +2074,7 @@ XTM_DB_STATUS | |
62 | case XTM_DB_DAY_NOTE: | 63 | case XTM_DB_DAY_NOTE: | |
63 | lst_status = LstLinkSearchFirst( | 64 | lst_status = LstLinkSearchFirst( | |
64 | *note_list_ref, | 65 | *note_list_ref, | |
65 | - (void *) entry_record.entry.time_stamp, | 66 | - (void *) entry_record.entry.time_stamp, | |
66 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 67 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
67 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | 68 | (EQUALS_FUNC_TYPE) entryIdSortFunc ); | |
68 | 69 | |||
69 | if( lst_status == LST_OK ) | 70 | if( lst_status == LST_OK ) | |
70 | @@ -2086,7 +2087,7 @@ XTM_DB_STATUS | 71 | @@ -2086,7 +2088,7 @@ XTM_DB_STATUS | |
71 | case XTM_DB_DAY_ENTRY: | 72 | case XTM_DB_DAY_ENTRY: | |
72 | lst_status = LstLinkSearchFirst( | 73 | lst_status = LstLinkSearchFirst( | |
73 | *entry_list_ref, | 74 | *entry_list_ref, | |
74 | - (void *) entry_record.entry.time_stamp, | 75 | - (void *) entry_record.entry.time_stamp, | |
75 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | 76 | + (void *)(uintptr_t)entry_record.entry.time_stamp, | |
76 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | 77 | (EQUALS_FUNC_TYPE) entryTimeSortFunc ); | |
77 | 78 | |||
78 | if( lst_status == LST_OK ) | 79 | if( lst_status == LST_OK ) | |
79 | @@ -2332,7 +2333,7 @@ XTM_DB_STATUS | 80 | @@ -2332,7 +2334,7 @@ XTM_DB_STATUS | |
80 | sprintf( filename, "%s/%s_%s_%d", | 81 | sprintf( filename, "%s/%s_%s_%d", | |
81 | message_dir, XTM_DB_MESSAGE_FILE, msg_info -> from, new_id ); | 82 | message_dir, XTM_DB_MESSAGE_FILE, msg_info -> from, new_id ); | |
82 | 83 | |||
83 | - file_ref = open( filename, (O_CREAT | O_RDWR) ); | 84 | - file_ref = open( filename, (O_CREAT | O_RDWR) ); | |
84 | + file_ref = open( filename, (O_CREAT | O_RDWR, 0600) ); | 85 | + file_ref = open( filename, (O_CREAT | O_RDWR, 0600) ); | |
85 | if( file_ref == -1 ) | 86 | if( file_ref == -1 ) | |
86 | raise exception; | 87 | raise exception; | |
87 | 88 |
@@ -1,118 +1,126 @@ | @@ -1,118 +1,126 @@ | |||
1 | $NetBSD: patch-ndbm_xdndbm.c,v 1.1 2023/05/27 15:22:36 he Exp $ | 1 | $NetBSD: patch-ndbm_xdndbm.c,v 1.2 2023/07/07 12:45:25 nia Exp $ | |
2 | 2 | |||
3 | Make `int` types explicit, don't own-declare lseek() on NetBSD | 3 | Make `int` types explicit, don't own-declare lseek() | |
4 | (gives type mismatch). | 4 | (gives type mismatch). | |
5 | 5 | |||
6 | --- ndbm/xdndbm.c.orig 1997-05-04 22:05:18.000000000 +0000 | 6 | --- ndbm/xdndbm.c.orig 1997-05-04 22:05:18.000000000 +0000 | |
7 | +++ ndbm/xdndbm.c | 7 | +++ ndbm/xdndbm.c | |
8 | @@ -28,8 +28,8 @@ | 8 | @@ -12,6 +12,7 @@ | |
9 | ||||
10 | #include <sys/types.h> | |||
11 | #include <sys/stat.h> | |||
12 | +#include <errno.h> | |||
13 | #include <unistd.h> | |||
14 | #include <fcntl.h> | |||
15 | #include <stdio.h> | |||
16 | @@ -28,8 +29,8 @@ | |||
9 | #ifdef NET_BYTE_ORDER | 17 | #ifdef NET_BYTE_ORDER | |
10 | #include <netinet/in.h> | 18 | #include <netinet/in.h> | |
11 | 19 | |||
12 | -static convert_after_read(char buf[PBLKSIZ]); | 20 | -static convert_after_read(char buf[PBLKSIZ]); | |
13 | -static convert_before_write(char buf[PBLKSIZ]); | 21 | -static convert_before_write(char buf[PBLKSIZ]); | |
14 | +static int convert_after_read(char buf[PBLKSIZ]); | 22 | +static int convert_after_read(char buf[PBLKSIZ]); | |
15 | +static int convert_before_write(char buf[PBLKSIZ]); | 23 | +static int convert_before_write(char buf[PBLKSIZ]); | |
16 | 24 | |||
17 | #undef DEBUG | 25 | #undef DEBUG | |
18 | #endif | 26 | #endif | |
19 | @@ -53,7 +53,9 @@ static int delitem(); | 27 | @@ -52,9 +53,6 @@ static int finddatum(); | |
28 | static int delitem(); | |||
20 | static int additem(); | 29 | static int additem(); | |
21 | 30 | |||
22 | extern int errno; | 31 | -extern int errno; | |
23 | +#ifndef __NetBSD__ | 32 | -extern long lseek(); | |
24 | extern long lseek(); | 33 | - | |
25 | +#endif | |||
26 | ||||
27 | #ifdef DEBUG | 34 | #ifdef DEBUG | |
28 | static chkblk(char buf[PBLKSIZ]); | 35 | static chkblk(char buf[PBLKSIZ]); | |
29 | @@ -142,7 +144,7 @@ dbm_fetch(db, key) | 36 | #endif | |
37 | @@ -142,7 +140,7 @@ dbm_fetch(db, key) | |||
30 | register DBM *db; | 38 | register DBM *db; | |
31 | datum key; | 39 | datum key; | |
32 | { | 40 | { | |
33 | - register i; | 41 | - register i; | |
34 | + register int i; | 42 | + register int i; | |
35 | datum item; | 43 | datum item; | |
36 | 44 | |||
37 | if (dbm_error(db)) | 45 | if (dbm_error(db)) | |
38 | @@ -168,7 +170,7 @@ dbm_delete(db, key) | 46 | @@ -168,7 +166,7 @@ dbm_delete(db, key) | |
39 | register DBM *db; | 47 | register DBM *db; | |
40 | datum key; | 48 | datum key; | |
41 | { | 49 | { | |
42 | - register i; | 50 | - register i; | |
43 | + register int i; | 51 | + register int i; | |
44 | 52 | |||
45 | if (dbm_error(db)) | 53 | if (dbm_error(db)) | |
46 | return (-1); | 54 | return (-1); | |
47 | @@ -216,7 +218,7 @@ register DBM *db; | 55 | @@ -216,7 +214,7 @@ register DBM *db; | |
48 | datum key, dat; | 56 | datum key, dat; | |
49 | int replace; | 57 | int replace; | |
50 | { | 58 | { | |
51 | - register i; | 59 | - register i; | |
52 | + register int i; | 60 | + register int i; | |
53 | datum item, item1; | 61 | datum item, item1; | |
54 | char ovfbuf[PBLKSIZ]; | 62 | char ovfbuf[PBLKSIZ]; | |
55 | 63 | |||
56 | @@ -438,7 +440,7 @@ getbit(db) | 64 | @@ -438,7 +436,7 @@ getbit(db) | |
57 | register DBM *db; | 65 | register DBM *db; | |
58 | { | 66 | { | |
59 | long bn; | 67 | long bn; | |
60 | - register b, i, n; | 68 | - register b, i, n; | |
61 | + register int b, i, n; | 69 | + register int b, i, n; | |
62 | 70 | |||
63 | if (db->dbm_bitno > db->dbm_maxbno) | 71 | if (db->dbm_bitno > db->dbm_maxbno) | |
64 | return (0); | 72 | return (0); | |
65 | @@ -496,7 +498,7 @@ makdatum(buf, n) | 73 | @@ -496,7 +494,7 @@ makdatum(buf, n) | |
66 | char buf[PBLKSIZ]; | 74 | char buf[PBLKSIZ]; | |
67 | { | 75 | { | |
68 | register short *sp; | 76 | register short *sp; | |
69 | - register t; | 77 | - register t; | |
70 | + register int t; | 78 | + register int t; | |
71 | datum item; | 79 | datum item; | |
72 | 80 | |||
73 | sp = (short *)buf; | 81 | sp = (short *)buf; | |
74 | @@ -624,7 +626,7 @@ delitem(buf, n) | 82 | @@ -624,7 +622,7 @@ delitem(buf, n) | |
75 | char buf[PBLKSIZ]; | 83 | char buf[PBLKSIZ]; | |
76 | { | 84 | { | |
77 | register short *sp, *sp1; | 85 | register short *sp, *sp1; | |
78 | - register i1, i2; | 86 | - register i1, i2; | |
79 | + register int i1, i2; | 87 | + register int i1, i2; | |
80 | 88 | |||
81 | sp = (short *)buf; | 89 | sp = (short *)buf; | |
82 | i2 = sp[0]; | 90 | i2 = sp[0]; | |
83 | @@ -667,7 +669,7 @@ char buf[PBLKSIZ]; | 91 | @@ -667,7 +665,7 @@ char buf[PBLKSIZ]; | |
84 | datum item, item1; | 92 | datum item, item1; | |
85 | { | 93 | { | |
86 | register short *sp; | 94 | register short *sp; | |
87 | - register i1, i2; | 95 | - register i1, i2; | |
88 | + register int i1, i2; | 96 | + register int i1, i2; | |
89 | 97 | |||
90 | sp = (short *)buf; | 98 | sp = (short *)buf; | |
91 | i1 = PBLKSIZ; | 99 | i1 = PBLKSIZ; | |
92 | @@ -695,7 +697,7 @@ static | 100 | @@ -695,7 +693,7 @@ static | |
93 | chkblk(char buf[PBLKSIZ]) | 101 | chkblk(char buf[PBLKSIZ]) | |
94 | { | 102 | { | |
95 | register short *sp; | 103 | register short *sp; | |
96 | - register t, i; | 104 | - register t, i; | |
97 | + register int t, i; | 105 | + register int t, i; | |
98 | 106 | |||
99 | sp = (short *)buf; | 107 | sp = (short *)buf; | |
100 | t = PBLKSIZ; | 108 | t = PBLKSIZ; | |
101 | @@ -719,7 +721,7 @@ int | 109 | @@ -719,7 +717,7 @@ int | |
102 | convert_after_read(char buf[PBLKSIZ]) | 110 | convert_after_read(char buf[PBLKSIZ]) | |
103 | { | 111 | { | |
104 | register short *sp; | 112 | register short *sp; | |
105 | - register t, i; | 113 | - register t, i; | |
106 | + register int t, i; | 114 | + register int t, i; | |
107 | 115 | |||
108 | sp = (short *)buf; | 116 | sp = (short *)buf; | |
109 | sp[0] = ntohs(sp[0]); | 117 | sp[0] = ntohs(sp[0]); | |
110 | @@ -745,7 +747,7 @@ int | 118 | @@ -745,7 +743,7 @@ int | |
111 | convert_before_write(char buf[PBLKSIZ]) | 119 | convert_before_write(char buf[PBLKSIZ]) | |
112 | { | 120 | { | |
113 | register short *sp; | 121 | register short *sp; | |
114 | - register t, i; | 122 | - register t, i; | |
115 | + register int t, i; | 123 | + register int t, i; | |
116 | 124 | |||
117 | sp = (short *)buf; | 125 | sp = (short *)buf; | |
118 | t = PBLKSIZ; | 126 | t = PBLKSIZ; |
@@ -1,19 +1,28 @@ | @@ -1,19 +1,28 @@ | |||
1 | $NetBSD: patch-tools_System.c,v 1.1 2023/01/22 20:08:17 vins Exp $ | 1 | $NetBSD: patch-tools_System.c,v 1.2 2023/07/07 12:45:25 nia Exp $ | |
2 | 2 | |||
3 | Avoid int to pointer conversion warnings. | 3 | Avoid int to pointer conversion warnings. | |
4 | 4 | |||
5 | --- tools/System.c.orig 1997-05-07 20:15:47.000000000 +0000 | 5 | --- tools/System.c.orig 1997-05-07 20:15:47.000000000 +0000 | |
6 | +++ tools/System.c | 6 | +++ tools/System.c | |
7 | @@ -35,7 +35,7 @@ static char SCCSID[] = "@(#) Module: Sys | |||
8 | -- Include files | |||
9 | ----------------------------------------------------------------------------*/ | |||
10 | ||||
11 | -#include <malloc.h> | |||
12 | +#include <stdlib.h> | |||
13 | #include <stdio.h> | |||
14 | #include <stdlib.h> | |||
15 | #include <string.h> | |||
7 | @@ -102,8 +102,8 @@ void | 16 | @@ -102,8 +102,8 @@ void | |
8 | if( line_no > 0 ) | 17 | if( line_no > 0 ) | |
9 | printf( "%s: (%d), ", file_name, line_no ); | 18 | printf( "%s: (%d), ", file_name, line_no ); | |
10 | 19 | |||
11 | - printf( "SysBaseCalloc(), ref: %d, ref_count: %d\n", | 20 | - printf( "SysBaseCalloc(), ref: %d, ref_count: %d\n", | |
12 | - (int) ref, memory_ref_count ); | 21 | - (int) ref, memory_ref_count ); | |
13 | + printf( "SysBaseCalloc(), ref: %p, ref_count: %d\n", | 22 | + printf( "SysBaseCalloc(), ref: %p, ref_count: %d\n", | |
14 | + ref, memory_ref_count ); | 23 | + ref, memory_ref_count ); | |
15 | 24 | |||
16 | memory_ref_count++; | 25 | memory_ref_count++; | |
17 | } | 26 | } | |
18 | @@ -133,8 +133,8 @@ void | 27 | @@ -133,8 +133,8 @@ void | |
19 | if( line_no > 0 ) | 28 | if( line_no > 0 ) |