28#define _WIN32_IE 0x0500
40#include "pg_config_paths.h"
44#define IS_PATH_VAR_SEP(ch) ((ch) == ':')
46#define IS_PATH_VAR_SEP(ch) ((ch) == ';')
77 else if (
isalpha((
unsigned char) path[0]) && path[1] ==
':')
85#define skip_drive(path) (path)
132 for (p = pathlist; *p; p++)
177 for (p = path; *p; p +=
pg_sjis_mblen((
const unsigned char *) p))
185 for (p = path; *p; p++)
206 if (*s >= 0xa1 && *s <= 0xdf)
287 const char *head,
const char *tail)
369 if (p > path && *(p - 1) ==
'"')
390 for (; *p; p++,
to_p++)
587 if (path[0] ==
'.' &&
589 (path[2] ==
'\0' || path[2] ==
'/'))
622 else if (
isalpha((
unsigned char) path[0]) && path[1] ==
':' &&
674#if defined(__CYGWIN__) || defined(WIN32)
829 errmsg(
"out of memory")));
851 elog(
ERROR,
"could not get current working directory: %m");
853 fprintf(
stderr,
_(
"could not get current working directory: %m\n"));
866 errmsg(
"out of memory")));
883 errmsg(
"out of memory")));
1091 if (path[0] ==
'\0')
1101 for (; p > path &&
IS_DIR_SEP(*(p - 1)); p--)
#define unconstify(underlying_type, expr)
#define IS_HIGHBIT_SET(ch)
#define Assert(condition)
#define fprintf(file, fmt, msg)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
char my_exec_path[MAXPGPATH]
static char bin_path[MAXPGPATH]
void cleanup_path(char *path)
void get_share_path(const char *my_exec_path, char *ret_path)
void get_pkglib_path(const char *my_exec_path, char *ret_path)
void get_locale_path(const char *my_exec_path, char *ret_path)
void join_path_components(char *ret_path, const char *head, const char *tail)
#define IS_PATH_VAR_SEP(ch)
void get_man_path(const char *my_exec_path, char *ret_path)
bool get_home_path(char *ret_path)
void get_include_path(const char *my_exec_path, char *ret_path)
static char * append_subdir_to_path(char *path, char *subdir)
bool path_is_prefix_of_path(const char *path1, const char *path2)
char * last_dir_separator(const char *filename)
bool path_is_relative_and_below_cwd(const char *path)
void get_lib_path(const char *my_exec_path, char *ret_path)
char * first_path_var_separator(const char *pathlist)
void canonicalize_path(char *path)
void get_parent_directory(char *path)
static void trim_trailing_separator(char *path)
static char * trim_directory(char *path)
static void make_relative_path(char *ret_path, const char *target_path, const char *bin_path, const char *my_exec_path)
void get_etc_path(const char *my_exec_path, char *ret_path)
void canonicalize_path_enc(char *path, int encoding)
static int dir_strcmp(const char *s1, const char *s2)
bool path_contains_parent_reference(const char *path)
void make_native_path(char *filename)
char * make_absolute_path(const char *path)
const char * get_progname(const char *argv0)
char * first_dir_separator(const char *filename)
void get_doc_path(const char *my_exec_path, char *ret_path)
void get_html_path(const char *my_exec_path, char *ret_path)
void get_pkginclude_path(const char *my_exec_path, char *ret_path)
bool has_drive_prefix(const char *path)
void get_includeserver_path(const char *my_exec_path, char *ret_path)
@ RELATIVE_WITH_PARENT_REF
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define is_absolute_path(filename)
int pg_strcasecmp(const char *s1, const char *s2)
unsigned char pg_tolower(unsigned char ch)
size_t strlcpy(char *dst, const char *src, size_t siz)
static int pg_sjis_mblen(const unsigned char *s)