-
-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Submitted by: christophe derenne (cdr60530)
Votes: 1
Using a personnal udf library that works since a long time ago, from firebird 1 to firebird 2.5 (classic server 32 bits only)
Trying to migrate to firebird superserver 64 bits.
Own source compiled without troubles in 64 bits mode, using gcc
linking OK (using ld) excepts necessity to make a symbolink link to http://fbudf.so in /var/lib64 otherwire, http://fbudf.so is not found found when executing (small bug in firebird installation ?)
But all functions that uses isc_encode_timestamp or isc_decode_timestamp makes firebird superserver crash.
Exemple :
ISC_TIMESTAMP * First_Day_Of(int *,int *);
ISC_TIMESTAMP * First_Day_Of(mm,aa)
int \*mm,\*aa;
{
ISC_TIMESTAMP *buffer = (ISC_TIMESTAMP*)ib_util_malloc(sizeof(ISC_TIMESTAMP));
time_t t;
typedef struct tm tm;
struct tm{
int tm_sec;int tm_min;int tm_hour;
int tm_mday;int tm_mon;int tm_year;
int tm_wday;int tm_yday;int tm_isdst;
};
tm *currtime = (tm*)ib_util_malloc(sizeof( tm));
t = time(NULL);
currtime = localtime(&t);
currtime->tm_year = ( *aa + currtime->tm_year );
currtime->tm_mon = ( *mm - 1 );
currtime->tm_mday = 1;
currtime->tm_sec = 0;
currtime->tm_min = 0;
currtime->tm_hour = 0;
isc_encode_timestamp(currtime,buffer);
return buffer;
}
This code code works on Firebird classique 32 bits, (Linux and windows) not on firebird superserver 64 bits.
Don't know about firebird-superserver 32 bits.