File unixODBC-gccwarnings.patch of Package unixODBC

--- Drivers/PostgreSQL/info.c
+++ Drivers/PostgreSQL/info.c
@@ -1667,7 +1667,7 @@
 StatementClass *col_stmt, *indx_stmt;
 char column_name[MAX_INFO_STRING];
 char **column_names = 0;
-Int4 column_name_len;
+SQLLEN column_name_len;
 int total_columns = 0;
 char error = TRUE;
 ConnInfo *ci;
--- exe/odbc-config.c
+++ exe/odbc-config.c
@@ -22,6 +22,8 @@
  **********************************************************************/
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 static void usage( void )
 {
@@ -169,4 +171,5 @@
             exit( -1 );
         }
     }
+    return 0;
 }
--- Drivers/nn/nndate.c
+++ Drivers/nn/nndate.c
@@ -15,6 +15,7 @@
 #include	<config.h>
 
 #include	<nndate.h>
+#include	"misc.h"
 
 static char* month_name[] =
 { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
--- Drivers/nn/misc.h
+++ Drivers/nn/misc.h
@@ -0,0 +1,7 @@
+#ifndef _MISC_H
+# define _MISC_H
+
+extern int upper_strneq(char *s1, char *s2, int n);
+
+
+#endif
--- Drivers/nn/connect.c
+++ Drivers/nn/connect.c
@@ -13,6 +13,7 @@
     GNU General Public License for more details.
 **/
 #include "driver.h"
+#include "misc.h"
 
 void*	nnodbc_getenverrstack(void* henv)
 {
--- Drivers/nn/config.h
+++ Drivers/nn/config.h
@@ -21,6 +21,8 @@
 #  include	<stdlib.h>
 #  include	<errno.h>
 #  include	<sys/types.h>
+#  include	<string.h>
+#  include	<unistd.h>
 
 #  define	MEM_ALLOC(size) (malloc((size_t)(size)))
 #  define	MEM_FREE(ptr)	{if(ptr) free(ptr);}
--- Drivers/nn/nntp.c
+++ Drivers/nn/nntp.c
@@ -35,6 +35,7 @@
 #endif
 
 #include	<nntp.h>
+#include	"misc.h"
 
 typedef struct {
 	long	article_num;
--- Drivers/nn/nncol.c
+++ Drivers/nn/nncol.c
@@ -17,6 +17,7 @@
 
 #include	<nncol.h>
 #include	"nncol.ci"
+#include	"misc.h"
 
 int	nnsql_getcolidxbyname( char* col_name )
 {
--- Drivers/Postgre7.1/dlg_specific.c
+++ Drivers/Postgre7.1/dlg_specific.c
@@ -21,10 +21,10 @@
 #endif
 
 #ifndef WIN32
+# include <string.h>
 # ifdef UNIXODBC
 #  include <odbcinst.h>
 # else
-#  include <string.h>
 #  include "gpps.h"
 #  define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
 #  define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)
openSUSE Build Service is sponsored by