SOURCES: unixODBC-types.patch - do it the riht way using SIZEOF_LONG

Jakub Bogusz qboosh w pld-linux.org
Pią, 8 Paź 2004, 10:54:46 CEST


On Sun, Oct 03, 2004 at 01:39:00AM +0000, havner wrote:
> Author: havner                       Date: Sun Oct  3 01:39:00 2004 GMT
> Module: SOURCES                       Tag: HEAD
> ---- Log message:
> - do it the riht way using SIZEOF_LONG
> 
> ---- Files affected:
> SOURCES:
>    unixODBC-types.patch (1.1 -> 1.2) 
> 
> ---- Diffs:
> 
> ================================================================
> Index: SOURCES/unixODBC-types.patch
> diff -u SOURCES/unixODBC-types.patch:1.1 SOURCES/unixODBC-types.patch:1.2
> --- SOURCES/unixODBC-types.patch:1.1	Sat Oct  2 23:14:42 2004
> +++ SOURCES/unixODBC-types.patch	Sun Oct  3 01:38:54 2004
> @@ -1,15 +1,19 @@
>  diff -ur unixODBC-2.2.9.orig/include/sqltypes.h unixODBC-2.2.9/include/sqltypes.h
>  --- unixODBC-2.2.9.orig/include/sqltypes.h	2004-06-25 19:01:15.000000000 +0200
> -+++ unixODBC-2.2.9/include/sqltypes.h	2004-10-03 00:51:29.842492392 +0200
> -@@ -256,9 +256,9 @@
> ++++ unixODBC-2.2.9/include/sqltypes.h	2004-10-03 03:35:55.969613088 +0200
> +@@ -256,9 +256,14 @@
>   typedef signed short int        SWORD;
>   typedef unsigned short int      UWORD;
>   typedef unsigned int            UINT;
> --typedef signed long             SLONG;
> ++#if (SIZEOF_LONG == 4)
> + typedef signed long             SLONG;
> +-typedef signed short            SSHORT;
> + typedef unsigned long           ULONG;
> ++#else
>  +typedef signed int              SLONG;
> - typedef signed short            SSHORT;
> --typedef unsigned long           ULONG;
>  +typedef unsigned int            ULONG;
> ++#endif
> ++typedef signed short            SSHORT;
>   typedef unsigned short          USHORT;
>   typedef double                  SDOUBLE;
>   typedef double            		LDOUBLE;

Skąd informacja, że SLONG/ULONG w API/ABI ODBC mają być 32-bitowe?
Jest to w jakiejś specyfikacji ODBC?

Druga rzecz, to taka zmiana wymaga zmiany SONAME na 64-bitowych
architekturach ze względu na binarną niekompatybilność.


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/




Więcej informacji o liście dyskusyjnej pld-devel-pl