diff options
Diffstat (limited to 'news/nn/patches/patch-ak')
-rw-r--r-- | news/nn/patches/patch-ak | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/news/nn/patches/patch-ak b/news/nn/patches/patch-ak new file mode 100644 index 00000000000..d89a4ec6871 --- /dev/null +++ b/news/nn/patches/patch-ak @@ -0,0 +1,157 @@ +$NetBSD: patch-ak,v 1.1 1999/07/26 21:19:28 tron Exp $ + +--- db.c.orig Thu Nov 25 10:39:33 1993 ++++ db.c Mon Jul 26 23:11:38 1999 +@@ -1055,7 +1055,7 @@ + + if (!db_sequential) + fseek(master_file, +- (off_t)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + ++ (long)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); + + if (fread((char *)buf, sizeof(net_long), GROUP_FIELDS, master_file) != GROUP_FIELDS) +@@ -1075,7 +1075,7 @@ + #else + if (!db_sequential) + fseek(master_file, +- (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); ++ (long)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); + + if (fread((char *)gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, master_file) != 1) + goto err; +@@ -1097,7 +1097,7 @@ + + if (!db_sequential) + fseek(master_file, +- (off_t)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + ++ (long)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); + + buf[0] = gh->first_db_article; +@@ -1115,7 +1115,7 @@ + goto err; + #else + if (!db_sequential) +- fseek(master_file, (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); ++ fseek(master_file, (long)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); + + + if (fwrite((char *)gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, master_file) != 1) +@@ -1188,10 +1188,10 @@ + + + #ifndef NOV +-off_t db_read_art(f) ++long db_read_art(f) + FILE *f; + { +- off_t bytes; ++ long bytes; + + #ifdef NETWORK_DATABASE + net_long buf[ARTICLE_FIELDS]; +@@ -1368,7 +1368,7 @@ + * fill in db_hdr and db_data from the overview data for the next + * article in this group. does weirdo nn encodings of header fields. + */ +-off_t ++long + db_read_art(f) + FILE *f; + { +@@ -1564,32 +1564,32 @@ + } + + +-off_t get_index_offset(gh, art_num) ++long get_index_offset(gh, art_num) + group_header *gh; + article_number art_num; + { + #ifdef NETWORK_DATABASE +- return (off_t)((art_num - gh->first_db_article) * sizeof(net_long)); ++ return (long)((art_num - gh->first_db_article) * sizeof(net_long)); + #else +- return (off_t)((art_num - gh->first_db_article) * sizeof(off_t)); ++ return (long)((art_num - gh->first_db_article) * sizeof(long)); + #endif + } + +-off_t get_data_offset(gh, art_num) ++long get_data_offset(gh, art_num) + group_header *gh; + article_number art_num; + { + FILE *index; +- off_t data_offset; ++ long data_offset; + +- if (gh->first_db_article == art_num) return (off_t)0; ++ if (gh->first_db_article == art_num) return (long)0; + + index = open_data_file(gh, 'x', OPEN_READ); +- if (index == NULL) return (off_t)(-1); ++ if (index == NULL) return (long)(-1); + + fseek(index, get_index_offset(gh, art_num), 0); + if (!db_read_offset(index, &data_offset)) +- data_offset = (off_t)(-1); ++ data_offset = (long)(-1); + + fclose(index); + +@@ -1600,7 +1600,7 @@ + int + db_read_offset(f, offset) + FILE *f; +-off_t *offset; ++long *offset; + { + #ifdef NETWORK_DATABASE + net_long temp; +@@ -1613,7 +1613,7 @@ + *offset = temp; + #else + +- if (fread((char *)offset, sizeof(off_t), 1, f) != 1) return 0; ++ if (fread((char *)offset, sizeof(long), 1, f) != 1) return 0; + #endif + return 1; + } +@@ -1621,7 +1621,7 @@ + int + db_write_offset(f, offset) + FILE *f; +-off_t *offset; ++long *offset; + { + #ifdef NETWORK_DATABASE + net_long temp; +@@ -1635,7 +1635,7 @@ + + #else + +- if (fwrite((char *)offset, sizeof(off_t), 1, f) != 1) return 0; ++ if (fwrite((char *)offset, sizeof(long), 1, f) != 1) return 0; + #endif + return 1; + } +@@ -1659,7 +1659,7 @@ + int + db_read_offset(f, offset) + FILE *f; +-off_t *offset; ++long *offset; + { + nn_exitmsg(50, "STUB ROUTINE CALLED: db_read_offset\n"); + return -1; +@@ -1683,7 +1683,7 @@ + return NULL; + } + +-off_t ++long + get_index_offset(gh, art_num) + group_header *gh; + article_number art_num; |