2.3.12 upstream release

Upstream tag: 2.3.12
Upstream commit: c335dbf3

--

The unixODBC-c99.patch has been accepted by upstream:
  https://github.com/lurcher/unixODBC/pull/138
This commit is contained in:
Packit 2023-09-14 09:29:07 +00:00 committed by Michal Schorm
parent b3ef0a2a1c
commit cfab930728
4 changed files with 44 additions and 395 deletions

3
README.packit Normal file
View File

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.80.0.post8+gf2b5fcbc.

View File

@ -1 +1 @@
SHA512 (unixODBC-2.3.11.tar.gz) = dddc32f90a7962e6988e1130a8093c6fb8b9ff532cad270d572250324aecbc739f45f9d8021d217313910bab25b08e69009b4f87456575535e93be1f46f5f13d
SHA512 (unixODBC-2.3.12.tar.gz) = ca9d8db943195679a44db1fc09391dc6662ab1721112c93d448f04011e98502462ffe14b8364eb03707d851db456eced20eb61a22370392ca88d917038d45b56

View File

@ -1,390 +0,0 @@
Avoid implicit function declarations, for C99 compatibility
Add additional prototypes and #include directives for system headers,
so that builds will not fail with compilers which do not support
implicit function declarations by default.
Submitted upstream: <https://github.com/lurcher/unixODBC/pull/138>
diff --git a/Drivers/Postgre7.1/bind.h b/Drivers/Postgre7.1/bind.h
index 0df7ab90c6467553..f437e06828856b2c 100644
--- a/Drivers/Postgre7.1/bind.h
+++ b/Drivers/Postgre7.1/bind.h
@@ -44,4 +44,8 @@ struct ParameterInfoClass_ {
BindInfoClass *create_empty_bindings(int num_columns);
void extend_bindings(StatementClass *stmt, int num_columns);
+RETCODE SQL_API PG_SQLBindCol(HSTMT hstmt, UWORD icol, SWORD fCType,
+ PTR rgbValue, SQLLEN cbValueMax,
+ SQLLEN *pcbValue);
+
#endif
diff --git a/Drivers/Postgre7.1/connection.c b/Drivers/Postgre7.1/connection.c
index 8b5256b68bf927b4..9dd56cc41178f4fa 100644
--- a/Drivers/Postgre7.1/connection.c
+++ b/Drivers/Postgre7.1/connection.c
@@ -20,6 +20,7 @@
#include "statement.h"
#include "qresult.h"
#include "lobj.h"
+#include "misc.h"
#include "dlg_specific.h"
#include <stdio.h>
#include <string.h>
diff --git a/Drivers/Postgre7.1/execute.c b/Drivers/Postgre7.1/execute.c
index 9fc4754e84a1716b..957bd28a3bd633e6 100644
--- a/Drivers/Postgre7.1/execute.c
+++ b/Drivers/Postgre7.1/execute.c
@@ -34,10 +34,10 @@
#include "convert.h"
#include "bind.h"
#include "lobj.h"
+#include "misc.h"
extern GLOBAL_VALUES globals;
-RETCODE SQL_API PG_SQLExecute( HSTMT hstmt);
SQLRETURN PG_SQLPrepare(SQLHSTMT hstmt,
SQLCHAR *szSqlStr , SQLINTEGER cbSqlStr);
diff --git a/Drivers/Postgre7.1/misc.h b/Drivers/Postgre7.1/misc.h
index b9ba9ef18a20756f..4b6696764fa0b606 100644
--- a/Drivers/Postgre7.1/misc.h
+++ b/Drivers/Postgre7.1/misc.h
@@ -106,4 +106,17 @@ int my_strlen(char *s, int len);
int my_strcpy(char *dst, int dst_len, char *src, int src_len);
+RETCODE SQL_API PG_SQLExecDirect(HSTMT hstmt, UCHAR FAR *szSqlStr,
+ SDWORD cbSqlStr);
+RETCODE SQL_API PG_SQLExecute(HSTMT hstmt);
+RETCODE SQL_API PG_SQLGetData(HSTMT hstmt, UWORD icol, SWORD fCType,
+ PTR rgbValue, SDWORD cbValueMax,
+ SDWORD FAR *pcbValue);
+RETCODE SQL_API PG_SQLFetch(HSTMT hstmt);
+RETCODE SQL_API PG_SQLColumns(HSTMT hstmt, UCHAR FAR * szTableQualifier,
+ SWORD cbTableQualifier,
+ UCHAR FAR * szTableOwner, SWORD cbTableOwner,
+ UCHAR FAR * szTableName, SWORD cbTableName,
+ UCHAR FAR * szColumnName, SWORD cbColumnName);
+
#endif
diff --git a/Drivers/Postgre7.1/parse.c b/Drivers/Postgre7.1/parse.c
index e40edcf1959ce996..7530cdbcc3b8a564 100644
--- a/Drivers/Postgre7.1/parse.c
+++ b/Drivers/Postgre7.1/parse.c
@@ -29,6 +29,7 @@
#include "connection.h"
#include "qresult.h"
#include "pgtypes.h"
+#include "misc.h"
#ifndef WIN32
#ifndef HAVE_STRICMP
diff --git a/Drivers/Postgre7.1/results.c b/Drivers/Postgre7.1/results.c
index 48c24c358e1349be..eb71cd367c44cc30 100644
--- a/Drivers/Postgre7.1/results.c
+++ b/Drivers/Postgre7.1/results.c
@@ -29,6 +29,7 @@
#include "qresult.h"
#include "convert.h"
#include "pgtypes.h"
+#include "misc.h"
#include <stdio.h>
diff --git a/Drivers/Postgre7.1/statement.c b/Drivers/Postgre7.1/statement.c
index 5e8e644e5eee388e..4e21af3a84572a1f 100644
--- a/Drivers/Postgre7.1/statement.c
+++ b/Drivers/Postgre7.1/statement.c
@@ -22,6 +22,7 @@
#include "qresult.h"
#include "convert.h"
#include "environ.h"
+#include "misc.h"
#include <stdio.h>
#include <string.h>
diff --git a/Drivers/Postgre7.1/statement.h b/Drivers/Postgre7.1/statement.h
index 8cada2070998ef98..ea633bbb79eedfd9 100644
--- a/Drivers/Postgre7.1/statement.h
+++ b/Drivers/Postgre7.1/statement.h
@@ -220,5 +220,7 @@ void SC_free_params(StatementClass *self, char option);
void SC_log_error(char *func, char *desc, StatementClass *self);
unsigned long SC_get_bookmark(StatementClass *self);
+RETCODE SQL_API PG_SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt);
+RETCODE SQL_API PG_SQLFreeStmt(HSTMT hstmt, UWORD fOption);
#endif
diff --git a/Drivers/nn/SQLBindParameter.c b/Drivers/nn/SQLBindParameter.c
index 0a291b57a3c3cacc..48e358bc15151563 100644
--- a/Drivers/nn/SQLBindParameter.c
+++ b/Drivers/nn/SQLBindParameter.c
@@ -126,3 +126,26 @@ RETCODE SQL_API SQLBindParameter(
}
+RETCODE SQL_API SQLSetParam (
+ HSTMT hstmt,
+ UWORD ipar,
+ SWORD fCType,
+ SWORD fSqlType,
+ UDWORD cbColDef,
+ SWORD ibScale,
+ PTR rgbValue,
+ SDWORD FAR *pcbValue)
+{
+ return SQLBindParameter(hstmt,
+ ipar,
+ (SWORD)SQL_PARAM_INPUT_OUTPUT,
+ fCType,
+ fSqlType,
+ cbColDef,
+ ibScale,
+ rgbValue,
+ SQL_SETPARAM_VALUE_MAX,
+ pcbValue );
+}
+
+
diff --git a/Drivers/nn/SQLDriverConnect.c b/Drivers/nn/SQLDriverConnect.c
index 1d759a6d723f95b3..56ea940c27f8c9c8 100644
--- a/Drivers/nn/SQLDriverConnect.c
+++ b/Drivers/nn/SQLDriverConnect.c
@@ -61,12 +61,7 @@ RETCODE SQL_API SQLDriverConnect(
break;
/* to next case */
case SQL_DRIVER_PROMPT:
- if ( nnodbc_conndialog( hwnd, buf, sizeof(buf)) )
- {
- sqlstat = en_IM008;
- break;
- }
- server = buf;
+ sqlstat = en_IM008;
break;
default:
diff --git a/Drivers/nn/SQLSetParam.c b/Drivers/nn/SQLSetParam.c
index 3fb2dbdd066cd2c7..ebc9618edaba2d59 100644
--- a/Drivers/nn/SQLSetParam.c
+++ b/Drivers/nn/SQLSetParam.c
@@ -1,40 +1 @@
-/**
- Copyright (C) 1995, 1996 by Ke Jin <kejin@visigenic.com>
- Enhanced for unixODBC (1999) by Peter Harvey <pharvey@codebydesign.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-**/
-#include <config.h>
-#include "driver.h"
-
-RETCODE SQL_API SQLSetParam (
- HSTMT hstmt,
- UWORD ipar,
- SWORD fCType,
- SWORD fSqlType,
- UDWORD cbColDef,
- SWORD ibScale,
- PTR rgbValue,
- SDWORD FAR *pcbValue)
-{
- return SQLBindParameter(hstmt,
- ipar,
- (SWORD)SQL_PARAM_INPUT_OUTPUT,
- fCType,
- fSqlType,
- cbColDef,
- ibScale,
- rgbValue,
- SQL_SETPARAM_VALUE_MAX,
- pcbValue );
-}
-
-
+/* Moved to SQLBindParameter.c. */
diff --git a/Drivers/nn/connect.c b/Drivers/nn/connect.c
index 0d6d7f679a7bff68..ea8281cf13d992cf 100644
--- a/Drivers/nn/connect.c
+++ b/Drivers/nn/connect.c
@@ -129,6 +129,7 @@ readtoken(
#if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2)
# include <pwd.h>
+# include <unistd.h>
# define UNIX_PWD
#endif
diff --git a/Drivers/nn/driver.h b/Drivers/nn/driver.h
index a9b1da5e9c7eeb8e..75171a219b20c358 100644
--- a/Drivers/nn/driver.h
+++ b/Drivers/nn/driver.h
@@ -113,6 +113,11 @@ char* getkeyvalinstr(
char* value,
int size );
+int sqlputdata (stmt_t* pstmt, int ipar, char* data);
+int sqlexecute (stmt_t* pstmt);
+
+int upper_strneq (char* s1, char* s2, int n);
+
#endif
diff --git a/Drivers/nn/herr.h b/Drivers/nn/herr.h
index 2ceec2f7f6e0e12f..4c717e5cd415982d 100644
--- a/Drivers/nn/herr.h
+++ b/Drivers/nn/herr.h
@@ -113,6 +113,7 @@ enum {
extern void* nnodbc_pusherr (void* stack, int code, char* msg);
extern void nnodbc_poperr (void* stack);
extern int nnodbc_errstkempty (void* stack);
+extern void nnodbc_errstkunset (void* stack);
extern int nnodbc_getsqlstatcode (void* stack);
extern char* nnodbc_getsqlstatstr (void* stack);
extern char* nnodbc_getsqlstatmsg (void* stack);
diff --git a/Drivers/nn/misc.c b/Drivers/nn/misc.c
index 81603c0fab2153ef..f1623be27d4cc15b 100644
--- a/Drivers/nn/misc.c
+++ b/Drivers/nn/misc.c
@@ -15,6 +15,7 @@
#include <config.h>
#include <nnconfig.h>
+#include "driver.h"
int upper_strneq(
char* s1,
diff --git a/Drivers/nn/nncol.c b/Drivers/nn/nncol.c
index 0dc298a2d5236fba..85318f1d24e4f4bc 100644
--- a/Drivers/nn/nncol.c
+++ b/Drivers/nn/nncol.c
@@ -18,6 +18,7 @@
#include <nncol.h>
#include "nncol.ci"
+#include "driver.h"
int nnsql_getcolidxbyname( char* col_name )
{
diff --git a/Drivers/nn/nndate.c b/Drivers/nn/nndate.c
index ac9d8e6d5ac30bd5..9a2163549e278466 100644
--- a/Drivers/nn/nndate.c
+++ b/Drivers/nn/nndate.c
@@ -16,6 +16,7 @@
#include <nnconfig.h>
#include <nndate.h>
+#include "driver.h"
static char* month_name[] =
{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
diff --git a/Drivers/nn/nntp.c b/Drivers/nn/nntp.c
index 053efef0d9da9ae1..a4a7a9f440ce767b 100644
--- a/Drivers/nn/nntp.c
+++ b/Drivers/nn/nntp.c
@@ -19,6 +19,7 @@
#include <string.h>
#include <errno.h>
#include <nntp.h>
+#include "driver.h"
# include "nntp.ci"
@@ -28,6 +29,8 @@
# include <sys/socket.h>
# include <netdb.h>
# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <unistd.h>
#else
diff --git a/Drivers/nn/nntp.h b/Drivers/nn/nntp.h
index 733101c7967c90a1..df994a3da44db283 100644
--- a/Drivers/nn/nntp.h
+++ b/Drivers/nn/nntp.h
@@ -78,6 +78,7 @@ extern int nntp_end_post ( void* hcndes );
extern int nntp_cancel ( void* hcndes, char* group, char* sender,
char* from, char* msgid);
+extern int nntp_postok ( void* hcndes );
extern int nntp_getaccmode( void* hcndes );
extern void nntp_setaccmode( void* hcndes, int mode );
diff --git a/Drivers/nn/yyenv.h b/Drivers/nn/yyenv.h
index 2a22191adb630c8b..00d66416eb175eed 100644
--- a/Drivers/nn/yyenv.h
+++ b/Drivers/nn/yyenv.h
@@ -37,4 +37,7 @@ typedef struct
# define YYINITDEPTH (512)
# endif
+void nnsql_yyinit(yyenv_t* penv, yystmt_t* yystmt);
+int nnsql_yyparse(yyenv_t* pyyenv);
+
#endif
diff --git a/Drivers/nn/yylex.c b/Drivers/nn/yylex.c
index feaacefea251d049..d9daeb202412bdf6 100644
--- a/Drivers/nn/yylex.c
+++ b/Drivers/nn/yylex.c
@@ -27,6 +27,8 @@
#include <stdio.h>
#include <ctype.h>
+#include "driver.h"
+
static int getcmpopidxbyname(char* name)
{
int i, size;
diff --git a/Drivers/nn/yyparse.y b/Drivers/nn/yyparse.y
index 1cb0b49c57740d2f..283cebf0ff7eca05 100644
--- a/Drivers/nn/yyparse.y
+++ b/Drivers/nn/yyparse.y
@@ -39,6 +39,9 @@ static char sccsid[]
#else
# define yylex() nnsql_yylex(&yylval, pyyenv)
#endif
+union YYSTYPE;
+int nnsql_yylex(union YYSTYPE* pyylval, yyenv_t* penv);
+
#define yyparse(x) nnsql_yyparse (yyenv_t* pyyenv)
#define yyerror(msg) nnsql_yyerror (pyyenv, msg)
diff --git a/Drivers/nn/yystmt.c b/Drivers/nn/yystmt.c
index 9a8d540138ae9575..74bad5f65274b13b 100644
--- a/Drivers/nn/yystmt.c
+++ b/Drivers/nn/yystmt.c
@@ -14,6 +14,9 @@
**/
#include <config.h>
#include "driver.h"
+#if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2)
+#include <unistd.h>
+#endif
static char sccsid[]
= "@(#)NNSQL(NetNews SQL) v0.5, Copyright(c) 1995, 1996 by Ke Jin";
diff --git a/Drivers/nn/yystmt.h b/Drivers/nn/yystmt.h
index 4e61ce84a4cac3f8..ad9b8745fb573cf7 100644
--- a/Drivers/nn/yystmt.h
+++ b/Drivers/nn/yystmt.h
@@ -151,4 +151,9 @@ typedef struct {
long artnum_max;
} yystmt_t;
+void nnsql_getrange(void* hstmt, long* pmin, long* pmax);
+int nnsql_strlike(char* str, char* pattern, char esc, int flag);
+int nnsql_srchtree_evl(void* hstmt);
+int nnsql_srchtree_tchk(void* hstmt);
+
#endif

View File

@ -1,7 +1,7 @@
Summary: A complete ODBC driver manager for Linux
Name: unixODBC
Version: 2.3.11
Release: 4%{?dist}
Version: 2.3.12
Release: 1%{?dist}
URL: http://www.unixODBC.org/
# Programs are GPL, libraries are LGPL, except News Server library is GPL.
License: GPLv2+ and LGPLv2+
@ -12,7 +12,6 @@ Source5: README.dist
Patch8: so-version-bump.patch
Patch9: keep-typedefs.patch
Patch10: unixODBC-c99.patch
Conflicts: iodbc
@ -39,7 +38,6 @@ ODBC, you need to install this package.
%setup -q
%patch8 -p1 -b .soname-bump
%patch9 -p1
%patch10 -p1
chmod 0644 Drivers/MiniSQL/*.c
chmod 0644 Drivers/nn/*.c
@ -117,6 +115,44 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" > dev
%_libdir/pkgconfig/*.pc
%changelog
* Thu Sep 14 2023 Packit <hello@packit.dev> - 2.3.12-1
- New Release 2.3.12 (lurcher)
- Don't check state with shared env (lurcher)
- Add --enable-singleenv option (lurcher)
- Allow longer messages via SQLGetDiag (lurcher)
- Add --enable-utf8ini flag and coding (lurcher)
- Fix possible seg faults with SQLAPI and pooling (lurcher)
- Fix possible seg faults with SQLAPI and pooling (lurcher)
- Remove self-reference (Stefan)
- Avoid implicit function declarations, for C99 compatibility (Florian Weimer)
- Fix --enable-stats config error (lurcher)
- Allow diagnostics to be retrieved on SQL_NO_DATA (Kevin Adler)
- isql.1: Add information about passwords containing semicolons (Hugh McMaster)
- isql.1: Various text updates (Hugh McMaster)
- Export __clear_ini_cache from libodbcinst (lurcher)
- Revert "Add call to atexit to clear the ini cache" (lurcher)
- Add call to atexit to clear the ini cache (lurcher)
- Add extra iusql connectionstring syntax (lurcher)
- Allow longer connection strings (part 3) (lurcher)
- Allow longer connection strings (part 2) (lurcher)
- Allow longer connection strings (lurcher)
- Fixed Connection String (Stefan)
- Add extra connection syntax to isql help (lurcher)
- Add extra logging for ODBCINST connect settings (lurcher)
- Allow isql to handle SQLPrepare returning SQL_SUCCESS_WITH_INFO (and report warning) (lurcher)
- Allow isql to handle SQLPrepare returning SQL_SUCCESS_WITH_INFO (lurcher)
- Allow passing complete connection string into iusql (lurcher)
- Remove __get_connection from cursor lib (lurcher)
- Avoid failed build if clock_gettime() is not available (lurcher)
- Update change log (lurcher)
- DriverManager/_info.c: Get locale encoding on Windows. (Markus Mützel)
- DriverManager/drivermanager.h: fix build without threads (Fabrice Fontaine)
- Fix iconv handle leak with pooling (lurcher)
- Fix buffer overrun (lurcher)
- Create SECURITY.md (Nick Gorham)
- Move to 2.3.12pre (lurcher)
- Makefile.am: Do not install config.h (Hugh McMaster)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild