Skip to content

Commit

Permalink
additional cleanups for pgport find_my_exec support
Browse files Browse the repository at this point in the history
Clean up configure messaging and avoid a compiler warning by
checking for HAVE_PGPORT after config.h is included
(cherry picked from commit be93380)

Conflicts:

	RELEASE
	src/slonik/slonik.c
  • Loading branch information
ssinger committed Dec 7, 2012
1 parent b266145 commit d23fed0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions RELEASE
@@ -1,6 +1,9 @@
#+OPTIONS: ^:{}
* Slony-I Release Notes

- No bug :: add --with-pgport option to configure and when set to yes let slonik use these functions to determine
the PGSHARE directory at runtime. This defaults to no

- Bug #240 :: Improve notes on VACUUM

- Bug #278 :: assorted spelling fixes
Expand Down
4 changes: 3 additions & 1 deletion config/acx_libpq.m4
Expand Up @@ -510,7 +510,9 @@ if test "$with_pgport" = "yes"; then
AC_MSG_CHECKING(for pgport)
AC_DEFINE(HAVE_PGPORT)
LIBS="$LIBS -lpgport"
AC_TRY_LINK_FUNC(find_my_exec,HAVE_PGPORT=1, AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable"))
AC_TRY_LINK_FUNC(find_my_exec,[HAVE_PGPORT=1
AC_MSG_RESULT(yes)],
AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable"))
fi
AC_LANG_RESTORE
Expand Down
10 changes: 6 additions & 4 deletions src/slonik/slonik.c
Expand Up @@ -33,10 +33,6 @@
#include "libpq-fe.h"
#include "slonik.h"

#ifdef HAVE_PGPORT
#undef USE_REPL_SNPRINTF
#include "port.h"
#endif

#ifdef MSVC
#include "config_msvc.h"
Expand All @@ -46,6 +42,12 @@
#include "../parsestatements/scanner.h"
extern int STMTS[MAXSTATEMENTS];


#ifdef HAVE_PGPORT
#undef USE_REPL_SNPRINTF
#include "port.h"
#endif

#define MAXPGPATH 256

/*
Expand Down

0 comments on commit d23fed0

Please sign in to comment.