1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Add get_home_path() to use USERPROFILE on Win32 and HOME on Unix.

This commit is contained in:
Bruce Momjian
2004-08-18 02:59:12 +00:00
parent 19cd31b068
commit 1abf13db3c
6 changed files with 47 additions and 25 deletions

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.53 2004/08/17 14:38:38 momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.54 2004/08/18 02:59:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,6 +50,7 @@ extern void get_lib_path(const char *my_exec_path, char *ret_path);
extern void get_pkglib_path(const char *my_exec_path, char *ret_path);
extern void get_locale_path(const char *my_exec_path, char *ret_path);
extern void set_pglocale_pgservice(const char *argv0, const char *app);
extern bool get_home_path(char *ret_path);
/*
* is_absolute_path
@@ -74,9 +75,6 @@ extern void set_pglocale_pgservice(const char *argv0, const char *app);
#endif
/* Portable way to find binaries */
extern int find_my_exec(const char *argv0, char *retpath);
extern int find_other_exec(const char *argv0, const char *target,
@@ -104,6 +102,12 @@ extern int find_other_exec(const char *argv0, const char *target,
#define SYSTEMQUOTE ""
#endif
#ifdef WIN32
#define HOMEDIR "USERPROFILE"
#else
#define HOMEDIR "HOME"
#endif
/* Portable delay handling */
extern void pg_usleep(long microsec);