Compare commits
No commits in common. "c10s" and "c8s" have entirely different histories.
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,5 +1 @@
|
|||||||
/psqlodbc-10.03.0000.tar.gz
|
/psqlodbc-10.03.0000.tar.gz
|
||||||
/psqlodbc-12.01.0000.tar.gz
|
|
||||||
/psqlodbc-12.02.0000.tar.gz
|
|
||||||
/psqlodbc-13.01.0000.tar.gz
|
|
||||||
/psqlodbc-16.00.0000.tar.gz
|
|
||||||
|
452
acinclude.m4
Normal file
452
acinclude.m4
Normal file
@ -0,0 +1,452 @@
|
|||||||
|
# Macros that test various C library quirks
|
||||||
|
# $PostgreSQL: pgsql/config/c-library.m4,v 1.31 2005/02/24 01:34:45 tgl Exp $
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_VAR_INT_TIMEZONE
|
||||||
|
# ---------------------
|
||||||
|
# Check if the global variable `timezone' exists. If so, define
|
||||||
|
# HAVE_INT_TIMEZONE.
|
||||||
|
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
|
||||||
|
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
|
||||||
|
[AC_TRY_LINK([#include <time.h>
|
||||||
|
int res;],
|
||||||
|
[#ifndef __CYGWIN__
|
||||||
|
res = timezone / 60;
|
||||||
|
#else
|
||||||
|
res = _timezone / 60;
|
||||||
|
#endif],
|
||||||
|
[pgac_cv_var_int_timezone=yes],
|
||||||
|
[pgac_cv_var_int_timezone=no])])
|
||||||
|
if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
||||||
|
AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
|
||||||
|
fi])# PGAC_VAR_INT_TIMEZONE
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_STRUCT_TIMEZONE
|
||||||
|
# ------------------
|
||||||
|
# Figure out how to get the current timezone. If `struct tm' has a
|
||||||
|
# `tm_zone' member, define `HAVE_TM_ZONE'. Also, if the
|
||||||
|
# external array `tzname' is found, define `HAVE_TZNAME'.
|
||||||
|
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
|
||||||
|
# tzname[] is checked for regardless of whether we find tm_zone.
|
||||||
|
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
|
||||||
|
[AC_REQUIRE([AC_STRUCT_TM])dnl
|
||||||
|
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
|
||||||
|
#include <$ac_cv_struct_tm>
|
||||||
|
])
|
||||||
|
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
|
||||||
|
AC_DEFINE(HAVE_TM_ZONE, 1,
|
||||||
|
[Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
|
||||||
|
`HAVE_STRUCT_TM_TM_ZONE' instead.])
|
||||||
|
fi
|
||||||
|
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
|
||||||
|
[AC_TRY_LINK(
|
||||||
|
[#include <time.h>
|
||||||
|
#ifndef tzname /* For SGI. */
|
||||||
|
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
|
||||||
|
if test $ac_cv_var_tzname = yes; then
|
||||||
|
AC_DEFINE(HAVE_TZNAME, 1,
|
||||||
|
[Define to 1 if you have the external array `tzname'.])
|
||||||
|
fi
|
||||||
|
])# PGAC_STRUCT_TIMEZONE
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_GETTIMEOFDAY_1ARG
|
||||||
|
# ---------------------------
|
||||||
|
# Check if gettimeofday() has only one arguments. (Normal is two.)
|
||||||
|
# If so, define GETTIMEOFDAY_1ARG.
|
||||||
|
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
|
||||||
|
[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
|
||||||
|
pgac_cv_func_gettimeofday_1arg,
|
||||||
|
[AC_TRY_COMPILE([#include <sys/time.h>],
|
||||||
|
[struct timeval *tp;
|
||||||
|
struct timezone *tzp;
|
||||||
|
gettimeofday(tp,tzp);],
|
||||||
|
[pgac_cv_func_gettimeofday_1arg=no],
|
||||||
|
[pgac_cv_func_gettimeofday_1arg=yes])])
|
||||||
|
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
|
||||||
|
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
|
||||||
|
fi
|
||||||
|
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
|
||||||
|
[@%:@ifdef GETTIMEOFDAY_1ARG
|
||||||
|
@%:@ define gettimeofday(a,b) gettimeofday(a)
|
||||||
|
@%:@endif])dnl
|
||||||
|
])# PGAC_FUNC_GETTIMEOFDAY_1ARG
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_GETPWUID_R_5ARG
|
||||||
|
# ---------------------------
|
||||||
|
# Check if getpwuid_r() takes a fifth argument (later POSIX standard, not draft version)
|
||||||
|
# If so, define GETPWUID_R_5ARG
|
||||||
|
AC_DEFUN([PGAC_FUNC_GETPWUID_R_5ARG],
|
||||||
|
[AC_CACHE_CHECK(whether getpwuid_r takes a fifth argument,
|
||||||
|
pgac_func_getpwuid_r_5arg,
|
||||||
|
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
#include <pwd.h>],
|
||||||
|
[uid_t uid;
|
||||||
|
struct passwd *space;
|
||||||
|
char *buf;
|
||||||
|
size_t bufsize;
|
||||||
|
struct passwd **result;
|
||||||
|
getpwuid_r(uid, space, buf, bufsize, result);],
|
||||||
|
[pgac_func_getpwuid_r_5arg=yes],
|
||||||
|
[pgac_func_getpwuid_r_5arg=no])])
|
||||||
|
if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
|
||||||
|
AC_DEFINE(GETPWUID_R_5ARG,, [Define to 1 if getpwuid_r() takes a 5th argument.])
|
||||||
|
fi
|
||||||
|
])# PGAC_FUNC_GETPWUID_R_5ARG
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_STRERROR_R_INT
|
||||||
|
# ---------------------------
|
||||||
|
# Check if strerror_r() returns an int (SUSv3) rather than a char * (GNU libc)
|
||||||
|
# If so, define STRERROR_R_INT
|
||||||
|
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
|
||||||
|
[AC_CACHE_CHECK(whether strerror_r returns int,
|
||||||
|
pgac_func_strerror_r_int,
|
||||||
|
[AC_TRY_COMPILE([#include <string.h>],
|
||||||
|
[#ifndef _AIX
|
||||||
|
int strerror_r(int, char *, size_t);
|
||||||
|
#else
|
||||||
|
/* Older AIX has 'int' for the third argument so we don't test the args. */
|
||||||
|
int strerror_r();
|
||||||
|
#endif],
|
||||||
|
[pgac_func_strerror_r_int=yes],
|
||||||
|
[pgac_func_strerror_r_int=no])])
|
||||||
|
if test x"$pgac_func_strerror_r_int" = xyes ; then
|
||||||
|
AC_DEFINE(STRERROR_R_INT,, [Define to 1 if strerror_r() returns a int.])
|
||||||
|
fi
|
||||||
|
])# PGAC_FUNC_STRERROR_R_INT
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_UNION_SEMUN
|
||||||
|
# ----------------
|
||||||
|
# Check if `union semun' exists. Define HAVE_UNION_SEMUN if so.
|
||||||
|
# If it doesn't then one could define it as
|
||||||
|
# union semun { int val; struct semid_ds *buf; unsigned short *array; }
|
||||||
|
AC_DEFUN([PGAC_UNION_SEMUN],
|
||||||
|
[AC_CHECK_TYPES([union semun], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/ipc.h>
|
||||||
|
#include <sys/sem.h>])])# PGAC_UNION_SEMUN
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_STRUCT_SOCKADDR_UN
|
||||||
|
# -----------------------
|
||||||
|
# If `struct sockaddr_un' exists, define HAVE_UNIX_SOCKETS.
|
||||||
|
# (Requires test for <sys/un.h>!)
|
||||||
|
AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
|
||||||
|
[AC_CHECK_TYPES([struct sockaddr_un], [AC_DEFINE(HAVE_UNIX_SOCKETS, 1, [Define to 1 if you have unix sockets.])], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_UN_H
|
||||||
|
#include <sys/un.h>
|
||||||
|
#endif
|
||||||
|
])])# PGAC_STRUCT_SOCKADDR_UN
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_STRUCT_SOCKADDR_STORAGE
|
||||||
|
# ----------------------------
|
||||||
|
# If `struct sockaddr_storage' exists, define HAVE_STRUCT_SOCKADDR_STORAGE.
|
||||||
|
# If it is missing then one could define it.
|
||||||
|
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE],
|
||||||
|
[AC_CHECK_TYPES([struct sockaddr_storage], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
])])# PGAC_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
|
||||||
|
# --------------------------------------
|
||||||
|
# Check the members of `struct sockaddr_storage'. We need to know about
|
||||||
|
# ss_family and ss_len. (Some platforms follow RFC 2553 and call them
|
||||||
|
# __ss_family and __ss_len.) We also check struct sockaddr's sa_len;
|
||||||
|
# if we have to define our own `struct sockaddr_storage', this tells us
|
||||||
|
# whether we need to provide an ss_len field.
|
||||||
|
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS],
|
||||||
|
[AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family,
|
||||||
|
struct sockaddr_storage.__ss_family,
|
||||||
|
struct sockaddr_storage.ss_len,
|
||||||
|
struct sockaddr_storage.__ss_len,
|
||||||
|
struct sockaddr.sa_len], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
])])# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_STRUCT_ADDRINFO
|
||||||
|
# -----------------------
|
||||||
|
# If `struct addrinfo' exists, define HAVE_STRUCT_ADDRINFO.
|
||||||
|
AC_DEFUN([PGAC_STRUCT_ADDRINFO],
|
||||||
|
[AC_CHECK_TYPES([struct addrinfo], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
])])# PGAC_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_POSIX_SIGNALS
|
||||||
|
# -----------------------
|
||||||
|
# Check to see if the machine has the POSIX signal interface. Define
|
||||||
|
# HAVE_POSIX_SIGNALS if so. Also set the output variable HAVE_POSIX_SIGNALS
|
||||||
|
# to yes or no.
|
||||||
|
#
|
||||||
|
# Note that this test only compiles a test program, it doesn't check
|
||||||
|
# whether the routines actually work. If that becomes a problem, make
|
||||||
|
# a fancier check.
|
||||||
|
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
|
||||||
|
[AC_CACHE_CHECK(for POSIX signal interface, pgac_cv_func_posix_signals,
|
||||||
|
[AC_TRY_LINK([#include <signal.h>
|
||||||
|
],
|
||||||
|
[struct sigaction act, oact;
|
||||||
|
sigemptyset(&act.sa_mask);
|
||||||
|
act.sa_flags = SA_RESTART;
|
||||||
|
sigaction(0, &act, &oact);],
|
||||||
|
[pgac_cv_func_posix_signals=yes],
|
||||||
|
[pgac_cv_func_posix_signals=no])])
|
||||||
|
if test x"$pgac_cv_func_posix_signals" = xyes ; then
|
||||||
|
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
|
||||||
|
fi
|
||||||
|
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
|
||||||
|
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
|
||||||
|
# ---------------------------------------
|
||||||
|
# Determine which format snprintf uses for long long int. We handle
|
||||||
|
# %lld, %qd, %I64d. The result is in shell variable
|
||||||
|
# LONG_LONG_INT_FORMAT.
|
||||||
|
#
|
||||||
|
# MinGW uses '%I64d', though gcc throws an warning with -Wall,
|
||||||
|
# while '%lld' doesn't generate a warning, but doesn't work.
|
||||||
|
#
|
||||||
|
AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT],
|
||||||
|
[AC_MSG_CHECKING([snprintf format for long long int])
|
||||||
|
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_format,
|
||||||
|
[for pgac_format in '%lld' '%qd' '%I64d'; do
|
||||||
|
AC_TRY_RUN([#include <stdio.h>
|
||||||
|
typedef long long int ac_int64;
|
||||||
|
#define INT64_FORMAT "$pgac_format"
|
||||||
|
|
||||||
|
ac_int64 a = 20000001;
|
||||||
|
ac_int64 b = 40000005;
|
||||||
|
|
||||||
|
int does_int64_snprintf_work()
|
||||||
|
{
|
||||||
|
ac_int64 c;
|
||||||
|
char buf[100];
|
||||||
|
|
||||||
|
if (sizeof(ac_int64) != 8)
|
||||||
|
return 0; /* doesn't look like the right size */
|
||||||
|
|
||||||
|
c = a * b;
|
||||||
|
snprintf(buf, 100, INT64_FORMAT, c);
|
||||||
|
if (strcmp(buf, "800000140000005") != 0)
|
||||||
|
return 0; /* either multiply or snprintf is busted */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
main() {
|
||||||
|
exit(! does_int64_snprintf_work());
|
||||||
|
}],
|
||||||
|
[pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
|
||||||
|
[],
|
||||||
|
[pgac_cv_snprintf_long_long_int_format=cross; break])
|
||||||
|
done])dnl AC_CACHE_VAL
|
||||||
|
|
||||||
|
LONG_LONG_INT_FORMAT=''
|
||||||
|
|
||||||
|
case $pgac_cv_snprintf_long_long_int_format in
|
||||||
|
cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
|
||||||
|
?*) AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
|
||||||
|
LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
|
||||||
|
*) AC_MSG_RESULT(none);;
|
||||||
|
esac])# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_FUNC_PRINTF_ARG_CONTROL
|
||||||
|
# ---------------------------------------
|
||||||
|
# Determine if printf supports %1$ argument selection, e.g. %5$ selects
|
||||||
|
# the fifth argument after the printf print string.
|
||||||
|
# This is not in the C99 standard, but in the Single Unix Specification (SUS).
|
||||||
|
# It is used in our language translation strings.
|
||||||
|
#
|
||||||
|
AC_DEFUN([PGAC_FUNC_PRINTF_ARG_CONTROL],
|
||||||
|
[AC_MSG_CHECKING([whether printf supports argument control])
|
||||||
|
AC_CACHE_VAL(pgac_cv_printf_arg_control,
|
||||||
|
[AC_TRY_RUN([#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char buf[100];
|
||||||
|
|
||||||
|
/* can it swap arguments? */
|
||||||
|
snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
|
||||||
|
if (strcmp(buf, "4 3") != 0)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}],
|
||||||
|
[pgac_cv_printf_arg_control=yes],
|
||||||
|
[pgac_cv_printf_arg_control=no],
|
||||||
|
[pgac_cv_printf_arg_control=cross])
|
||||||
|
])dnl AC_CACHE_VAL
|
||||||
|
AC_MSG_RESULT([$pgac_cv_printf_arg_control])
|
||||||
|
])# PGAC_FUNC_PRINTF_ARG_CONTROL
|
||||||
|
|
||||||
|
# $PostgreSQL: pgsql/config/general.m4,v 1.9 2006/11/30 22:21:23 tgl Exp $
|
||||||
|
|
||||||
|
# This file defines new macros to process configure command line
|
||||||
|
# arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
|
||||||
|
# The flaw in these is particularly that they only differentiate
|
||||||
|
# between "given" and "not given" and do not provide enough help to
|
||||||
|
# process arguments that only accept "yes/no", that require an
|
||||||
|
# argument (other than "yes/no"), etc.
|
||||||
|
#
|
||||||
|
# The point of this implementation is to reduce code size and
|
||||||
|
# redundancy in configure.in and to improve robustness and consistency
|
||||||
|
# in the option evaluation code.
|
||||||
|
|
||||||
|
|
||||||
|
# Convert type and name to shell variable name (e.g., "enable_long_strings")
|
||||||
|
m4_define([pgac_arg_to_variable],
|
||||||
|
[$1[]_[]patsubst($2, -, _)])
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_ARG(TYPE, NAME, HELP-STRING,
|
||||||
|
# [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG],
|
||||||
|
# [ACTION-IF-OMITTED])
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# This is the base layer. TYPE is either "with" or "enable", depending
|
||||||
|
# on what you like. NAME is the rest of the option name, HELP-STRING
|
||||||
|
# as usual. ACTION-IF-YES is executed if the option is given without
|
||||||
|
# an argument (or "yes", which is the same); similar for ACTION-IF-NO.
|
||||||
|
|
||||||
|
AC_DEFUN([PGAC_ARG],
|
||||||
|
[
|
||||||
|
pgac_args="$pgac_args pgac_arg_to_variable([$1],[$2])"
|
||||||
|
m4_case([$1],
|
||||||
|
|
||||||
|
enable, [
|
||||||
|
AC_ARG_ENABLE([$2], [$3], [
|
||||||
|
case [$]enableval in
|
||||||
|
yes)
|
||||||
|
m4_default([$4], :)
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
m4_default([$5], :)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$6
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
],
|
||||||
|
[$7])[]dnl AC_ARG_ENABLE
|
||||||
|
],
|
||||||
|
|
||||||
|
with, [
|
||||||
|
AC_ARG_WITH([$2], [$3], [
|
||||||
|
case [$]withval in
|
||||||
|
yes)
|
||||||
|
m4_default([$4], :)
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
m4_default([$5], :)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
$6
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
],
|
||||||
|
[$7])[]dnl AC_ARG_WITH
|
||||||
|
],
|
||||||
|
|
||||||
|
[m4_fatal([first argument of $0 must be 'enable' or 'with', not '$1'])]
|
||||||
|
)
|
||||||
|
])# PGAC_ARG
|
||||||
|
|
||||||
|
# PGAC_ARG_CHECK()
|
||||||
|
# ----------------
|
||||||
|
# Checks if the user passed any --with/without/enable/disable
|
||||||
|
# arguments that were not defined. Just prints out a warning message,
|
||||||
|
# so this should be called near the end, so the user will see it.
|
||||||
|
|
||||||
|
AC_DEFUN([PGAC_ARG_CHECK],
|
||||||
|
[for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
|
||||||
|
for pgac_arg in $pgac_args with_gnu_ld; do
|
||||||
|
if test "$pgac_var" = "$pgac_arg"; then
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
|
||||||
|
AC_MSG_WARN([option ignored: --$pgac_txt])
|
||||||
|
done])# PGAC_ARG_CHECK
|
||||||
|
|
||||||
|
# PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING,
|
||||||
|
# [ACTION-IF-YES], [ACTION-IF-NO])
|
||||||
|
# -----------------------------------------------
|
||||||
|
# Accept a boolean option, that is, one that only takes yes or no.
|
||||||
|
# ("no" is equivalent to "disable" or "without"). DEFAULT is what
|
||||||
|
# should be done if the option is omitted; it should be "yes" or "no".
|
||||||
|
# (Consequently, one of ACTION-IF-YES and ACTION-IF-NO will always
|
||||||
|
# execute.)
|
||||||
|
|
||||||
|
AC_DEFUN([PGAC_ARG_BOOL],
|
||||||
|
[PGAC_ARG([$1], [$2], [$4], [$5], [$6],
|
||||||
|
[AC_MSG_ERROR([no argument expected for --$1-$2 option])],
|
||||||
|
[m4_case([$3],
|
||||||
|
yes, [pgac_arg_to_variable([$1], [$2])=yes
|
||||||
|
$5],
|
||||||
|
no, [pgac_arg_to_variable([$1], [$2])=no
|
||||||
|
$6],
|
||||||
|
[m4_fatal([third argument of $0 must be 'yes' or 'no', not '$3'])])])[]dnl
|
||||||
|
])# PGAC_ARG_BOOL
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_ARG_REQ(TYPE, NAME, HELP-STRING, [ACTION-IF-GIVEN], [ACTION-IF-NOT-GIVEN])
|
||||||
|
# -------------------------------------------------------------------------------
|
||||||
|
# This option will require an argument; "yes" or "no" will not be
|
||||||
|
# accepted.
|
||||||
|
|
||||||
|
AC_DEFUN([PGAC_ARG_REQ],
|
||||||
|
[PGAC_ARG([$1], [$2], [$3],
|
||||||
|
[AC_MSG_ERROR([argument required for --$1-$2 option])],
|
||||||
|
[AC_MSG_ERROR([argument required for --$1-$2 option])],
|
||||||
|
[$4],
|
||||||
|
[$5])])# PGAC_ARG_REQ
|
||||||
|
|
||||||
|
|
||||||
|
# PGAC_ARG_OPTARG(TYPE, NAME, HELP-STRING, [DEFAULT-ACTION], [ARG-ACTION]
|
||||||
|
# [ACTION-ENABLED], [ACTION-DISABLED])
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# This will create an option that behaves as follows: If omitted, or
|
||||||
|
# called with "no", then set the enable_variable to "no" and do
|
||||||
|
# nothing else. If called with "yes", then execute DEFAULT-ACTION. If
|
||||||
|
# called with argument, set enable_variable to "yes" and execute
|
||||||
|
# ARG-ACTION. Additionally, execute ACTION-ENABLED if we ended up with
|
||||||
|
# "yes" either way, else ACTION-DISABLED.
|
||||||
|
#
|
||||||
|
# The intent is to allow enabling a feature, and optionally pass an
|
||||||
|
# additional piece of information.
|
||||||
|
|
||||||
|
AC_DEFUN([PGAC_ARG_OPTARG],
|
||||||
|
[PGAC_ARG([$1], [$2], [$3], [$4], [],
|
||||||
|
[pgac_arg_to_variable([$1], [$2])=yes
|
||||||
|
$5],
|
||||||
|
[pgac_arg_to_variable([$1], [$2])=no])
|
||||||
|
dnl Add this code only if there's a ACTION-ENABLED or ACTION-DISABLED.
|
||||||
|
m4_ifval([$6[]$7],
|
||||||
|
[
|
||||||
|
if test "[$]pgac_arg_to_variable([$1], [$2])" = yes; then
|
||||||
|
m4_default([$6], :)
|
||||||
|
m4_ifval([$7],
|
||||||
|
[else
|
||||||
|
$7
|
||||||
|
])[]dnl
|
||||||
|
fi
|
||||||
|
])[]dnl
|
||||||
|
])# PGAC_ARG_OPTARG
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
217
postgresql-odbc-10.03.0000-pg12-fixes.patch
Normal file
217
postgresql-odbc-10.03.0000-pg12-fixes.patch
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
Backport PG12>= fixes from upstream.
|
||||||
|
Commits:
|
||||||
|
- 2be35a64b0143cb8648f44ed4745bfddfeb96e55
|
||||||
|
- 4ee79572296a8b3ca234c9521391bac86a18ec59
|
||||||
|
|
||||||
|
Description: 'relhasoids' was dropped in PG12 and that caused issues with predefined queries in odbc.
|
||||||
|
|
||||||
|
Resolves: #2061312
|
||||||
|
|
||||||
|
--- a/configure.ac 2018-05-19 12:43:56.000000000 +0200
|
||||||
|
+++ b/configure.ac 2022-03-24 15:45:03.420713295 +0100
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
|
||||||
|
if test "$with_libpq" != yes; then
|
||||||
|
if test -d "$with_libpq"; then
|
||||||
|
- PATH="$PATH:$with_libpq/bin"
|
||||||
|
+ PATH="$with_libpq/bin:$PATH"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$with_libpq/include -I$with_libpq/include/postgresql/internal"
|
||||||
|
LDFLAGS="$LDFLAGS -L$with_libpq/lib"
|
||||||
|
else
|
||||||
|
--- a/info.c 2018-05-19 12:32:53.000000000 +0200
|
||||||
|
+++ b/info.c 2022-03-24 15:44:11.294453181 +0100
|
||||||
|
@@ -2341,9 +2341,11 @@
|
||||||
|
"t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, "
|
||||||
|
"c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), "
|
||||||
|
"case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, "
|
||||||
|
- "c.relhasoids, %s, c.relhassubclass "
|
||||||
|
+ "%s, %s, c.relhassubclass "
|
||||||
|
"from (((pg_catalog.pg_class c "
|
||||||
|
- "inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace", PG_VERSION_GE(conn, 10.0) ? "attidentity" : "''");
|
||||||
|
+ "inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace",
|
||||||
|
+ PG_VERSION_GE(conn, 12.0) ? "0" : "c.relhasoids",
|
||||||
|
+ PG_VERSION_GE(conn, 10.0) ? "attidentity" : "''");
|
||||||
|
if (search_by_ids)
|
||||||
|
appendPQExpBuffer(&columns_query, " and c.oid = %u", reloid);
|
||||||
|
else
|
||||||
|
@@ -2857,7 +2859,12 @@
|
||||||
|
/*
|
||||||
|
* Create the query to find out if this is a view or not...
|
||||||
|
*/
|
||||||
|
- appendPQExpBufferStr(&columns_query, "select c.relhasrules, c.relkind, c.relhasoids");
|
||||||
|
+ appendPQExpBufferStr(&columns_query, "select c.relhasrules, c.relkind");
|
||||||
|
+ if (PG_VERSION_LT(conn, 12.0))
|
||||||
|
+ appendPQExpBufferStr(&columns_query, ", c.relhasoids");
|
||||||
|
+ else
|
||||||
|
+ appendPQExpBufferStr(&columns_query, ", 0 as relhasoids");
|
||||||
|
+
|
||||||
|
appendPQExpBufferStr(&columns_query, " from pg_catalog.pg_namespace u,"
|
||||||
|
" pg_catalog.pg_class c where "
|
||||||
|
"u.oid = c.relnamespace");
|
||||||
|
@@ -3243,7 +3250,7 @@
|
||||||
|
initPQExpBuffer(&index_query);
|
||||||
|
printfPQExpBuffer(&index_query, "select c.relname, i.indkey, i.indisunique"
|
||||||
|
", i.indisclustered, a.amname, c.relhasrules, n.nspname"
|
||||||
|
- ", c.oid, d.relhasoids, %s"
|
||||||
|
+ ", c.oid, %s, %s"
|
||||||
|
" from pg_catalog.pg_index i, pg_catalog.pg_class c,"
|
||||||
|
" pg_catalog.pg_class d, pg_catalog.pg_am a,"
|
||||||
|
" pg_catalog.pg_namespace n"
|
||||||
|
@@ -3253,7 +3260,8 @@
|
||||||
|
" and d.oid = i.indrelid"
|
||||||
|
" and i.indexrelid = c.oid"
|
||||||
|
" and c.relam = a.oid order by"
|
||||||
|
- , PG_VERSION_GE(conn, 8.3) ? "i.indoption" : "0"
|
||||||
|
+ , PG_VERSION_LT(conn, 12.0) ? "d.relhasoids" : "0"
|
||||||
|
+ , PG_VERSION_GE(conn, 8.3) ? "i.indoption" : "0"
|
||||||
|
, eq_string, escTableName, eq_string, escSchemaName);
|
||||||
|
appendPQExpBufferStr(&index_query, " i.indisprimary desc,");
|
||||||
|
appendPQExpBufferStr(&index_query, " i.indisunique, n.nspname, c.relname");
|
||||||
|
--- a/parse.c 2022-03-24 15:41:07.544536251 +0100
|
||||||
|
+++ b/parse.c 2022-03-28 12:10:34.656785167 +0200
|
||||||
|
@@ -379,12 +379,22 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-static BOOL CheckHasOidsUsingSaved(StatementClass *stmt, TABLE_INFO *ti)
|
||||||
|
+/*
|
||||||
|
+ * Check relhasoids(before PG12), relhssubclass and get some relevant information.
|
||||||
|
+ */
|
||||||
|
+BOOL CheckPgClassInfo(StatementClass *stmt)
|
||||||
|
{
|
||||||
|
const COL_INFO *coli;
|
||||||
|
int table_info;
|
||||||
|
+ TABLE_INFO *ti;
|
||||||
|
BOOL hasoids = FALSE, hassubclass =FALSE, keyFound = FALSE;
|
||||||
|
|
||||||
|
+MYLOG(0, "Entering\n");
|
||||||
|
+ if (0 != SC_checked_hasoids(stmt))
|
||||||
|
+ return TRUE;
|
||||||
|
+ if (!stmt->ti || !stmt->ti[0])
|
||||||
|
+ return FALSE;
|
||||||
|
+ ti = stmt->ti[0];
|
||||||
|
MYLOG(DETAIL_LOG_LEVEL, "ti->col_info=%p\n", ti->col_info);
|
||||||
|
if (TI_checked_hasoids(ti))
|
||||||
|
;
|
||||||
|
@@ -465,93 +475,6 @@
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static BOOL CheckHasOids(StatementClass * stmt)
|
||||||
|
-{
|
||||||
|
- QResultClass *res;
|
||||||
|
- BOOL hasoids = TRUE, hassubclass =FALSE, foundKey = FALSE;
|
||||||
|
- char query[512];
|
||||||
|
- ConnectionClass *conn = SC_get_conn(stmt);
|
||||||
|
- TABLE_INFO *ti;
|
||||||
|
-
|
||||||
|
-MYLOG(0, "Entering\n");
|
||||||
|
- if (0 != SC_checked_hasoids(stmt))
|
||||||
|
- return TRUE;
|
||||||
|
- if (!stmt->ti || !stmt->ti[0])
|
||||||
|
- return FALSE;
|
||||||
|
- ti = stmt->ti[0];
|
||||||
|
- if (CheckHasOidsUsingSaved(stmt, ti))
|
||||||
|
- return TRUE;
|
||||||
|
- // no longer come here??
|
||||||
|
- SPRINTF_FIXED(query,
|
||||||
|
- "select relhasoids, c.oid, relhassubclass from pg_class c, pg_namespace n where relname = '%s' and nspname = '%s' and c.relnamespace = n.oid",
|
||||||
|
- SAFE_NAME(ti->table_name), SAFE_NAME(ti->schema_name));
|
||||||
|
- res = CC_send_query(conn, query, NULL, READ_ONLY_QUERY, NULL);
|
||||||
|
- if (QR_command_maybe_successful(res))
|
||||||
|
- {
|
||||||
|
- stmt->num_key_fields = PG_NUM_NORMAL_KEYS;
|
||||||
|
- if (1 == QR_get_num_total_tuples(res))
|
||||||
|
- {
|
||||||
|
- const char *value = QR_get_value_backend_text(res, 0, 0);
|
||||||
|
- const char *value2 = QR_get_value_backend_text(res, 0, 2);
|
||||||
|
- if (value && ('f' == *value || '0' == *value))
|
||||||
|
- {
|
||||||
|
- hasoids = FALSE;
|
||||||
|
- TI_set_has_no_oids(ti);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- TI_set_hasoids(ti);
|
||||||
|
- foundKey = TRUE;
|
||||||
|
- STR_TO_NAME(ti->bestitem, OID_NAME);
|
||||||
|
- STRX_TO_NAME(ti->bestqual, "\"" OID_NAME "\" = %u");
|
||||||
|
- }
|
||||||
|
- if (value2 && ('f' == *value2 || '0' == *value2))
|
||||||
|
- {
|
||||||
|
- TI_set_has_no_subclass(ti);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- hassubclass = TRUE;
|
||||||
|
- TI_set_hassubclass(ti);
|
||||||
|
- STR_TO_NAME(ti->bestitem, TABLEOID_NAME);
|
||||||
|
- STRX_TO_NAME(ti->bestqual, "\"" TABLEOID_NAME "\" = %u");
|
||||||
|
- }
|
||||||
|
- TI_set_hasoids_checked(ti);
|
||||||
|
- ti->table_oid = (OID) strtoul(QR_get_value_backend_text(res, 0, 1), NULL, 10);
|
||||||
|
- }
|
||||||
|
- QR_Destructor(res);
|
||||||
|
- res = NULL;
|
||||||
|
- if (!hasoids && !hassubclass)
|
||||||
|
- {
|
||||||
|
- SPRINTF_FIXED(query, "select a.attname, a.atttypid from pg_index i, pg_attribute a where indrelid=%u and indnatts=1 and indisunique and indexprs is null and indpred is null and i.indrelid = a.attrelid and a.attnum=i.indkey[0] and attnotnull and atttypid in (%d, %d)", ti->table_oid, PG_TYPE_INT4, PG_TYPE_OID);
|
||||||
|
- res = CC_send_query(conn, query, NULL, READ_ONLY_QUERY, NULL);
|
||||||
|
- if (QR_command_maybe_successful(res) && QR_get_num_total_tuples(res) > 0)
|
||||||
|
- {
|
||||||
|
- foundKey = TRUE;
|
||||||
|
- STR_TO_NAME(ti->bestitem, QR_get_value_backend_text(res, 0, 0));
|
||||||
|
- SPRINTF_FIXED(query, "\"%s\" = %%", SAFE_NAME(ti->bestitem));
|
||||||
|
- if (PG_TYPE_INT4 == (OID) QR_get_value_backend_int(res, 0, 1, NULL))
|
||||||
|
- STRCAT_FIXED(query, "d");
|
||||||
|
- else
|
||||||
|
- STRCAT_FIXED(query, "u");
|
||||||
|
- STRX_TO_NAME(ti->bestqual, query);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- /* stmt->updatable = FALSE; */
|
||||||
|
- foundKey = TRUE;
|
||||||
|
- stmt->num_key_fields--;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- QR_Destructor(res);
|
||||||
|
- SC_set_checked_hasoids(stmt, foundKey);
|
||||||
|
-
|
||||||
|
- MYLOG(DETAIL_LOG_LEVEL, "subclass=%d oids=%d bestqual=%s foundKey=%d num_key_fields=%d\n", TI_has_subclass(ti), TI_has_oids(ti), PRINT_NAME(ti->bestqual), foundKey, stmt->num_key_fields);
|
||||||
|
-
|
||||||
|
- return TRUE;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static BOOL increaseNtab(StatementClass *stmt, const char *func)
|
||||||
|
{
|
||||||
|
TABLE_INFO **ti = stmt->ti, *wti;
|
||||||
|
@@ -1383,7 +1304,7 @@
|
||||||
|
if (SC_parsed_status(stmt) != STMT_PARSE_NONE)
|
||||||
|
{
|
||||||
|
if (check_hasoids)
|
||||||
|
- CheckHasOids(stmt);
|
||||||
|
+ CheckPgClassInfo(stmt);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
nfields = 0;
|
||||||
|
@@ -2261,7 +2182,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (check_hasoids && updatable)
|
||||||
|
- CheckHasOids(stmt);
|
||||||
|
+ CheckPgClassInfo(stmt);
|
||||||
|
SC_set_parse_status(stmt, parse ? STMT_PARSE_COMPLETE : STMT_PARSE_INCOMPLETE);
|
||||||
|
for (i = 0; i < (int) irdflds->nfields; i++)
|
||||||
|
{
|
||||||
|
--- a/statement.h 2018-05-19 12:32:53.000000000 +0200
|
||||||
|
+++ b/statement.h 2022-03-28 12:11:20.015023357 +0200
|
||||||
|
@@ -542,6 +542,7 @@
|
||||||
|
RETCODE DiscardStatementSvp(StatementClass *self, RETCODE, BOOL errorOnly);
|
||||||
|
|
||||||
|
QResultClass *ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name, const char *query_p, Int2 num_params, const char *comment, QResultClass *res);
|
||||||
|
+BOOL CheckPgClassInfo(StatementClass *);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Macros to convert global index <-> relative index in resultset/rowset
|
@ -1,76 +0,0 @@
|
|||||||
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);
|
|
||||||
|
|
@ -1,28 +1,25 @@
|
|||||||
%bcond_without check
|
|
||||||
|
|
||||||
%global upstream_name psqlodbc
|
%global upstream_name psqlodbc
|
||||||
|
|
||||||
Name: postgresql-odbc
|
Name: postgresql-odbc
|
||||||
Summary: PostgreSQL ODBC driver
|
Summary: PostgreSQL ODBC driver
|
||||||
Version: 16.00.0000
|
Version: 10.03.0000
|
||||||
Release: 5%{?dist}
|
Release: 3%{?dist}
|
||||||
License: LGPL-2.0-or-later
|
License: LGPLv2+
|
||||||
|
Group: Applications/Databases
|
||||||
URL: https://odbc.postgresql.org/
|
URL: https://odbc.postgresql.org/
|
||||||
|
|
||||||
Source0: https://ftp.postgresql.org/pub/odbc/versions/src/%{upstream_name}-%{version}.tar.gz
|
Source0: http://ftp.postgresql.org/pub/odbc/versions/src/%{upstream_name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: postgresql-odbc-09.06.0200-revert-money-fix.patch
|
Patch0: postgresql-odbc-09.06.0200-revert-money-fix.patch
|
||||||
Patch1: postgresql-odbc-09.05.0400-revert-money-testsuite-fix.patch
|
Patch1: postgresql-odbc-09.05.0400-revert-money-testsuite-fix.patch
|
||||||
Patch2: postgresql-odbc-endianity-test-fix.patch
|
# This patch (backport) can be removed during rebase to version >= 12.00.xxx
|
||||||
|
Patch2: postgresql-odbc-10.03.0000-pg12-fixes.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: unixODBC-devel postgresql-devel
|
||||||
BuildRequires: gcc
|
BuildRequires: libpq-devel
|
||||||
BuildRequires: unixODBC-devel
|
|
||||||
BuildRequires: pkgconfig(libpq)
|
|
||||||
|
|
||||||
%if %{with check}
|
# Testsuite deps.
|
||||||
BuildRequires: postgresql-test-rpm-macros
|
BuildRequires: postgresql-test-rpm-macros
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: %upstream_name = %version-%release
|
Provides: %upstream_name = %version-%release
|
||||||
|
|
||||||
@ -44,13 +41,11 @@ EOF
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-unixodbc --disable-dependency-tracking
|
%configure --with-unixodbc --disable-dependency-tracking
|
||||||
# GCC 10 defaults to -fno-common
|
make %{?_smp_mflags}
|
||||||
# https://gcc.gnu.org/gcc-10/changes.html (see C section)
|
|
||||||
%make_build CFLAGS="%{optflags} -fcommon"
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
%global testsuitedir %{_libdir}/%{name}
|
%global testsuitedir %{_libdir}/%{name}
|
||||||
install -d -m 755 $RPM_BUILD_ROOT/%{testsuitedir}
|
install -d -m 755 $RPM_BUILD_ROOT/%{testsuitedir}
|
||||||
@ -64,26 +59,25 @@ pushd ${RPM_BUILD_ROOT}%{_libdir}
|
|||||||
rm psqlodbcw.la psqlodbca.la
|
rm psqlodbcw.la psqlodbca.la
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{with check}
|
|
||||||
%check
|
%check
|
||||||
%postgresql_tests_run
|
%pgtests_init
|
||||||
|
%pgtests_start
|
||||||
|
|
||||||
# make sure that we are testing aginst expected output "utf8" case
|
cd test && make installcheck %{_smp_mflags} || {
|
||||||
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 ==="
|
echo "=== trying to find all regression.diffs files in build directory ==="
|
||||||
find -name regression.diffs | while read line; do
|
find -name regression.diffs | while read line; do
|
||||||
cat "$line"
|
cat "$line"
|
||||||
done
|
done
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%package tests
|
%package tests
|
||||||
Summary: Testsuite files for psqlodbc
|
Summary: Testsuite files for psqlodbc
|
||||||
Requires: postgresql-test
|
Requires: postgresql-test
|
||||||
@ -112,73 +106,19 @@ the PostgreSQL unixODBC driver.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 16.00.0000-5
|
* Mon Mar 28 2022 Marek Kulik <mkulik@redhat.com> - 10.03.0000-3
|
||||||
- Bump release for October 2024 mass rebuild:
|
- add patch postgresql-odbc-10.03.0000-pg12-fixes
|
||||||
Resolves: RHEL-64018
|
Resolves: #2061312
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 16.00.0000-4
|
* Wed May 30 2018 Pavel Raiskup <praiskup@redhat.com> - 10.03.0000-2
|
||||||
- Bump release for June 2024 mass rebuild
|
- rebuild for metadata fix (upstream URL)
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.02.0000-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.02.0000-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jun 02 2020 Ondrej Dubaj <odubaj@redhat.com> - 12.02.0000-1
|
|
||||||
- Rebase to upstream release 12.02.0000
|
|
||||||
|
|
||||||
* Mon Mar 09 2020 Patrik Novotný <panovotn@redhat.com> - 12.01.0000-1
|
|
||||||
- Rebase to upstream release 12.01.0000
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.03.0000-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 10.03.0000-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 10.03.0000-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10.03.0000-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon May 21 2018 Pavel Raiskup <praiskup@redhat.com> - 10.03.0000-1
|
* Mon May 21 2018 Pavel Raiskup <praiskup@redhat.com> - 10.03.0000-1
|
||||||
- update to new upstream release, per announcement:
|
- update: new upstream release, per announcement:
|
||||||
https://www.postgresql.org/message-id/20180519131632.8E59CB40E51%40winpg.jp
|
https://www.postgresql.org/message-id/20180519131632.8E59CB40E51%40winpg.jp
|
||||||
|
|
||||||
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 10.02.0000-2
|
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 10.02.0000-1
|
||||||
- BR postgresql-test-rpm-macros
|
- build against libpq-devel and postgresql-test-rpm-macros
|
||||||
- add %%bcond for check section
|
|
||||||
|
|
||||||
* Mon Apr 02 2018 Pavel Raiskup <praiskup@redhat.com> - 10.02.0000-1
|
|
||||||
- update to new upstream release, per announcement:
|
- update to new upstream release, per announcement:
|
||||||
https://www.postgresql.org/message-id/20180330143925.88CEDB40E51%40winpg.jp
|
https://www.postgresql.org/message-id/20180330143925.88CEDB40E51%40winpg.jp
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (psqlodbc-16.00.0000.tar.gz) = ad971cd29e431225d03faf5ebc0ba7a9f17d20dd70106867f05df8dc1e509413d4db533101a1b3418480ad758b7626c178ec345c5ff7e9409f7fcfbea9427166
|
SHA512 (psqlodbc-10.03.0000.tar.gz) = c8d2322a4e97d0312eb822cd8533931a87b808fa9686754ebaea09b433f53b5cfec7572bd19ec0a8797ffb5d83aa0a83aa802af7a97a8e1b0ae4453042bb7867
|
||||||
|
Loading…
Reference in New Issue
Block a user