From cc07f8cfe73f56fce1ddda4ea25d7b0b6c4f0ae9 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 1 Aug 2004 06:56:39 +0000 Subject: Create a C version of pg_config. Andrew Dunstan --- src/port/path.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'src/port/path.c') diff --git a/src/port/path.c b/src/port/path.c index aaecf33f74..1e45a8f3e2 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/path.c,v 1.25 2004/07/12 19:27:31 momjian Exp $ + * $PostgreSQL: pgsql/src/port/path.c,v 1.26 2004/08/01 06:56:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -205,10 +205,42 @@ get_pkginclude_path(const char *my_exec_path, char *ret_path) +/* + * get_includeserver_path + */ +void +get_includeserver_path(const char *my_exec_path, char *ret_path) +{ + const char *p; + + if ((p = relative_path(PGBINDIR, INCLUDEDIRSERVER))) + make_relative(my_exec_path, p, ret_path); + else + StrNCpy(ret_path, INCLUDEDIRSERVER, MAXPGPATH); + canonicalize_path(ret_path); +} + + + +/* + * get_lib_path + */ +void +get_lib_path(const char *my_exec_path, char *ret_path) +{ + const char *p; + + if ((p = relative_path(PGBINDIR, LIBDIR))) + make_relative(my_exec_path, p, ret_path); + else + StrNCpy(ret_path, LIBDIR, MAXPGPATH); + canonicalize_path(ret_path); +} + + + /* * get_pkglib_path - * - * Return library path, either relative to /bin or hardcoded */ void get_pkglib_path(const char *my_exec_path, char *ret_path) -- cgit v1.2.1