[PATCH] VMS build update

"Craig A. Berry" <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <p0624080ac4586e85362d@[172.16.52.1]>
The attached patch against recent CVS gets the build into shape on
VMS.  Most of the changes are casts to function parameters to make
the compiler stop complaining about type mismatches.  The warnings
are attached in the file vmswarn.txt if anyone is interested.

There were two minor tweaks in vmsbuild.com.  Also, in the
VMS-specific linker options file, I removed the hard-coded path to
Nick's home directory :-).  In extras/vms.c, I added some code to
lt_dlopen to make it handle a driver name that is an absolute path in
unix syntax (for example when the Driver entry in odbcinst.ini has a
full path rather than the name of an entry in odbc.ini).

After these changes, I built the FreeTDS driver against it and got it
to pass its rather extensive test suite.

Let me know if there are any questions, comments, or concerns about the patch.
-- 
________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
vms_unixodbc_update.patch (application/octet-stream, 14.1 KB)
--- ./DriverManager/SQLDescribeCol.c;-0	Mon Apr  2 05:50:18 2007
+++ ./DriverManager/SQLDescribeCol.c	Wed May 14 07:23:52 2008
@@ -478,7 +478,7 @@ SQLRETURN SQLDescribeCol( SQLHSTMT state
                     __sdata_as_string( s1, SQL_CHAR, 
                         name_length, column_name ),
                     __sptr_as_string( s2, data_type ),
-                    __ptr_as_string( s3, column_size ),
+                    __ptr_as_string( s3, (SQLLEN *)column_size ),
                     __sptr_as_string( s4, decimal_digits ),
                     __sptr_as_string( s5, nullable ));
 		}
--- ./DriverManager/SQLDescribeColW.c;-0	Mon Apr  2 05:50:18 2007
+++ ./DriverManager/SQLDescribeColW.c	Wed May 14 07:24:58 2008
@@ -440,7 +440,7 @@ SQLRETURN SQLDescribeColW( SQLHSTMT stat
                     __sdata_as_string( s1, SQL_CHAR, 
                         name_length, column_name ),
                     __sptr_as_string( s2, data_type ),
-                    __ptr_as_string( s3, column_size ),
+                    __ptr_as_string( s3, (SQLLEN *)column_size ),
                     __sptr_as_string( s4, decimal_digits ),
                     __sptr_as_string( s5, nullable ));
 		}
--- ./DriverManager/SQLDescribeParam.c;-0	Mon Apr  2 05:50:19 2007
+++ ./DriverManager/SQLDescribeParam.c	Wed May 14 07:31:04 2008
@@ -320,7 +320,7 @@ SQLRETURN SQLDescribeParam(
                 \n\t\t\tNullable = %p",
                     __get_return_status( ret, s6 ),
                     __sptr_as_string( s1, pf_sql_type ),
-                    __ptr_as_string( s2, pcb_param_def ),
+                    __ptr_as_string( s2, (SQLLEN *)pcb_param_def ),
                     __sptr_as_string( s3, pib_scale ),
                     __sptr_as_string( s4, pf_nullable ));
 
--- ./DriverManager/SQLError.c;-0	Thu Feb 27 06:19:39 2003
+++ ./DriverManager/SQLError.c	Wed May 14 07:31:04 2008
@@ -364,7 +364,7 @@ SQLRETURN SQLError( SQLHENV environment_
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, message_text ));
             }
@@ -446,7 +446,7 @@ SQLRETURN SQLError( SQLHENV environment_
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, message_text ));
             }
@@ -526,7 +526,7 @@ SQLRETURN SQLError( SQLHENV environment_
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, message_text ));
             }
--- ./DriverManager/SQLErrorW.c;-0	Wed Feb 28 09:37:48 2007
+++ ./DriverManager/SQLErrorW.c	Wed May 14 07:31:04 2008
@@ -291,7 +291,7 @@ SQLRETURN SQLErrorW( SQLHENV environment
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         ( ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, statement -> connection )),
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, statement -> connection ))));
 
@@ -411,7 +411,7 @@ SQLRETURN SQLErrorW( SQLHENV environment
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ),
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, connection ))));
 
@@ -495,7 +495,7 @@ SQLRETURN SQLErrorW( SQLHENV environment
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, NULL ),
-                        __ptr_as_string( s0, native_error ),
+                        __ptr_as_string( s0, (SQLLEN *)native_error ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, NULL ))));
 
--- ./DriverManager/SQLGetDiagRec.c;-0	Mon Feb 12 05:49:34 2007
+++ ./DriverManager/SQLGetDiagRec.c	Wed May 14 07:32:32 2008
@@ -599,7 +599,7 @@ SQLRETURN SQLGetDiagRec( SQLSMALLINT han
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native ),
+                        __ptr_as_string( s0, (SQLLEN *)native ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length_ptr, message_text ));
             }
@@ -677,7 +677,7 @@ SQLRETURN SQLGetDiagRec( SQLSMALLINT han
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native ),
+                        __ptr_as_string( s0, (SQLLEN *)native ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length_ptr, message_text ));
             }
@@ -755,7 +755,7 @@ SQLRETURN SQLGetDiagRec( SQLSMALLINT han
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native ),
+                        __ptr_as_string( s0, (SQLLEN *)native ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length_ptr, message_text ));
             }
@@ -833,7 +833,7 @@ SQLRETURN SQLGetDiagRec( SQLSMALLINT han
                     \n\t\t\tMessage Text = %s",
                         __get_return_status( ret, s2 ),
                         sqlstate,
-                        __ptr_as_string( s0, native ),
+                        __ptr_as_string( s0, (SQLLEN *)native ),
                         __sdata_as_string( s1, SQL_CHAR, 
                             text_length_ptr, message_text ));
             }
--- ./Drivers/PostgreSQL/results.c;-0	Thu Nov 29 06:00:31 2007
+++ ./Drivers/PostgreSQL/results.c	Wed May 14 20:48:02 2008
@@ -1159,7 +1159,7 @@ SQLRETURN  SQLExtendedFetch(
     return PG__SQLExtendedFetch( hstmt,
             fFetchType,
             irow,
-            pcrow,
+            (UDWORD FAR *)pcrow,
             rgfRowStatus );
 }
 
--- ./exe/isql.c;-0	Thu Dec 20 05:35:35 2007
+++ ./exe/isql.c	Tue May 13 07:20:20 2008
@@ -416,7 +416,7 @@ static SQLUINTEGER
 OptimalDisplayWidth( SQLHSTMT hStmt, SQLINTEGER nCol, int nUserWidth )
 {
 	SQLUINTEGER	nLabelWidth                     = 10;
-	SQLULEN	nDataWidth                      = 10;
+	SQLLEN	nDataWidth                      = 10;
 	SQLUINTEGER	nOptimalDisplayWidth            = 10;
 	SQLCHAR     szColumnName[MAX_DATA_WIDTH+1];	
 
--- ./exe/iusql.c;-0	Wed Feb 28 09:37:49 2007
+++ ./exe/iusql.c	Tue May 13 22:14:07 2008
@@ -714,7 +714,7 @@ void UWriteHeaderNormal( SQLHSTMT hStmt,
 {
     SQLINTEGER    	nCol            				= 0;
 	SQLSMALLINT		nColumns						= 0;
-	SQLULEN		    nMaxLength						= 10;
+	SQLLEN		    nMaxLength						= 10;
 	SQLTCHAR			szColumn[MAX_DATA_WIDTH+20];	
 	SQLTCHAR			szColumnName[MAX_DATA_WIDTH+1];	
 	SQLTCHAR			szHdrLine[32001];	
@@ -741,7 +741,7 @@ void UWriteHeaderNormal( SQLHSTMT hStmt,
 		strcat((char*) szSepLine,(char*) szColumn );
 
 		/* HDR */
-		sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*)szColumnName) ), szColumnName );
+		sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*)szColumnName) ), (char*)szColumnName );
         strcat((char*) szHdrLine,(char*) szColumn );
 	}
 	strcat((char*) szSepLine, "+\n" );
@@ -780,7 +780,7 @@ SQLLEN WriteBodyNormal( SQLHSTMT hStmt )
         for( nCol = 1; nCol <= nColumns; nCol++ )
         {
 			SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL );
-			SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, &nMaxLength );
+			SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, (SQLLEN *)&nMaxLength );
 
             uc_to_ascii( szColumnName );
 
--- ./exe/odbc-config.c;-0	Mon May 12 08:07:21 2008
+++ ./exe/odbc-config.c	Tue May 13 19:20:09 2008
@@ -22,6 +22,8 @@
  **********************************************************************/
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sql.h>
 
 static void usage( void )
--- ./odbcinst/SQLConfigDriver.c;-0	Tue Nov 27 11:52:56 2007
+++ ./odbcinst/SQLConfigDriver.c	Wed May 14 07:16:38 2008
@@ -180,7 +180,7 @@ BOOL INSTAPI SQLConfigDriver(HWND hwndPa
 	{
 		if ( ret && msg )
 		{
-			_single_copy_from_wide( lpszMsg, msg, len + 1 );
+			_single_copy_from_wide( (SQLCHAR *)lpszMsg, msg, len + 1 );
 		}
 	}
 	else 
--- ./odbcinst/SQLManageDataSources.c;-0	Sat Dec  1 10:51:41 2007
+++ ./odbcinst/SQLManageDataSources.c	Thu May 15 07:52:15 2008
@@ -151,7 +151,7 @@ BOOL SQLManageDataSources( HWND hWnd )
     if ( hDLL )
     {
         /* change the name (SQLManageDataSources to ODBCManageDataSources) to prevent us from calling ourself */
-        pSQLManageDataSources = (BOOL (*)(HWND, LPCSTR))lt_dlsym( hDLL, "ODBCManageDataSources" );
+        pSQLManageDataSources = (BOOL (*)(HWND))lt_dlsym( hDLL, "ODBCManageDataSources" );
         if ( pSQLManageDataSources )
             return pSQLManageDataSources( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ) );
         else
@@ -167,7 +167,7 @@ BOOL SQLManageDataSources( HWND hWnd )
         {
             /* change the name (SQLManageDataSources to ODBCManageDataSources) to prevent us from calling ourself   */
             /* its only safe to use hWnd if szUI was specified by the caller                                        */
-            pSQLManageDataSources = (BOOL (*)(HWND,LPCSTR))lt_dlsym( hDLL, "ODBCManageDataSources" );
+            pSQLManageDataSources = (BOOL (*)(HWND))lt_dlsym( hDLL, "ODBCManageDataSources" );
             if ( pSQLManageDataSources )
                 return pSQLManageDataSources( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ) );
             else
--- ./vms/odbc_axp.opt;-0	Wed Mar  7 16:53:31 2007
+++ ./vms/odbc_axp.opt	Thu May 15 07:05:11 2008
@@ -1,4 +1,4 @@
-DKA0:[NICK.UNIXODBC.UNIXODBC-2_2_13PRE.ODBCLIB]LIBODBCINST.EXE/SHARE
+LIBODBCINST.EXE/SHARE
 CASE_SENSITIVE=YES
 SYMBOL_VECTOR = (SQLAllocConnect=PROCEDURE,-
 		 SQLAllocEnv=PROCEDURE,-
--- ./vmsbuild.com;-0	Wed Mar  7 16:53:29 2007
+++ ./vmsbuild.com	Thu May 15 15:17:42 2008
@@ -163,6 +163,7 @@ $ loop:
 $   file = f$search ("''p2'",1)
 $   if file .eqs. "" then goto complete
 $   filename = f$parse (file,,,"name")
+$   if f$edit(filename,"UPCASE") .eqs. "INIOS2PROFILE" then goto loop
 $   object = F$SEARCH ("''filename'.OBJ;*",2)
 $   if object .eqs. ""
 $   then
@@ -214,7 +215,7 @@ $ write vmsconfig "#define LIB_PREFIX ""
 $ write vmsconfig "#define SYSTEM_FILE_PATH ""ODBC_LIBDIR:[ETC]"""
 $ write vmsconfig "char* getvmsenv (char* symbol);"
 $ close vmsconfig
-$ exit
+$!
 $ open/write unixodbcconfig ODBCSRC:[include]unixodbc_conf.h
 $ write unixodbcconfig "/* auto-generated definitions for VMS port */
 $ write unixodbcconfig "#ifndef HAVE_PWD_H"
@@ -223,6 +224,7 @@ $ write unixodbcconfig "#endif"
 $ write unixodbcconfig "#ifndef SIZEOF_LONG_INT"
 $ write unixodbcconfig " #define SIZEOF_LONG_INT 8"
 $ write unixodbcconfig "#endif"
+$ close unixodbcconfig
 $ exit
 $ endsubroutine ! create_vmsconfig_h
 $!
--- ./extras/vms.c;-0	Mon Nov 11 11:10:34 2002
+++ ./extras/vms.c	Sat May 17 14:17:33 2008
@@ -13,7 +13,7 @@
 #include <rmsdef.h>
 #include <fabdef.h>
 #include <namdef.h>
-
+#include <unixlib.h>
 
 static int	error_status = SS$_NORMAL;
 static char	error_buffer[256];
@@ -37,6 +37,14 @@ int lt_dlinit (void)
     return 0;
 }
 
+char translate_buffer[NAM$C_MAXRSS+1];
+
+int to_vms_callback(char *name, int type)
+{
+    strcpy(translate_buffer, name);
+    return 1;
+}
+
 void * lt_dlopen (const char *filename)
 {
 
@@ -56,6 +64,7 @@ void * lt_dlopen (const char *filename)
     struct NAM  imgnam;
     char defimg[NAM$C_MAXRSS+1];
     char *defpath;
+    char local_fspec[NAM$C_MAXRSS+1];
 
     if (filename == NULL) 
     {
@@ -63,6 +72,21 @@ void * lt_dlopen (const char *filename)
 	return NULL;
     }
 
+    strcpy(local_fspec, filename);
+
+    /* 
+     * The driver manager will handle a hard-coded path from a .ini file, but
+     * only if it's an absolute path in unix syntax.  To make those acceptable
+     * to lib$find_image_symbol, we have to convert to VMS syntax.  N.B. Because
+     * of the static buffer, this is not thread-safe, but copying immediately to
+     * local storage should limit the damage.
+     */
+
+    if (filename[0] == '/') {
+        int num_translated = decc$to_vms(local_fspec, to_vms_callback, 0, 1);
+        if (num_translated == 1) strcpy(local_fspec, translate_buffer);
+    }
+
     dh = (vms_dl *)malloc (sizeof (vms_dl));  
     memset( dh, 0, sizeof(vms_dl) );
     if (dh == NULL) 
@@ -72,8 +96,8 @@ void * lt_dlopen (const char *filename)
     }
 
     imgfab = cc$rms_fab;
-    imgfab.fab$l_fna = (char *) filename;
-    imgfab.fab$b_fns = (int) strlen (filename);
+    imgfab.fab$l_fna = local_fspec;
+    imgfab.fab$b_fns = (int) strlen (local_fspec);
     imgfab.fab$w_ifi = 0;  
 
    /* If the logical name LTDL_LIBRARY_PATH does not exist, we'll depend
vmswarn.txt (application/octet-stream, 9.7 KB)
char* getvmsenv (char* symbol);
...............................^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 22 in file ODBCSRC:[include]vmsconfig.h;1

************************************************************/.
..............................................................^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 9 in file ODBCSRC:[ini]iniOS2Profile.c;1

.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 10 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 29 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 37 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 48 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 70 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 78 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 95 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 125 in file ODBCSRC:[ini]iniOS2Profile.c;1

#endif /* end of __OS2__ */.
.^
%CC-I-FOUNDCR, A carriage-return character was encountered; it is being treated as white space.
at line number 144 in file ODBCSRC:[ini]iniOS2Profile.c;1

                        _single_copy_from_wide( lpszMsg, msg, len + 1 );
................................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "lpszMsg" is "char", which is not compatible with
"u
nsigned char" because they differ by signed/unsigned attribute.
at line number 183 in file ODBCSRC:[odbcinst]SQLConfigDriver.c;1

        pSQLManageDataSources = (BOOL (*)(HWND, LPCSTR))lt_dlsym( hDLL, "ODBCManageDataSources" );
........^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "(int ...)lt_dlsym(...)" is "function (pointer to
voi
d, pointer to const char) returning int", which is not compatible with "function (pointer to void) returning int".
at line number 154 in file ODBCSRC:[odbcinst]SQLManageDataSources.c;1

            pSQLManageDataSources = (BOOL (*)(HWND,LPCSTR))lt_dlsym( hDLL, "ODBCManageDataSources" );
............^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "(int ...)lt_dlsym(...)" is "function (pointer to
voi
d, pointer to const char) returning int", which is not compatible with "function (pointer to void) returning int".
at line number 170 in file ODBCSRC:[odbcinst]SQLManageDataSources.c;1

                    __ptr_as_string( s3, column_size ),
.........................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "column_size" is "unsigned long", which is not
compa
tible with "long" because they differ by signed/unsigned attribute.
at line number 481 in file ODBCSRC:[DriverManager]SQLDescribeCol.c;1

                    __ptr_as_string( s3, column_size ),
.........................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "column_size" is "unsigned long", which is not
compa
tible with "long" because they differ by signed/unsigned attribute.
at line number 443 in file ODBCSRC:[DriverManager]SQLDescribeColW.c;1

                    __ptr_as_string( s2, pcb_param_def ),
.........................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "pcb_param_def" is "unsigned long", which is not
com
patible with "long" because they differ by signed/unsigned attribute.
at line number 323 in file ODBCSRC:[DriverManager]SQLDescribeParam.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 367 in file ODBCSRC:[DriverManager]SQLError.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 449 in file ODBCSRC:[DriverManager]SQLError.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 529 in file ODBCSRC:[DriverManager]SQLError.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 294 in file ODBCSRC:[DriverManager]SQLErrorW.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 414 in file ODBCSRC:[DriverManager]SQLErrorW.c;1

                        __ptr_as_string( s0, native_error ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native_error" is "int", which is not compatible
with
 "long".
at line number 498 in file ODBCSRC:[DriverManager]SQLErrorW.c;1

                        __ptr_as_string( s0, native ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native" is "int", which is not compatible with
"long
".
at line number 602 in file ODBCSRC:[DriverManager]SQLGetDiagRec.c;1

                        __ptr_as_string( s0, native ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native" is "int", which is not compatible with
"long
".
at line number 680 in file ODBCSRC:[DriverManager]SQLGetDiagRec.c;1

                        __ptr_as_string( s0, native ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native" is "int", which is not compatible with
"long
".
at line number 758 in file ODBCSRC:[DriverManager]SQLGetDiagRec.c;1

                        __ptr_as_string( s0, native ),
.............................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "native" is "int", which is not compatible with
"long
".
at line number 836 in file ODBCSRC:[DriverManager]SQLGetDiagRec.c;1

    SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, &nDataWidth );
........................................................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "&nDataWidth" is "unsigned long", which is not
compa
tible with "long" because they differ by signed/unsigned attribute.
at line number 425 in file ODBCSRC:[exe]isql.c;1

                SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, &nMaxLength );
....................................................................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer value "&nMaxLength" is "unsigned long", which is not
compa
tible with "long" because they differ by signed/unsigned attribute.
at line number 731 in file ODBCSRC:[exe]iusql.c;1

                sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*)szColumnName) ), szColumnName );
....................................................................................................^
%CC-W-OUTSTRINGTYPE, In this statement, this argument to sprintf is of "pointer to unsigned short" type and is not appropriate for
t
he conversion specifier "%-*s".  The value will be formatted in an unintended manner.
at line number 744 in file ODBCSRC:[exe]iusql.c;1

                        SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, &nMaxLength );
............................................................................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "&nMaxLength" is "unsigned int", which is not
compati
ble with "long".
at line number 783 in file ODBCSRC:[exe]iusql.c;1

        exit( -1 );
........^
%CC-I-IMPLICITFUNC, In this statement, the identifier "exit" is implicitly declared as a function.
at line number 171 in file ODBCSRC:[exe]odbc-config.c;1

        if ( strcmp( argv[ i ], "--prefix" ) == 0 )
.............^
%CC-I-IMPLICITFUNC, In this statement, the identifier "strcmp" is implicitly declared as a function.
at line number 177 in file ODBCSRC:[exe]odbc-config.c;1

            pcrow,
............^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "pcrow" is "unsigned long", which is not compatible
w
ith "unsigned int".
at line number 1162 in file ODBCSRC:[Drivers.PostgreSQL]results.c;1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.