Content-Length: 273446 | pFad | http://github.com/postgrespro/postgres/commit/28e9ebb9999c33680acafef5ece33b27e0f9ba3f

49 Declare mkdtemp() only if we're providing it. · postgrespro/postgres@28e9ebb · GitHub
Skip to content

Commit 28e9ebb

Browse files
committed
Declare mkdtemp() only if we're providing it.
Follow our usual style of providing an "extern" for a standard library function only when we're also providing the implementation. This avoids issues when the system headers declare the function slightly differently than we do, as noted by Caleb Welton. We might have to go to the extent of probing to see if the system headers declare the function, but let's not do that until it's demonstrated to be necessary. Oversight in commit 9e6b1bf. Back-patch to all supported branches, as that was.
1 parent 96139cf commit 28e9ebb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/include/port.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
426426
extern int isinf(double x);
427427
#endif
428428

429+
#ifndef HAVE_MKDTEMP
430+
extern char *mkdtemp(char *path);
431+
#endif
432+
429433
#ifndef HAVE_RINT
430434
extern double rint(double x);
431435
#endif
@@ -497,7 +501,4 @@ extern int pg_check_dir(const char *dir);
497501
/* port/pgmkdirp.c */
498502
extern int pg_mkdir_p(char *path, int omode);
499503

500-
/* port/mkdtemp.c */
501-
extern char *mkdtemp(char *path);
502-
503504
#endif /* PG_PORT_H */

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/28e9ebb9999c33680acafef5ece33b27e0f9ba3f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy