aboutsummaryrefslogtreecommitdiff
path: root/src/port/path.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-08-01 06:56:39 +0000
committerBruce Momjian <bruce@momjian.us>2004-08-01 06:56:39 +0000
commitcc07f8cfe73f56fce1ddda4ea25d7b0b6c4f0ae9 (patch)
tree3b6ad7906b3c93f8f67bde17ee02d7416a333982 /src/port/path.c
parent7510ac6203bc8e3c56eae95466feaeebfc1b4f31 (diff)
downloadpostgresql-cc07f8cfe73f56fce1ddda4ea25d7b0b6c4f0ae9.tar.gz
postgresql-cc07f8cfe73f56fce1ddda4ea25d7b0b6c4f0ae9.zip
Create a C version of pg_config.
Andrew Dunstan
Diffstat (limited to 'src/port/path.c')
-rw-r--r--src/port/path.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/port/path.c b/src/port/path.c
index aaecf33f741..1e45a8f3e2c 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 $
*
*-------------------------------------------------------------------------
*/
@@ -206,9 +206,41 @@ 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)