Commit 60f8133d authored by Tom Lane's avatar Tom Lane

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 9e6b1bf2.  Back-patch
to all supported branches, as that was.
parent 5ba062ee
......@@ -390,6 +390,10 @@ extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
extern int isinf(double x);
#endif
#ifndef HAVE_MKDTEMP
extern char *mkdtemp(char *path);
#endif
#ifndef HAVE_RINT
extern double rint(double x);
#endif
......@@ -466,9 +470,6 @@ extern int pg_check_dir(const char *dir);
/* port/pgmkdirp.c */
extern int pg_mkdir_p(char *path, int omode);
/* port/mkdtemp.c */
extern char *mkdtemp(char *path);
/* port/pqsignal.c */
typedef void (*pqsigfunc) (int signo);
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment