PostgreSQL Source Code  git master
port.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * port.h
4  * Header for src/port/ compatibility functions.
5  *
6  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/port.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PG_PORT_H
14 #define PG_PORT_H
15 
16 #include <ctype.h>
17 #include <netdb.h>
18 #include <pwd.h>
19 
20 /*
21  * Windows has enough specialized port stuff that we push most of it off
22  * into another file.
23  * Note: Some CYGWIN includes might #define WIN32.
24  */
25 #if defined(WIN32) && !defined(__CYGWIN__)
26 #include "port/win32_port.h"
27 #endif
28 
29 /* socket has a different definition on WIN32 */
30 #ifndef WIN32
31 typedef int pgsocket;
32 
33 #define PGINVALID_SOCKET (-1)
34 #else
35 typedef SOCKET pgsocket;
36 
37 #define PGINVALID_SOCKET INVALID_SOCKET
38 #endif
39 
40 /* non-blocking */
41 extern bool pg_set_noblock(pgsocket sock);
42 extern bool pg_set_block(pgsocket sock);
43 
44 /* Portable path handling for Unix/Win32 (in path.c) */
45 
46 extern bool has_drive_prefix(const char *filename);
47 extern char *first_dir_separator(const char *filename);
48 extern char *last_dir_separator(const char *filename);
49 extern char *first_path_var_separator(const char *pathlist);
50 extern void join_path_components(char *ret_path,
51  const char *head, const char *tail);
52 extern void canonicalize_path(char *path);
53 extern void make_native_path(char *path);
54 extern void cleanup_path(char *path);
55 extern bool path_contains_parent_reference(const char *path);
56 extern bool path_is_relative_and_below_cwd(const char *path);
57 extern bool path_is_prefix_of_path(const char *path1, const char *path2);
58 extern char *make_absolute_path(const char *path);
59 extern const char *get_progname(const char *argv0);
60 extern void get_share_path(const char *my_exec_path, char *ret_path);
61 extern void get_etc_path(const char *my_exec_path, char *ret_path);
62 extern void get_include_path(const char *my_exec_path, char *ret_path);
63 extern void get_pkginclude_path(const char *my_exec_path, char *ret_path);
64 extern void get_includeserver_path(const char *my_exec_path, char *ret_path);
65 extern void get_lib_path(const char *my_exec_path, char *ret_path);
66 extern void get_pkglib_path(const char *my_exec_path, char *ret_path);
67 extern void get_locale_path(const char *my_exec_path, char *ret_path);
68 extern void get_doc_path(const char *my_exec_path, char *ret_path);
69 extern void get_html_path(const char *my_exec_path, char *ret_path);
70 extern void get_man_path(const char *my_exec_path, char *ret_path);
71 extern bool get_home_path(char *ret_path);
72 extern void get_parent_directory(char *path);
73 
74 /* common/pgfnames.c */
75 extern char **pgfnames(const char *path);
76 extern void pgfnames_cleanup(char **filenames);
77 
78 /*
79  * is_absolute_path
80  *
81  * By making this a macro we avoid needing to include path.c in libpq.
82  */
83 #ifndef WIN32
84 #define IS_DIR_SEP(ch) ((ch) == '/')
85 
86 #define is_absolute_path(filename) \
87 ( \
88  IS_DIR_SEP((filename)[0]) \
89 )
90 #else
91 #define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\')
92 
93 /* See path_is_relative_and_below_cwd() for how we handle 'E:abc'. */
94 #define is_absolute_path(filename) \
95 ( \
96  IS_DIR_SEP((filename)[0]) || \
97  (isalpha((unsigned char) ((filename)[0])) && (filename)[1] == ':' && \
98  IS_DIR_SEP((filename)[2])) \
99 )
100 #endif
101 
102 /* Portable locale initialization (in exec.c) */
103 extern void set_pglocale_pgservice(const char *argv0, const char *app);
104 
105 /* Portable way to find binaries (in exec.c) */
106 extern int find_my_exec(const char *argv0, char *retpath);
107 extern int find_other_exec(const char *argv0, const char *target,
108  const char *versionstr, char *retpath);
109 
110 /* Doesn't belong here, but this is used with find_other_exec(), so... */
111 #define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
112 
113 
114 #if defined(WIN32) || defined(__CYGWIN__)
115 #define EXE ".exe"
116 #else
117 #define EXE ""
118 #endif
119 
120 #if defined(WIN32) && !defined(__CYGWIN__)
121 #define DEVNULL "nul"
122 #else
123 #define DEVNULL "/dev/null"
124 #endif
125 
126 /* Portable delay handling */
127 extern void pg_usleep(long microsec);
128 
129 /* Portable SQL-like case-independent comparisons and conversions */
130 extern int pg_strcasecmp(const char *s1, const char *s2);
131 extern int pg_strncasecmp(const char *s1, const char *s2, size_t n);
132 extern unsigned char pg_toupper(unsigned char ch);
133 extern unsigned char pg_tolower(unsigned char ch);
134 extern unsigned char pg_ascii_toupper(unsigned char ch);
135 extern unsigned char pg_ascii_tolower(unsigned char ch);
136 
137 #ifdef USE_REPL_SNPRINTF
138 
139 /*
140  * Versions of libintl >= 0.13 try to replace printf() and friends with
141  * macros to their own versions that understand the %$ format. We do the
142  * same, so disable their macros, if they exist.
143  */
144 #ifdef vsnprintf
145 #undef vsnprintf
146 #endif
147 #ifdef snprintf
148 #undef snprintf
149 #endif
150 #ifdef sprintf
151 #undef sprintf
152 #endif
153 #ifdef vfprintf
154 #undef vfprintf
155 #endif
156 #ifdef fprintf
157 #undef fprintf
158 #endif
159 #ifdef printf
160 #undef printf
161 #endif
162 
163 extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
164 extern int pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
165 extern int pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
166 extern int pg_vfprintf(FILE *stream, const char *fmt, va_list args);
167 extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
168 extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
169 
170 /*
171  * The GCC-specific code below prevents the pg_attribute_printf above from
172  * being replaced, and this is required because gcc doesn't know anything
173  * about pg_printf.
174  */
175 #ifdef __GNUC__
176 #define vsnprintf(...) pg_vsnprintf(__VA_ARGS__)
177 #define snprintf(...) pg_snprintf(__VA_ARGS__)
178 #define sprintf(...) pg_sprintf(__VA_ARGS__)
179 #define vfprintf(...) pg_vfprintf(__VA_ARGS__)
180 #define fprintf(...) pg_fprintf(__VA_ARGS__)
181 #define printf(...) pg_printf(__VA_ARGS__)
182 #else
183 #define vsnprintf pg_vsnprintf
184 #define snprintf pg_snprintf
185 #define sprintf pg_sprintf
186 #define vfprintf pg_vfprintf
187 #define fprintf pg_fprintf
188 #define printf pg_printf
189 #endif
190 #endif /* USE_REPL_SNPRINTF */
191 
192 /* Portable prompt handling */
193 extern void simple_prompt(const char *prompt, char *destination, size_t destlen,
194  bool echo);
195 
196 extern int pclose_check(FILE *stream);
197 
198 /* Global variable holding time zone information. */
199 #if defined(WIN32) || defined(__CYGWIN__)
200 #define TIMEZONE_GLOBAL _timezone
201 #define TZNAME_GLOBAL _tzname
202 #else
203 #define TIMEZONE_GLOBAL timezone
204 #define TZNAME_GLOBAL tzname
205 #endif
206 
207 #if defined(WIN32) || defined(__CYGWIN__)
208 /*
209  * Win32 doesn't have reliable rename/unlink during concurrent access.
210  */
211 extern int pgrename(const char *from, const char *to);
212 extern int pgunlink(const char *path);
213 
214 /* Include this first so later includes don't see these defines */
215 #ifdef _MSC_VER
216 #include <io.h>
217 #endif
218 
219 #define rename(from, to) pgrename(from, to)
220 #define unlink(path) pgunlink(path)
221 #endif /* defined(WIN32) || defined(__CYGWIN__) */
222 
223 /*
224  * Win32 also doesn't have symlinks, but we can emulate them with
225  * junction points on newer Win32 versions.
226  *
227  * Cygwin has its own symlinks which work on Win95/98/ME where
228  * junction points don't, so use those instead. We have no way of
229  * knowing what type of system Cygwin binaries will be run on.
230  * Note: Some CYGWIN includes might #define WIN32.
231  */
232 #if defined(WIN32) && !defined(__CYGWIN__)
233 extern int pgsymlink(const char *oldpath, const char *newpath);
234 extern int pgreadlink(const char *path, char *buf, size_t size);
235 extern bool pgwin32_is_junction(const char *path);
236 
237 #define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
238 #define readlink(path, buf, size) pgreadlink(path, buf, size)
239 #endif
240 
241 extern bool rmtree(const char *path, bool rmtopdir);
242 
243 #if defined(WIN32) && !defined(__CYGWIN__)
244 
245 /*
246  * open() and fopen() replacements to allow deletion of open files and
247  * passing of other special options.
248  */
249 #define O_DIRECT 0x80000000
250 extern int pgwin32_open(const char *, int,...);
251 extern FILE *pgwin32_fopen(const char *, const char *);
252 
253 #ifndef FRONTEND
254 #define open(a,b,c) pgwin32_open(a,b,c)
255 #define fopen(a,b) pgwin32_fopen(a,b)
256 #endif
257 
258 /*
259  * Mingw-w64 headers #define popen and pclose to _popen and _pclose. We want
260  * to use our popen wrapper, rather than plain _popen, so override that. For
261  * consistency, use our version of pclose, too.
262  */
263 #ifdef popen
264 #undef popen
265 #endif
266 #ifdef pclose
267 #undef pclose
268 #endif
269 
270 /*
271  * system() and popen() replacements to enclose the command in an extra
272  * pair of quotes.
273  */
274 extern int pgwin32_system(const char *command);
275 extern FILE *pgwin32_popen(const char *command, const char *type);
276 
277 #define system(a) pgwin32_system(a)
278 #define popen(a,b) pgwin32_popen(a,b)
279 #define pclose(a) _pclose(a)
280 
281 /* New versions of MingW have gettimeofday, old mingw and msvc don't */
282 #ifndef HAVE_GETTIMEOFDAY
283 /* Last parameter not used */
284 extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
285 #endif
286 #else /* !WIN32 */
287 
288 /*
289  * Win32 requires a special close for sockets and pipes, while on Unix
290  * close() does them all.
291  */
292 #define closesocket close
293 #endif /* WIN32 */
294 
295 /*
296  * On Windows, setvbuf() does not support _IOLBF mode, and interprets that
297  * as _IOFBF. To add insult to injury, setvbuf(file, NULL, _IOFBF, 0)
298  * crashes outright if "parameter validation" is enabled. Therefore, in
299  * places where we'd like to select line-buffered mode, we fall back to
300  * unbuffered mode instead on Windows. Always use PG_IOLBF not _IOLBF
301  * directly in order to implement this behavior.
302  */
303 #ifndef WIN32
304 #define PG_IOLBF _IOLBF
305 #else
306 #define PG_IOLBF _IONBF
307 #endif
308 
309 /*
310  * Default "extern" declarations or macro substitutes for library routines.
311  * When necessary, these routines are provided by files in src/port/.
312  */
313 #ifndef HAVE_CRYPT
314 extern char *crypt(const char *key, const char *setting);
315 #endif
316 
317 /* WIN32 handled in port/win32_port.h */
318 #ifndef WIN32
319 #define pgoff_t off_t
320 #ifdef __NetBSD__
321 extern int fseeko(FILE *stream, off_t offset, int whence);
322 extern off_t ftello(FILE *stream);
323 #endif
324 #endif
325 
326 extern double pg_erand48(unsigned short xseed[3]);
327 extern long pg_lrand48(void);
328 extern long pg_jrand48(unsigned short xseed[3]);
329 extern void pg_srand48(long seed);
330 
331 #ifndef HAVE_FLS
332 extern int fls(int mask);
333 #endif
334 
335 #ifndef HAVE_FSEEKO
336 #define fseeko(a, b, c) fseek(a, b, c)
337 #define ftello(a) ftell(a)
338 #endif
339 
340 #if !defined(HAVE_GETPEEREID) && !defined(WIN32)
341 extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
342 #endif
343 
344 #ifndef HAVE_ISINF
345 extern int isinf(double x);
346 #endif
347 
348 #ifndef HAVE_MKDTEMP
349 extern char *mkdtemp(char *path);
350 #endif
351 
352 #ifndef HAVE_RINT
353 extern double rint(double x);
354 #endif
355 
356 #ifndef HAVE_INET_ATON
357 #include <netinet/in.h>
358 #include <arpa/inet.h>
359 extern int inet_aton(const char *cp, struct in_addr *addr);
360 #endif
361 
362 #if !HAVE_DECL_STRLCAT
363 extern size_t strlcat(char *dst, const char *src, size_t siz);
364 #endif
365 
366 #if !HAVE_DECL_STRLCPY
367 extern size_t strlcpy(char *dst, const char *src, size_t siz);
368 #endif
369 
370 #if !HAVE_DECL_STRNLEN
371 extern size_t strnlen(const char *str, size_t maxlen);
372 #endif
373 
374 #if !defined(HAVE_RANDOM)
375 extern long random(void);
376 #endif
377 
378 #ifndef HAVE_UNSETENV
379 extern void unsetenv(const char *name);
380 #endif
381 
382 #ifndef HAVE_SRANDOM
383 extern void srandom(unsigned int seed);
384 #endif
385 
386 #ifndef HAVE_SSL_GET_CURRENT_COMPRESSION
387 #define SSL_get_current_compression(x) 0
388 #endif
389 
390 /* thread.h */
391 extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
392 
393 #ifndef WIN32
394 extern int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
395  size_t buflen, struct passwd **result);
396 #endif
397 
398 extern int pqGethostbyname(const char *name,
399  struct hostent *resultbuf,
400  char *buffer, size_t buflen,
401  struct hostent **result,
402  int *herrno);
403 
404 extern void pg_qsort(void *base, size_t nel, size_t elsize,
405  int (*cmp) (const void *, const void *));
406 extern int pg_qsort_strcmp(const void *a, const void *b);
407 
408 #define qsort(a,b,c,d) pg_qsort(a,b,c,d)
409 
410 typedef int (*qsort_arg_comparator) (const void *a, const void *b, void *arg);
411 
412 extern void qsort_arg(void *base, size_t nel, size_t elsize,
413  qsort_arg_comparator cmp, void *arg);
414 
415 /* port/chklocale.c */
416 extern int pg_get_encoding_from_locale(const char *ctype, bool write_message);
417 
418 #if defined(WIN32) && !defined(FRONTEND)
419 extern int pg_codepage_to_encoding(UINT cp);
420 #endif
421 
422 /* port/inet_net_ntop.c */
423 extern char *inet_net_ntop(int af, const void *src, int bits,
424  char *dst, size_t size);
425 
426 /* port/pg_strong_random.c */
427 #ifdef HAVE_STRONG_RANDOM
428 extern bool pg_strong_random(void *buf, size_t len);
429 #endif
430 
431 /* port/pgcheckdir.c */
432 extern int pg_check_dir(const char *dir);
433 
434 /* port/pgmkdirp.c */
435 extern int pg_mkdir_p(char *path, int omode);
436 
437 /* port/pqsignal.c */
438 typedef void (*pqsigfunc) (int signo);
439 extern pqsigfunc pqsignal(int signo, pqsigfunc func);
440 #ifndef WIN32
441 extern pqsigfunc pqsignal_no_restart(int signo, pqsigfunc func);
442 #else
443 #define pqsignal_no_restart(signo, func) pqsignal(signo, func)
444 #endif
445 
446 /* port/quotes.c */
447 extern char *escape_single_quotes_ascii(const char *src);
448 
449 /* port/wait_error.c */
450 extern char *wait_result_to_str(int exit_status);
451 
452 #endif /* PG_PORT_H */
char * make_absolute_path(const char *path)
Definition: path.c:608
static char * argv0
Definition: pg_ctl.c:93
int gettimeofday(struct timeval *tp, struct timezone *tzp)
Definition: gettimeofday.c:105
void pg_usleep(long microsec)
Definition: signal.c:53
void get_includeserver_path(const char *my_exec_path, char *ret_path)
Definition: path.c:740
char * wait_result_to_str(int exit_status)
Definition: wait_error.c:32
#define fseeko(a, b, c)
Definition: port.h:336
int pg_mkdir_p(char *path, int omode)
Definition: pgmkdirp.c:57
pqsigfunc pqsignal_no_restart(int signo, pqsigfunc func)
Definition: pqsignal.c:71
const char * get_progname(const char *argv0)
Definition: path.c:453
int getpeereid(int sock, uid_t *uid, gid_t *gid)
Definition: getpeereid.c:35
void(* pqsigfunc)(int signo)
Definition: port.h:438
bool pg_set_block(pgsocket sock)
Definition: noblock.c:49
long random(void)
Definition: random.c:22
bool path_is_prefix_of_path(const char *path1, const char *path2)
Definition: path.c:438
int pg_snprintf(char *str, size_t count, const char *fmt,...)
Definition: snprintf.c:167
int pqGethostbyname(const char *name, struct hostent *resultbuf, char *buffer, size_t buflen, struct hostent **result, int *herrno)
Definition: thread.c:117
int pg_vfprintf(FILE *stream, const char *fmt, va_list args)
Definition: snprintf.c:208
unsigned char pg_ascii_tolower(unsigned char ch)
Definition: pgstrcasecmp.c:146
long pg_lrand48(void)
Definition: erand48.c:88
int(* qsort_arg_comparator)(const void *a, const void *b, void *arg)
Definition: port.h:410
void make_native_path(char *path)
Definition: path.c:166
void pg_srand48(long seed)
Definition: erand48.c:102
char * pqStrerror(int errnum, char *strerrbuf, size_t buflen)
Definition: thread.c:61
bool pg_strong_random(void *buf, size_t len)
void canonicalize_path(char *path)
Definition: path.c:254
unsigned char pg_tolower(unsigned char ch)
Definition: pgstrcasecmp.c:122
unsigned char pg_ascii_toupper(unsigned char ch)
Definition: pgstrcasecmp.c:135
int pg_strcasecmp(const char *s1, const char *s2)
Definition: pgstrcasecmp.c:36
bool path_contains_parent_reference(const char *path)
Definition: path.c:376
void get_pkglib_path(const char *my_exec_path, char *ret_path)
Definition: path.c:758
#define pg_attribute_printf(f, a)
Definition: c.h:131
int fls(int mask)
Definition: fls.c:55
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
Definition: pgstrcasecmp.c:69
bool has_drive_prefix(const char *filename)
Definition: path.c:87
char * escape_single_quotes_ascii(const char *src)
Definition: quotes.c:33
bool rmtree(const char *path, bool rmtopdir)
Definition: rmtree.c:36
pqsigfunc pqsignal(int signo, pqsigfunc func)
Definition: signal.c:168
void get_lib_path(const char *my_exec_path, char *ret_path)
Definition: path.c:749
char * s1
void get_pkginclude_path(const char *my_exec_path, char *ret_path)
Definition: path.c:731
void unsetenv(const char *name)
Definition: unsetenv.c:20
void get_doc_path(const char *my_exec_path, char *ret_path)
Definition: path.c:776
int isinf(double x)
void cleanup_path(char *path)
Definition: path.c:185
static char * buf
Definition: pg_test_fsync.c:67
void simple_prompt(const char *prompt, char *destination, size_t destlen, bool echo)
Definition: sprompt.c:37
int pg_printf(const char *fmt,...)
Definition: snprintf.c:242
bool path_is_relative_and_below_cwd(const char *path)
Definition: path.c:405
void get_parent_directory(char *path)
Definition: path.c:854
int pclose_check(FILE *stream)
Definition: exec.c:510
int pgsocket
Definition: port.h:31
double rint(double x)
Definition: rint.c:22
int pg_sprintf(char *str, const char *fmt,...)
Definition: snprintf.c:196
char * inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
Definition: inet_net_ntop.c:77
int pgreadlink(const char *path, char *buf, size_t size)
int inet_aton(const char *cp, struct in_addr *addr)
Definition: inet_aton.c:56
void qsort_arg(void *base, size_t nel, size_t elsize, qsort_arg_comparator cmp, void *arg)
Definition: qsort_arg.c:113
char my_exec_path[MAXPGPATH]
Definition: globals.c:64
char * crypt(const char *key, const char *setting)
char * s2
int find_my_exec(const char *argv0, char *retpath)
Definition: exec.c:119
char * first_dir_separator(const char *filename)
Definition: path.c:103
int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
Definition: snprintf.c:150
double pg_erand48(unsigned short xseed[3])
Definition: erand48.c:79
char * last_dir_separator(const char *filename)
Definition: path.c:138
void get_etc_path(const char *my_exec_path, char *ret_path)
Definition: path.c:713
int pg_get_encoding_from_locale(const char *ctype, bool write_message)
Definition: chklocale.c:433
size_t strlcpy(char *dst, const char *src, size_t siz)
Definition: strlcpy.c:45
void set_pglocale_pgservice(const char *argv0, const char *app)
Definition: exec.c:550
bool pg_set_noblock(pgsocket sock)
Definition: noblock.c:25
void get_html_path(const char *my_exec_path, char *ret_path)
Definition: path.c:785
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
void pg_qsort(void *base, size_t nel, size_t elsize, int(*cmp)(const void *, const void *))
Definition: qsort.c:113
char * mkdtemp(char *path)
Definition: mkdtemp.c:286
int uid_t
Definition: win32_port.h:241
size_t strnlen(const char *str, size_t maxlen)
Definition: strnlen.c:26
int pg_qsort_strcmp(const void *a, const void *b)
Definition: qsort.c:232
char ** pgfnames(const char *path)
Definition: pgfnames.c:31
void join_path_components(char *ret_path, const char *head, const char *tail)
Definition: path.c:218
long pg_jrand48(unsigned short xseed[3])
Definition: erand48.c:95
const char * name
Definition: encode.c:521
void get_man_path(const char *my_exec_path, char *ret_path)
Definition: path.c:794
void get_include_path(const char *my_exec_path, char *ret_path)
Definition: path.c:722
static char * filename
Definition: pg_dumpall.c:90
int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer, size_t buflen, struct passwd **result)
Definition: thread.c:95
#define ftello(a)
Definition: port.h:337
int pg_check_dir(const char *dir)
Definition: pgcheckdir.c:31
int gid_t
Definition: win32_port.h:242
void * arg
void srandom(unsigned int seed)
Definition: srandom.c:22
void get_locale_path(const char *my_exec_path, char *ret_path)
Definition: path.c:767
void get_share_path(const char *my_exec_path, char *ret_path)
Definition: path.c:704
int find_other_exec(const char *argv0, const char *target, const char *versionstr, char *retpath)
Definition: exec.c:307
unsigned char pg_toupper(unsigned char ch)
Definition: pgstrcasecmp.c:105
int pg_fprintf(FILE *stream, const char *fmt,...)
Definition: snprintf.c:230
void pgfnames_cleanup(char **filenames)
Definition: pgfnames.c:99
char * first_path_var_separator(const char *pathlist)
Definition: path.c:120
size_t strlcat(char *dst, const char *src, size_t siz)
Definition: strlcat.c:33
bool get_home_path(char *ret_path)
Definition: path.c:807
bool pgwin32_is_junction(const char *path)
static int cmp(const chr *x, const chr *y, size_t len)
Definition: regc_locale.c:742
int pgsymlink(const char *oldpath, const char *newpath)