Subject | Re: UDF & ISC_QUAD typedef compiled with gcc (64 bit ) |
---|---|
Author | ma_golyo |
Post date | 2012-06-01T09:04:35Z |
I have found the solution in ibase.h. :)
#if defined(_LP64) || defined(__LP64__) || defined(__arch64__)
typedef int ISC_LONG;
typedef unsigned int ISC_ULONG;
#else
typedef signed long ISC_LONG;
typedef unsigned long ISC_ULONG;
#endif
struct GDS_QUAD_t {
ISC_LONG gds_quad_high;
ISC_ULONG gds_quad_low;
};
typedef struct GDS_QUAD_t GDS_QUAD;
typedef struct GDS_QUAD_t ISC_QUAD;
#if defined(_LP64) || defined(__LP64__) || defined(__arch64__)
typedef int ISC_LONG;
typedef unsigned int ISC_ULONG;
#else
typedef signed long ISC_LONG;
typedef unsigned long ISC_ULONG;
#endif
struct GDS_QUAD_t {
ISC_LONG gds_quad_high;
ISC_ULONG gds_quad_low;
};
typedef struct GDS_QUAD_t GDS_QUAD;
typedef struct GDS_QUAD_t ISC_QUAD;
--- In firebird-support@yahoogroups.com, "ma_golyo" <ma_golyo@...> wrote:
>
> Hi!
>
> Current c code :
>
> typedef struct {
> #ifdef __LP64__
> signed long slong;
> unsigned long ulong;
> #else
> signed int slong;
> unsigned int ulong;
> #endif
> } ISC_QUAD;
>
>
> It's OK on win32, win64, linux32.
> It's not ON linux64, time fraction is incorrect.
>
> What do I need to change to get good result on linux64?
>
> PS: It's also strange that win64 is OK, but linux64 not.
>