Re: [gnome-db] ODBC provider on MinGW/MSYS



>   reason: the Windows ODBC stuff doesn't live under a w32api on MinGW
>   the cleanest solution would be to patch configure.in and after the block:
>                 if test -f $d/$lib/w32api/libodbc32.a -a -f
> $d/include/w32api/sql.h
>                 then
>                         AC_MSG_RESULT(found ODBC32 in $d)
>                         odbclib="-lodbc32"
>                         odbcdir=$d
>                         break
>                 fi
>   add the block:
>                 if test -f $d/$lib/libodbc32.a -a -f $d/include/sql.h
>                 then
>                         AC_MSG_RESULT(found ODBC32 in $d)
>                         odbclib="-lodbc32"
>                         odbcdir=$d
>                         break
>                 fi

OK.

Does this mean you will apply this change?
 

> - in providers/odbc/gda-odbc.h replace the line:
>                 #if defined(__CYGWIN__)
>   with:
>                 defined(G_OS_WIN32)

You need to use G_PLATFORM_WIN32 instead, as with anything common to
both Cygwin and MinGW.

> - in providers/odbc/gda-odbc-provider.h replace the line:
>                 #ifdef __CYGWIN__
>   with:
>                 defined(G_OS_WIN32)

Ditto for G_PLATFORM_WIN32.

I recently suggested adding something like
    #ifdef G_OS_WIN32
      #define strtok_r(s,d,p) strtok(s,d)
    #endif
to libgda/gda-decl.h.
Should this also be G_PLATFORM_WIN32 instead?
Or does Cygwin have strtok_r and should the ifdef only apply to MinGW?
 

> Can you please implement these changes?

In the future, could someone CC: me on proposed MinGW changes?  There's
some overlap, and I would like to avoid unnecessary breakage.

Ok. I agree there is certainly a lot of overlap.
In fact, if the Cygwin effords would not have been done I'm pretty sure porting to MinGW would have been even harder than it was now.
 

> I'm sure more reports like this will follow because I also have problems
> compiling the providers for MySQL, PostgreSQL and Oracle.

You will want to check these bugs first:
http://bugzilla.gnome.org/show_bug.cgi?id=349548
http://bugzilla.gnome.org/show_bug.cgi?id=411811
http://bugzilla.gnome.org/show_bug.cgi?id=412122
http://bugzilla.gnome.org/show_bug.cgi?id=418116

Yaakov
Cygwin Ports



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]