unixodbc-dev: 64bit typedefs don't work

Bug #620428 reported by Matthias Klose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unixodbc (Debian)
Fix Released
Unknown
unixodbc (Fedora)
Fix Released
Medium
unixodbc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: unixodbc

see the debian report.

patch from the fedora report.

  * Fix output of odbc_config --header, per Fedora bug #518623.
    This error results in SQLBIGINT and SQLUBIGINT being misdefined as
    int, where they need to be [unsigned] long or long long.

Revision history for this message
In , Caolan (caolan-redhat-bugs) wrote :

Created attachment 358225
get the defines into the headers

Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
#include <sqltypes.h>
#include <stdio.h>

int main(void)
{
        fprintf(stderr, "size is %d\n", sizeof(SQLBIGINT));
        return 0;
}

Actual results:
size is 4

Expected results:
I strongly suspect it should be 8

Additional info:
This comes about because /usr/include/unixodbc_conf_platform.h has just
#define ODBCINT64
which comes from odbc_config --header, it should be
#define ODBCINT64 "something"

A fix attached, which is basically derived from head unixODBC cvs. Quite possibly technically anything that built against our unixODBC headers is busted.

Revision history for this message
In , Caolan (caolan-redhat-bugs) wrote :

yeah, should be 8 not 4.

back in F-10 with unixODBC-2.2.12-9.fc10 we get 8
unix-ODBC-2.2.11 on debian gives 8

so it just looks like unixODBC-2.2.14 in F-11/rawhide that gives the incorrect 4

Revision history for this message
In , Tom (tom-redhat-bugs) wrote :

Hmm. Anything that mentioned ODBCINT64 directly would probably fail to compile, but it seems like gcc doesn't object to "typedef SQLBIGINT;" and treats it as implicitly int. So code referencing SQLBIGINT or SQLUBIGINT is at risk.

I will fix this in HEAD ... I am not sure if it's bright to back-patch into F-11, but on the other hand it's unlikely that could make things worse.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

unixODBC-2.2.14-6.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/unixODBC-2.2.14-6.fc11

Revision history for this message
In , Tom (tom-redhat-bugs) wrote :

Fix pushed into rawhide, also in F-11 testing.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

unixODBC-2.2.14-6.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update unixODBC'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8919

Revision history for this message
In , Jesse (jesse-redhat-bugs) wrote :

This has been fixed for F12, dropping it from the blocker.

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Caolan (caolan-redhat-bugs) wrote :

lets mark this as closed, as fixed since F-12

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unixodbc - 2.2.14p2-1ubuntu1

---------------
unixodbc (2.2.14p2-1ubuntu1) maverick; urgency=low

  * Fix output of odbc_config --header, per Fedora bug #518623.
    This error results in SQLBIGINT and SQLUBIGINT being misdefined as
    int, where they need to be [unsigned] long or long long. LP: #620428.
 -- Matthias Klose <email address hidden> Thu, 19 Aug 2010 14:59:56 +0200

Changed in unixodbc (Ubuntu):
status: New → Fix Released
Changed in unixodbc (Debian):
status: Unknown → Confirmed
Changed in unixodbc (Debian):
status: Confirmed → Fix Released
Changed in unixodbc (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.