]> git.pld-linux.org Git - packages/poldek.git/blob - poldek-types.patch
- type fixes, incl. SEGV on 64-bit archs
[packages/poldek.git] / poldek-types.patch
1 --- poldek-cvs20040323/pkgdir_digest.c.orig     2002-05-15 17:53:22.000000000 +0200
2 +++ poldek-cvs20040323/pkgdir_digest.c  2004-04-24 23:39:17.927522138 +0200
3 @@ -197,7 +197,8 @@
4  static
5  int hdr_digest(FILE *stream, unsigned char *md, int *md_size, EVP_MD_CTX *_ctx)
6  {
7 -    int             line_size = 0, nread, len, endvhdr_found = 0;
8 +    size_t          line_size = 0;
9 +    int             nread, len, endvhdr_found = 0;
10      unsigned char   buf[256];
11      char            *linebuf = NULL;
12      EVP_MD_CTX      ctx;
13 --- poldek-cvs20040323/trurlib/n_array_dump_stats.c.orig        2000-10-29 22:12:21.000000000 +0100
14 +++ poldek-cvs20040323/trurlib/n_array_dump_stats.c     2004-04-24 23:45:50.159356575 +0200
15 @@ -5,6 +5,6 @@
16  void n_array_dump_stats(const tn_array *arr, const char *name)
17  {
18  
19 -    printf("\nArray \"%s\" [memsize, items, start_index] = %d, %d, %d\n",
20 +    printf("\nArray \"%s\" [memsize, items, start_index] = %zd, %zd, %zd\n",
21             name ? name : "", arr->allocated, arr->items, arr->start_index);
22  }
23 --- poldek-cvs20040323/trurlib/n_hash_stats.c.orig      2000-10-29 22:12:21.000000000 +0100
24 +++ poldek-cvs20040323/trurlib/n_hash_stats.c   2004-04-24 23:47:50.222234706 +0200
25 @@ -31,7 +31,7 @@
26              maxdeep = deep;
27      }
28  
29 -    printf("%p %d items, %d emptys, %d collisions, maxdeep %d\n", ht, 
30 +    printf("%p %zd items, %d emptys, %d collisions, maxdeep %d\n", ht, 
31             ht->items, nempts, ncolls, maxdeep);
32      return n;
33  }
34 --- poldek-cvs20040323/trurlib/nstr_tokl.c.orig 2003-04-30 17:53:02.000000000 +0200
35 +++ poldek-cvs20040323/trurlib/nstr_tokl.c      2004-04-24 23:48:43.078415374 +0200
36 @@ -24,6 +24,7 @@
37   */
38  #include <ctype.h>
39  #include <stdlib.h>
40 +#include <stdio.h>
41  #include <string.h>
42  
43  #include "nmalloc.h"
44 --- poldek-cvs20040323/vfile/vhttp/test_vhttp.c.orig    2002-04-08 19:21:37.000000000 +0200
45 +++ poldek-cvs20040323/vfile/vhttp/test_vhttp.c 2004-04-24 23:52:37.708518571 +0200
46 @@ -1,4 +1,5 @@
47  #include <stdio.h>
48 +#include <stdlib.h>
49  #include "vhttp.h"
50  #include "http.h"
51  
52 --- poldek-cvs20040323/pkgdir.c.orig    2004-03-11 00:27:42.000000000 +0100
53 +++ poldek-cvs20040323/pkgdir.c 2004-04-24 23:57:45.955765417 +0200
54 @@ -509,7 +509,8 @@
55      char            *dn, *bn;
56      struct vfile    *vf;
57      char            *linebuf = NULL;
58 -    int             line_size = 0, nread, nerr = 0, rc;
59 +    size_t          line_size = 0;
60 +    int             nread, nerr = 0, rc;
61      const char      *errmsg_broken_difftoc = _("%s: broken patch list");
62      char            current_mdd[PDIGEST_SIZE + 1];
63      struct pdigest  pdg_current;
64 @@ -719,7 +720,8 @@
65      struct pkgdir        *pkgdir = NULL;
66      struct vfile         *vf;
67      char                 *linebuf;
68 -    int                  line_size, nline;
69 +    size_t               line_size;
70 +    int                  nline;
71      int                  nerr = 0, nread;
72      struct pkgroup_idx   *pkgroups = NULL;
73      time_t               ts = 0, ts_orig = 0;
74 @@ -990,7 +992,7 @@
75      struct pkgtags_s   pkgt;
76      off_t              offs;
77      char               *linebuf;
78 -    int                line_size;
79 +    size_t             line_size;
80      int                nerr = 0, nread, i;
81      struct vfile       *vf;
82      int                flag_skip_bastards = 0, flag_fullflist = 0;
83 --- poldek-cvs20040323/rpm_signature.c.orig     2003-07-16 12:49:28.000000000 +0200
84 +++ poldek-cvs20040323/rpm_signature.c  2004-04-25 00:04:20.178184651 +0200
85 @@ -52,7 +52,15 @@
86  #include "capreq.h"
87  #include "rpmdb_it.h"
88  
89 -
90 +#ifdef HAVE_RPM_4_2
91 +/* from internal lib/signature.h, no public prototype (at least in 4.3 snaps) */
92 +typedef enum sigType_e {
93 +    RPMSIGTYPE_HEADERSIG= 5     /*!< Header style signature */
94 +} sigType;
95 +rpmRC rpmReadSignature(FD_t fd, Header *sighp, sigType sig_type, const char ** msg);
96 +/* lib/rpmlead.h */
97 +rpmRC readLead(FD_t fd, /*@out@*/ struct rpmlead *lead);
98 +#endif
99  
100  static int rpm_read_signature(FD_t fd, Header *sighp, int sig_type)
101  {
This page took 0.038106 seconds and 3 git commands to generate.