mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
postgres fix
This commit is contained in:
parent
639362309f
commit
112d3d27be
6
configure
vendored
6
configure
vendored
|
@ -28614,10 +28614,14 @@ $as_echo_n "checking for PostgreSQL client libraries... " >&6; }
|
|||
POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir` -I`$PG_CONFIG --includedir-server`"
|
||||
POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
|
||||
|
||||
if test -f "$postgresql_libdir/libpgport.a" -o -f "$postgresql_libdir/libpgport.so"; then
|
||||
if test -f "$postgresql_libdir/libpgport.a" -o -f "$postgresql_libdir/libpgport.so" -o -f "/usr/lib/libpgport.a" -o -f "/usr/lib/libpgport.so"; then
|
||||
POSTGRESQL_LIBS="-lpq -lpgport"
|
||||
else
|
||||
POSTGRESQL_LIBS="-lpq"
|
||||
|
||||
|
||||
$as_echo "#define LIBPGPORT_NOT_FOUND 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -731,6 +731,10 @@ static inline uint64_t u_getValue(uint16_t tag, void* payload)
|
|||
|
||||
static inline void u_setTag(uint16_t tag, uint64_t* pval) { uint64_t payload = u_getPayload(*pval); *pval = u_getValue(tag, (void*)(long)payload); }
|
||||
|
||||
#if defined(USE_PGSQL) && defined(LIBPGPORT_NOT_FOUND)
|
||||
static inline void pg_qsort(void* a, size_t n, size_t es, int (*cmp)(const void*, const void*)) { qsort(a, n, es, cmp); }
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -589,6 +589,9 @@
|
|||
/* Standard C lib version */
|
||||
#undef LIBC_VERSION
|
||||
|
||||
/* Define to 1 if PostgreSQL libpgport is not available */
|
||||
#undef LIBPGPORT_NOT_FOUND
|
||||
|
||||
/* Libraries */
|
||||
#undef LIBS_VAR
|
||||
|
||||
|
|
|
@ -100,14 +100,15 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
|
|||
POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir` -I`$PG_CONFIG --includedir-server`"
|
||||
POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
|
||||
|
||||
if test -f "$postgresql_libdir/libpgport.a" -o -f "$postgresql_libdir/libpgport.so"; then
|
||||
if test -f "$postgresql_libdir/libpgport.a" -o -f "$postgresql_libdir/libpgport.so" -o -f "/usr/lib/libpgport.a" -o -f "/usr/lib/libpgport.so"; then
|
||||
POSTGRESQL_LIBS="-lpq -lpgport"
|
||||
else
|
||||
POSTGRESQL_LIBS="-lpq"
|
||||
|
||||
AC_DEFINE([LIBPGPORT_NOT_FOUND], [1], [Define to 1 if PostgreSQL libpgport is not available])
|
||||
fi
|
||||
|
||||
AC_DEFINE([HAVE_POSTGRESQL], [1],
|
||||
[Define to 1 if PostgreSQL libraries are available])
|
||||
AC_DEFINE([HAVE_POSTGRESQL], [1], [Define to 1 if PostgreSQL libraries are available])
|
||||
|
||||
AC_MSG_RESULT([$POSTGRESQL_LIBS])
|
||||
fi
|
||||
|
|
|
@ -14,7 +14,10 @@ ULIB_DOCUMENT_ROOT=$ULIB_ROOT/ULIB_DOCUMENT_ROOT
|
|||
mkdir -p $ULIB_ROOT
|
||||
mkdir -p $ULIB_DOCUMENT_ROOT
|
||||
|
||||
#sudo apt-get install -y libpq-dev
|
||||
if [ "$TRAVIS" = "true" ]; then
|
||||
# AVOID "fatal error: postgres_fe.h: No such file or directory"
|
||||
sudo apt-get install -y postgresql-server-dev-all
|
||||
fi
|
||||
|
||||
# make use of FIFO scheduling policy possible (we must avoid use of test because bash signal trapping)
|
||||
#type setcap >/dev/null 2>/dev/null
|
||||
|
|
Loading…
Reference in New Issue
Block a user