Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

2
.gitignore vendored

@ -1 +1 @@
SOURCES/psqlodbc-12.02.0000.tar.gz
SOURCES/psqlodbc-16.00.0000.tar.gz

@ -1 +1 @@
57c2e6b15be5a938276024ee0ba0e895aad9539a SOURCES/psqlodbc-12.02.0000.tar.gz
5f455355340cd17a2c6fadb9372c95cafdb5dee8 SOURCES/psqlodbc-16.00.0000.tar.gz

@ -0,0 +1,76 @@
diff -up psqlodbc-16.00.0000/test/src/wchar-char-test.c.be psqlodbc-16.00.0000/test/src/wchar-char-test.c
--- psqlodbc-16.00.0000/test/src/wchar-char-test.c.be 2024-01-23 09:26:32.612651697 +0100
+++ psqlodbc-16.00.0000/test/src/wchar-char-test.c 2024-01-23 09:24:47.899833014 +0100
@@ -21,7 +21,7 @@
#endif
static void
-print_utf16_le(const SQLWCHAR *wdt)
+print_utf16_native(const SQLWCHAR *wdt)
{
int i;
unsigned char *ucdt;
@@ -29,7 +29,11 @@ print_utf16_le(const SQLWCHAR *wdt)
for (i = 0; wdt[i]; i++)
{
ucdt = (unsigned char *) &wdt[i];
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
printf("U+%02X%02X", ucdt[1], ucdt[0]);
+ #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ printf("U+%02X%02X", ucdt[0], ucdt[1]);
+ #endif
}
printf("\n");
fflush(stdout);
diff -up psqlodbc-16.00.0000/test/src/wchar-char-test-eucjp.c.be psqlodbc-16.00.0000/test/src/wchar-char-test-eucjp.c
--- psqlodbc-16.00.0000/test/src/wchar-char-test-eucjp.c.be 2024-01-23 09:25:40.050239174 +0100
+++ psqlodbc-16.00.0000/test/src/wchar-char-test-eucjp.c 2024-01-23 09:27:35.705172406 +0100
@@ -50,7 +50,7 @@ static int eucjp_test(HSTMT hstmt)
CHECK_STMT_RESULT(rc, "SQLExecDirect failed to return SQL_C_WCHAR", hstmt);
while (SQL_SUCCEEDED(rc = SQLFetch(hstmt)))
{
- print_utf16_le(wchar);
+ print_utf16_native(wchar);
}
return rc;
diff -up psqlodbc-16.00.0000/test/src/wchar-char-test-sjis.c.be psqlodbc-16.00.0000/test/src/wchar-char-test-sjis.c
--- psqlodbc-16.00.0000/test/src/wchar-char-test-sjis.c.be 2024-01-23 09:25:51.985332122 +0100
+++ psqlodbc-16.00.0000/test/src/wchar-char-test-sjis.c 2024-01-23 09:27:54.498327508 +0100
@@ -50,7 +50,7 @@ static int sjis_test(HSTMT hstmt)
CHECK_STMT_RESULT(rc, "SQLExecDirect failed to return SQL_C_WCHAR", hstmt);
while (SQL_SUCCEEDED(rc = SQLFetch(hstmt)))
{
- print_utf16_le(wchar);
+ print_utf16_native(wchar);
}
return rc;
diff -up psqlodbc-16.00.0000/test/src/wchar-char-test-utf8.c.be psqlodbc-16.00.0000/test/src/wchar-char-test-utf8.c
--- psqlodbc-16.00.0000/test/src/wchar-char-test-utf8.c.be 2024-01-23 09:26:03.492421736 +0100
+++ psqlodbc-16.00.0000/test/src/wchar-char-test-utf8.c 2024-01-23 09:33:05.932011563 +0100
@@ -5,8 +5,15 @@ static int utf8_test_one(HSTMT hstmt)
SQLLEN ind, cbParam, cbParam2;
SQLINTEGER cbQueryLen;
+ // There doesn't seems to be a simple way to specify utf16 literal in the native endianity, this seems to be a best option.
+ // I expect the other encoding tests would need simillar treatment of the inline data.
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
unsigned char lovedt[100] = {0x95, 0x4e, 0x0a, 0x4e, 0x5a, 0x53, 0xf2, 0x53, 0x0, 0x0};
unsigned char lovedt2[100] = {0xf2, 0x53, 0x5a, 0x53, 0x0a, 0x4e, 0x95, 0x4e, 0x0, 0x0};
+ #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ unsigned char lovedt[100] = {0x4e, 0x95, 0x4e, 0x0a, 0x53, 0x5a, 0x53, 0xf2, 0x0, 0x0};
+ unsigned char lovedt2[100] = {0x53, 0xf2, 0x53, 0x5a, 0x4e, 0x0a, 0x4e, 0x95, 0x0, 0x0};
+ #endif
SQLWCHAR wchar[100];
SQLCHAR str[100];
SQLCHAR chardt[100];
@@ -51,7 +58,7 @@ static int utf8_test_one(HSTMT hstmt)
CHECK_STMT_RESULT(rc, "SQLExecDirect failed to return SQL_C_WCHAR", hstmt);
while (SQL_SUCCEEDED(rc = SQLFetch(hstmt)))
{
- print_utf16_le(wchar);
+ print_utf16_native(wchar);
}
SQLFreeStmt(hstmt, SQL_CLOSE);

@ -4,15 +4,16 @@
Name: postgresql-odbc
Summary: PostgreSQL ODBC driver
Version: 12.02.0000
Release: 6%{?dist}
License: LGPLv2+
Version: 16.00.0000
Release: 5%{?dist}
License: LGPL-2.0-or-later
URL: https://odbc.postgresql.org/
Source0: http://ftp.postgresql.org/pub/odbc/versions/src/%{upstream_name}-%{version}.tar.gz
Source0: https://ftp.postgresql.org/pub/odbc/versions/src/%{upstream_name}-%{version}.tar.gz
Patch0: postgresql-odbc-09.06.0200-revert-money-fix.patch
Patch1: postgresql-odbc-09.05.0400-revert-money-testsuite-fix.patch
Patch2: postgresql-odbc-endianity-test-fix.patch
BuildRequires: make
BuildRequires: gcc
@ -67,8 +68,11 @@ popd
%check
%postgresql_tests_run
# GCC 10 defaults to -fno-common
# https://gcc.gnu.org/gcc-10/changes.html (see C section)
# make sure that we are testing aginst expected output "utf8" case
mv test/expected/wchar-char_1.out test/expected/wchar-char.out
rm -rf test/expected/wchar-char_2.out
rm -rf test/expected/wchar-char_3.out
cd test && make installcheck %{_smp_mflags} CFLAGS="%{optflags} -fcommon" || {
echo "=== trying to find all regression.diffs files in build directory ==="
find -name regression.diffs | while read line; do
@ -108,12 +112,39 @@ the PostgreSQL unixODBC driver.
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 12.02.0000-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 16.00.0000-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 16.00.0000-4
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 16.00.0000-4
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 16.00.0000-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 16.00.0000-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 25 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 16.00.0000-1
- Update to 16.00.0000
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 13.01.0000-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 13.01.0000-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 13.01.0000-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 13.01.0000-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 12.02.0000-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jul 22 2021 Filip Januš <fjanus@redhat.com> - 13.01.0000-1
- Update to 13.01.0000
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 12.02.0000-4
- rebuild for libpq ABI fix rhbz#1908268

Loading…
Cancel
Save