--- firebird-1.5.0.4290/src/extern/editline/editline.c.orig 2003-11-13 08:28:47.000000000 +0100 +++ firebird-1.5.0.4290/src/extern/editline/editline.c 2004-05-28 12:17:26.000000000 +0200 @@ -5,6 +5,11 @@ #include "editline.h" #include #include +#include +#include +#if defined(USE_TERMCAP) +#include +#endif /* ** Manifest constants. @@ -104,14 +109,6 @@ ** Declarations. */ STATIC CHAR *editinput(); -extern int read(); -extern int write(); -#if defined(USE_TERMCAP) -extern char *getenv(); -extern char *tgetstr(); -extern int tgetent(); -extern int tgetnum(); -#endif /* defined(USE_TERMCAP) */ /* ** TTY input/output functions. --- firebird-1.5.0.4290/src/jrd/gdsold.h.orig 2003-06-05 12:12:45.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/gdsold.h 2004-05-28 16:25:57.000000000 +0200 @@ -253,7 +253,7 @@ FRBRD **, short); -ISC_STATUS GDS_EXPORT gds__ftof(char *, +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__ftof(char *, unsigned short, char *, unsigned short); @@ -270,7 +270,7 @@ ISC_STATUS GDS_EXPORT gds__print_status(ISC_STATUS *); -ISC_STATUS GDS_EXPORT gds__sqlcode(ISC_STATUS *); +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__sqlcode(ISC_STATUS *); ISC_STATUS GDS_EXPORT gds__ddl(ISC_STATUS *, FRBRD **, --- firebird-1.5.0.4290/src/jrd/gdsold.h.orig 2004-05-28 16:26:27.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/gdsold.h 2004-05-28 16:48:17.000000000 +0200 @@ -307,7 +307,7 @@ char *, char *); -ISC_STATUS GDS_EXPORT gds__event_block(char **, +SLONG /*ISC_STATUS*/ GDS_EXPORT gds__event_block(char **, char **, unsigned short, ...); --- firebird-1.5.0.4290/src/jrd/cvt.cpp.orig 2003-08-11 23:42:58.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/cvt.cpp 2004-05-28 23:14:53.000000000 +0200 @@ -192,6 +192,9 @@ static const SQUAD quad_min_int = { LONG_MIN, 0 }; static const SQUAD quad_max_int = { LONG_MAX, -1 }; #endif +#else +#define quad_min_int LONG_MIN +#define quad_max_int LONG_MAX #endif static const TEXT *const months[] = { @@ -898,7 +901,7 @@ length = CVT_make_string(desc, ttype_ascii, &p, (VARY *) buffer, sizeof(buffer), err); - scale -= decompose(p, length, dtype_quad, &value.high, err); + scale -= decompose(p, length, dtype_quad, (SLONG *) & value, err); break; case dtype_blob: @@ -950,7 +953,8 @@ else do { if (value > QUAD_LIMIT || value < -QUAD_LIMIT) - (*err) (gds_arith_except, 0); + reinterpret_cast < pfn_cvt_private_cludge > + (err) (gds_arith_except, 0); value *= 10; } while (++scale); #endif --- firebird-1.5.0.4290/src/jrd/ail.cpp.orig 2003-04-16 12:17:24.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/ail.cpp 2004-05-28 23:25:25.000000000 +0200 @@ -552,8 +552,8 @@ reinterpret_cast < UCHAR * >(journal_name), CLUMP_ADD, 0); PAG_add_clump(HEADER_PAGE, HDR_backup_info, d_len, data, CLUMP_ADD, 1); WAL_flush(tdbb->tdbb_status_vector, dbb->dbb_wal, - reinterpret_cast < long *>(&seqno), - reinterpret_cast < long *>(&offset), FALSE); + reinterpret_cast < SLONG *>(&seqno), + reinterpret_cast < SLONG *>(&offset), FALSE); } @@ -995,8 +995,8 @@ h_length, data, d_length, - reinterpret_cast < long *>(seqno), - reinterpret_cast < long *>(offset)); + reinterpret_cast < SLONG *>(seqno), + reinterpret_cast < SLONG *>(offset)); THREAD_ENTER; } --- firebird-1.5.0.4290/src/jrd/blb.cpp.orig 2003-04-10 08:49:10.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/blb.cpp 2004-05-28 23:27:47.000000000 +0200 @@ -241,7 +241,7 @@ if (BLF_create_blob(tdbb, transaction, &blob->blb_filter, - reinterpret_cast < long *>(blob_id), + reinterpret_cast < SLONG *>(blob_id), bpb_length, bpb, reinterpret_cast < long (*)() > (blob_filter), @@ -1088,7 +1088,7 @@ if (BLF_open_blob(tdbb, transaction, &control, - reinterpret_cast < long *>(blob_id), + reinterpret_cast < SLONG *>(blob_id), bpb_length, bpb, reinterpret_cast < long (*)() > (blob_filter), --- firebird-1.5.0.4290/src/jrd/cch.cpp.orig 2003-05-16 22:35:06.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/cch.cpp 2004-05-28 23:30:26.000000000 +0200 @@ -5542,8 +5542,8 @@ if (dbb->dbb_wal) WAL_flush(status, dbb->dbb_wal, - reinterpret_cast < long *>(&page->pag_seqno), - reinterpret_cast < long *>(&page->pag_offset), TRUE); + reinterpret_cast < SLONG *>(&page->pag_seqno), + reinterpret_cast < SLONG *>(&page->pag_offset), TRUE); #ifdef DEBUG_SAVE_BDB_PAGE /* Save page number into page->pag_offset before computing the checksum */ --- firebird-1.5.0.4290/src/jrd/common.h.orig 2004-05-28 22:16:09.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/common.h 2004-05-28 23:36:22.000000000 +0200 @@ -97,11 +97,18 @@ #ifdef LINUX #define QUADFORMAT "ll" #define QUADCONST(n) (n##LL) +#if SIZEOF_LONG == 8 + /* EKU: Firebird requires (S)LONG to be 32 bit */ +#define SLONGFORMAT "d" +#define ULONGFORMAT "u" +#define XLONGFORMAT "X" +#define xLONGFORMAT "x" +#else #define SLONGFORMAT "ld" #define ULONGFORMAT "lu" #define XLONGFORMAT "lX" #define xLONGFORMAT "lx" - +#endif #define __LINE__IS_INT --- firebird-1.5.0.4290/src/jrd/jrd.cpp.orig 2004-01-28 10:28:39.000000000 +0100 +++ firebird-1.5.0.4290/src/jrd/jrd.cpp 2004-05-28 23:56:05.000000000 +0200 @@ -2693,7 +2693,7 @@ reinterpret_cast < BID > (array_id), sdl, param_length, - reinterpret_cast < long *>(param), + reinterpret_cast < SLONG *>(param), slice_length, slice); } catch (const std::exception&) @@ -2885,7 +2885,7 @@ reinterpret_cast < BID > (array_id), sdl, param_length, - reinterpret_cast < long *>(param), slice_length, slice); + reinterpret_cast < SLONG *>(param), slice_length, slice); } catch (const std::exception&) { --- firebird-1.5.0.4290/src/jrd/rec.cpp.orig 2003-04-03 15:52:36.000000000 +0200 +++ firebird-1.5.0.4290/src/jrd/rec.cpp 2004-05-29 00:00:16.000000000 +0200 @@ -1061,8 +1061,8 @@ WALR_get(tdbb->tdbb_status_vector, reinterpret_cast < walrs * >(WALRS_handle), wal_buff, reinterpret_cast < USHORT * >(&len), - reinterpret_cast < long *>(&seqno), - reinterpret_cast < long *>(&offset)); + reinterpret_cast < SLONG *>(&seqno), + reinterpret_cast < SLONG *>(&offset)); if (ret_val == -1) /* done processing */ break; else if (ret_val != FB_SUCCESS) { --- firebird-1.5.0.4290/src/remote/xdr.cpp.orig 2004-05-28 22:16:09.000000000 +0200 +++ firebird-1.5.0.4290/src/remote/xdr.cpp 2004-05-29 00:05:08.000000000 +0200 @@ -754,10 +754,10 @@ switch (xdrs->x_op) { case XDR_ENCODE: - return PUTLONG(xdrs, reinterpret_cast < long *>(ip)); + return PUTLONG(xdrs, reinterpret_cast < SLONG *>(ip)); case XDR_DECODE: - if (!GETLONG(xdrs, reinterpret_cast < long *>(ip))) + if (!GETLONG(xdrs, reinterpret_cast < SLONG *>(ip))) return FALSE; return TRUE; --- firebird-1.5.0.4290/src/jrd/evl.cpp.orig 2003-12-22 18:43:39.000000000 +0100 +++ firebird-1.5.0.4290/src/jrd/evl.cpp 2004-05-29 00:44:05.000000000 +0200 @@ -1652,7 +1652,7 @@ asb_impure = (IASB) ((SCHAR *) request + asb->nod_impure); if (SORT_put(tdbb->tdbb_status_vector, reinterpret_cast(asb_impure->iasb_sort_handle), - reinterpret_cast(&data))) + reinterpret_cast(&data))) { ERR_punt(); } --- firebird-1.5.0.4290/src/gpre/int.cpp.orig 2003-07-02 20:58:41.000000000 +0200 +++ firebird-1.5.0.4290/src/gpre/int.cpp 2004-05-29 15:41:48.000000000 +0200 @@ -638,7 +638,7 @@ static void gen_type( ACT action, int column) { - printa(column, "%ld", (SLONG) action->act_object); + printa(column, "%" SLONGFORMAT, (SLONG) action->act_object); }