[unixODBC-dev] patch for __ptr_as_string prototype

Andrew Morrow andrew.c.morrow at gmail.com
Wed Apr 11 20:45:18 BST 2007


Hi,

On the CVS head, the prototype and definition of __ptr_as_string
currently disagree about the type of ptr. For LP64 platforms where the
sizes of SQLINTEGER and SQLLEN differ, this doesn't compile.

The following patch updates drivermanager.h to match the recent change
to __ptr_as_string in __info.c.

Index: drivermanager.h
===================================================================
RCS file: /cvsroot/unixodbc/unixODBC/DriverManager/drivermanager.h,v
retrieving revision 1.37
diff -c -r1.37 drivermanager.h
*** drivermanager.h     28 Feb 2007 15:37:49 -0000      1.37
--- drivermanager.h     10 Apr 2007 18:22:34 -0000
***************
*** 653,659 ****
 int wide_strlen( SQLWCHAR *str1 );
 int wide_ansi_strncmp( SQLWCHAR *str1, char *str2, int len );
 char * __get_pid( SQLCHAR *str );
! char * __ptr_as_string( SQLCHAR *s, SQLINTEGER *ptr );
 char * __sptr_as_string( SQLCHAR *s, SQLSMALLINT *ptr );
 char * __info_as_string( SQLCHAR *s, SQLINTEGER typ );
 void __clear_internal_error( struct error *error_handle );
--- 653,659 ----
 int wide_strlen( SQLWCHAR *str1 );
 int wide_ansi_strncmp( SQLWCHAR *str1, char *str2, int len );
 char * __get_pid( SQLCHAR *str );
! char * __ptr_as_string( SQLCHAR *s, SQLLEN *ptr );
 char * __sptr_as_string( SQLCHAR *s, SQLSMALLINT *ptr );
 char * __info_as_string( SQLCHAR *s, SQLINTEGER typ );
 void __clear_internal_error( struct error *error_handle );

Thanks,
Andrew



More information about the unixODBC-dev mailing list