]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird-types.patch
4abd7d98e2143926180f367e7d5cb23a950fc27e
[packages/Firebird.git] / Firebird-types.patch
1 --- firebird-1.5.0.4290/src/extern/editline/editline.c.orig     2003-11-13 08:28:47.000000000 +0100
2 +++ firebird-1.5.0.4290/src/extern/editline/editline.c  2004-05-28 12:17:26.000000000 +0200
3 @@ -5,6 +5,11 @@
4  #include "editline.h"
5  #include <signal.h>
6  #include <ctype.h>
7 +#include <unistd.h>
8 +#include <stdlib.h>
9 +#if defined(USE_TERMCAP)
10 +#include <termcap.h>
11 +#endif
12  
13  /*
14  **  Manifest constants.
15 @@ -104,14 +109,6 @@
16  **  Declarations.
17  */
18  STATIC CHAR    *editinput();
19 -extern int     read();
20 -extern int     write();
21 -#if    defined(USE_TERMCAP)
22 -extern char    *getenv();
23 -extern char    *tgetstr();
24 -extern int     tgetent();
25 -extern int     tgetnum();
26 -#endif /* defined(USE_TERMCAP) */
27  \f
28  /*
29  **  TTY input/output functions.
30 --- firebird-1.5.0.4290/src/jrd/gdsold.h.orig   2003-06-05 12:12:45.000000000 +0200
31 +++ firebird-1.5.0.4290/src/jrd/gdsold.h        2004-05-28 16:25:57.000000000 +0200
32 @@ -253,7 +253,7 @@
33                                                                                   FRBRD  **,
34                                                                                   short);
35  
36 -ISC_STATUS GDS_EXPORT gds__ftof(char  *,
37 +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__ftof(char  *,
38                                                           unsigned short,
39                                                           char  *,
40                                                           unsigned short);
41 @@ -270,7 +270,7 @@
42  
43  ISC_STATUS GDS_EXPORT gds__print_status(ISC_STATUS  *);
44  
45 -ISC_STATUS GDS_EXPORT gds__sqlcode(ISC_STATUS  *);
46 +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__sqlcode(ISC_STATUS  *);
47  
48  ISC_STATUS GDS_EXPORT gds__ddl(ISC_STATUS  *,
49                                                            FRBRD  **,
50 --- firebird-1.5.0.4290/src/jrd/gdsold.h.orig   2004-05-28 16:26:27.000000000 +0200
51 +++ firebird-1.5.0.4290/src/jrd/gdsold.h        2004-05-28 16:48:17.000000000 +0200
52 @@ -307,7 +307,7 @@
53                                                                   char  *,
54                                                                   char  *);
55  
56 -ISC_STATUS GDS_EXPORT gds__event_block(char  **,
57 +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__event_block(char  **,
58                                                                          char  **,
59                                                                          unsigned short, ...);
60  
61 --- firebird-1.5.0.4290/src/jrd/cvt.cpp.orig    2003-08-11 23:42:58.000000000 +0200
62 +++ firebird-1.5.0.4290/src/jrd/cvt.cpp 2004-05-28 23:14:53.000000000 +0200
63 @@ -192,6 +192,9 @@
64  static const SQUAD quad_min_int = { LONG_MIN, 0 };
65  static const SQUAD quad_max_int = { LONG_MAX, -1 };
66  #endif
67 +#else
68 +#define quad_min_int LONG_MIN
69 +#define quad_max_int LONG_MAX
70  #endif
71  
72  static const TEXT *const months[] = {
73 @@ -898,7 +901,7 @@
74                 length =
75                         CVT_make_string(desc, ttype_ascii, &p, (VARY *) buffer,
76                                                         sizeof(buffer), err);
77 -               scale -= decompose(p, length, dtype_quad, &value.high, err);
78 +               scale -= decompose(p, length, dtype_quad, (SLONG *) & value, err);
79                 break;
80  
81         case dtype_blob:
82 @@ -950,7 +953,8 @@
83         else
84                 do {
85                         if (value > QUAD_LIMIT || value < -QUAD_LIMIT)
86 -                               (*err) (gds_arith_except, 0);
87 +                               reinterpret_cast < pfn_cvt_private_cludge >
88 +                                       (err) (gds_arith_except, 0);
89                         value *= 10;
90                 } while (++scale);
91  #endif
92 --- firebird-1.5.0.4290/src/jrd/ail.cpp.orig    2003-04-16 12:17:24.000000000 +0200
93 +++ firebird-1.5.0.4290/src/jrd/ail.cpp 2004-05-28 23:25:25.000000000 +0200
94 @@ -552,8 +552,8 @@
95                                   reinterpret_cast < UCHAR * >(journal_name), CLUMP_ADD, 0);
96         PAG_add_clump(HEADER_PAGE, HDR_backup_info, d_len, data, CLUMP_ADD, 1);
97         WAL_flush(tdbb->tdbb_status_vector, dbb->dbb_wal,
98 -                         reinterpret_cast < long *>(&seqno),
99 -                         reinterpret_cast < long *>(&offset), FALSE);
100 +                         reinterpret_cast < SLONG *>(&seqno),
101 +                         reinterpret_cast < SLONG *>(&offset), FALSE);
102  }
103  
104  
105 @@ -995,8 +995,8 @@
106                         h_length,
107                         data,
108                         d_length,
109 -                       reinterpret_cast < long *>(seqno),
110 -                       reinterpret_cast < long *>(offset));
111 +                       reinterpret_cast < SLONG *>(seqno),
112 +                       reinterpret_cast < SLONG *>(offset));
113         THREAD_ENTER;
114  }
115  
116 --- firebird-1.5.0.4290/src/jrd/blb.cpp.orig    2003-04-10 08:49:10.000000000 +0200
117 +++ firebird-1.5.0.4290/src/jrd/blb.cpp 2004-05-28 23:27:47.000000000 +0200
118 @@ -241,7 +241,7 @@
119                 if (BLF_create_blob(tdbb,
120                                                         transaction,
121                                                         &blob->blb_filter,
122 -                                                       reinterpret_cast < long *>(blob_id),
123 +                                                       reinterpret_cast < SLONG *>(blob_id),
124                                                         bpb_length,
125                                                         bpb,
126                                                         reinterpret_cast < long (*)() > (blob_filter),
127 @@ -1088,7 +1088,7 @@
128                 if (BLF_open_blob(tdbb,
129                                                   transaction,
130                                                   &control,
131 -                                                 reinterpret_cast < long *>(blob_id),
132 +                                                 reinterpret_cast < SLONG *>(blob_id),
133                                                   bpb_length,
134                                                   bpb,
135                                                   reinterpret_cast < long (*)() > (blob_filter),
136 --- firebird-1.5.0.4290/src/jrd/cch.cpp.orig    2003-05-16 22:35:06.000000000 +0200
137 +++ firebird-1.5.0.4290/src/jrd/cch.cpp 2004-05-28 23:30:26.000000000 +0200
138 @@ -5542,8 +5542,8 @@
139                 if (dbb->dbb_wal)
140                         WAL_flush(status,
141                                           dbb->dbb_wal,
142 -                                         reinterpret_cast < long *>(&page->pag_seqno),
143 -                                         reinterpret_cast < long *>(&page->pag_offset), TRUE);
144 +                                         reinterpret_cast < SLONG *>(&page->pag_seqno),
145 +                                         reinterpret_cast < SLONG *>(&page->pag_offset), TRUE);
146  
147  #ifdef DEBUG_SAVE_BDB_PAGE
148                 /* Save page number into page->pag_offset before computing the checksum */
149 --- firebird-1.5.0.4290/src/jrd/common.h.orig   2004-05-28 22:16:09.000000000 +0200
150 +++ firebird-1.5.0.4290/src/jrd/common.h        2004-05-28 23:36:22.000000000 +0200
151 @@ -97,11 +97,18 @@
152  #ifdef LINUX
153  #define QUADFORMAT "ll"
154  #define QUADCONST(n) (n##LL)
155 +#if SIZEOF_LONG == 8
156 +       /* EKU: Firebird requires (S)LONG to be 32 bit */
157 +#define SLONGFORMAT "d"
158 +#define ULONGFORMAT "u"
159 +#define XLONGFORMAT "X"
160 +#define xLONGFORMAT "x"
161 +#else
162  #define SLONGFORMAT "ld"
163  #define ULONGFORMAT "lu"
164  #define XLONGFORMAT "lX"
165  #define xLONGFORMAT "lx"
166 -
167 +#endif
168  
169  #define __LINE__IS_INT
170  
171 --- firebird-1.5.0.4290/src/jrd/jrd.cpp.orig    2004-01-28 10:28:39.000000000 +0100
172 +++ firebird-1.5.0.4290/src/jrd/jrd.cpp 2004-05-28 23:56:05.000000000 +0200
173 @@ -2693,7 +2693,7 @@
174                                                                            reinterpret_cast < BID > (array_id),
175                                                                            sdl,
176                                                                            param_length,
177 -                                                                          reinterpret_cast < long *>(param),
178 +                                                                          reinterpret_cast < SLONG *>(param),
179                                                                            slice_length, slice);
180         }
181         catch (const std::exception&)
182 @@ -2885,7 +2885,7 @@
183                                   reinterpret_cast < BID > (array_id),
184                                   sdl,
185                                   param_length,
186 -                                 reinterpret_cast < long *>(param), slice_length, slice);
187 +                                 reinterpret_cast < SLONG *>(param), slice_length, slice);
188         }
189         catch (const std::exception&)
190         {
191 --- firebird-1.5.0.4290/src/jrd/rec.cpp.orig    2003-04-03 15:52:36.000000000 +0200
192 +++ firebird-1.5.0.4290/src/jrd/rec.cpp 2004-05-29 00:00:16.000000000 +0200
193 @@ -1061,8 +1061,8 @@
194                         WALR_get(tdbb->tdbb_status_vector,
195                                          reinterpret_cast < walrs * >(WALRS_handle), wal_buff,
196                                          reinterpret_cast < USHORT * >(&len),
197 -                                        reinterpret_cast < long *>(&seqno),
198 -                                        reinterpret_cast < long *>(&offset));
199 +                                        reinterpret_cast < SLONG *>(&seqno),
200 +                                        reinterpret_cast < SLONG *>(&offset));
201                 if (ret_val == -1)              /* done processing */
202                         break;
203                 else if (ret_val != FB_SUCCESS) {
204 --- firebird-1.5.0.4290/src/remote/xdr.cpp.orig 2004-05-28 22:16:09.000000000 +0200
205 +++ firebird-1.5.0.4290/src/remote/xdr.cpp      2004-05-29 00:05:08.000000000 +0200
206 @@ -754,10 +754,10 @@
207         switch (xdrs->x_op)
208         {
209         case XDR_ENCODE:
210 -               return PUTLONG(xdrs, reinterpret_cast < long *>(ip));
211 +               return PUTLONG(xdrs, reinterpret_cast < SLONG *>(ip));
212  
213         case XDR_DECODE:
214 -               if (!GETLONG(xdrs, reinterpret_cast < long *>(ip)))
215 +               if (!GETLONG(xdrs, reinterpret_cast < SLONG *>(ip)))
216                           return FALSE;
217                 return TRUE;
218  
219 --- firebird-1.5.0.4290/src/jrd/evl.cpp.orig    2003-12-22 18:43:39.000000000 +0100
220 +++ firebird-1.5.0.4290/src/jrd/evl.cpp 2004-05-29 00:44:05.000000000 +0200
221 @@ -1652,7 +1652,7 @@
222                                 asb_impure = (IASB) ((SCHAR *) request + asb->nod_impure);
223                                 if (SORT_put(tdbb->tdbb_status_vector,
224                                                          reinterpret_cast<scb*>(asb_impure->iasb_sort_handle),
225 -                                                        reinterpret_cast<unsigned long**>(&data)))
226 +                                                        reinterpret_cast<ULONG**>(&data)))
227                                 {
228                                           ERR_punt();
229                                 }
This page took 0.05705 seconds and 2 git commands to generate.