You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
two #defines in the API ibase.h use bit-shift operation without respect to the cpu byte order
currently it will work only on low-endian types
#defines are:
ADD_SPB_LENGTH and ADD_SPB_NUMERIC
The ibase.h was taken from Firebird-2.1.1.17910-0_Win32.zip distribution. So, maybe this is the case for win32 header file.
Also that same code can be seen in the original InterBase.
(At least #defines quoted in the "Using the InterBase services manager" article from http://dn.codegear.com/print/27002)
The text was updated successfully, but these errors were encountered:
Andrej, I'm not sure about codegear (and embarcadero) articles, specially taking into an account that link is already invalid. What about defines in firebird code - they are absolutely correct and work correctly for both little- and big-endians. I've added trivial test - on both amd64 and parisc it produces same output:
3412
which is correct and expected.
Submitted by: Andrej Pakhutin (kadavris)
Attachments:
spbtest.c
two #defines in the API ibase.h use bit-shift operation without respect to the cpu byte order
currently it will work only on low-endian types
#defines are:
ADD_SPB_LENGTH and ADD_SPB_NUMERIC
The ibase.h was taken from Firebird-2.1.1.17910-0_Win32.zip distribution. So, maybe this is the case for win32 header file.
Also that same code can be seen in the original InterBase.
(At least #defines quoted in the "Using the InterBase services manager" article from http://dn.codegear.com/print/27002)
The text was updated successfully, but these errors were encountered: