diff options
author | Noah Misch <noah@leadboat.com> | 2014-06-14 09:41:13 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2014-06-14 09:41:17 -0400 |
commit | 841baf28f8e86b67c0b036fb921446a310e5c60b (patch) | |
tree | 680f7d37a0c7713d61211ca2915a77be4d9f6412 /src/include | |
parent | a11577f47e5ed1d6271188ec5830fecf1036ce4d (diff) | |
download | postgresql-841baf28f8e86b67c0b036fb921446a310e5c60b.tar.gz postgresql-841baf28f8e86b67c0b036fb921446a310e5c60b.zip |
Add mkdtemp() to libpgport.
This function is pervasive on free software operating systems; import
NetBSD's implementation. Back-patch to 8.4, like the commit that will
harness it.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/pg_config.h.win32 | 3 | ||||
-rw-r--r-- | src/include/port.h | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 8aabf3c87a4..ce48dfb691c 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -345,6 +345,9 @@ /* Define to 1 if the system has the type `MINIDUMP_TYPE'. */ #undef HAVE_MINIDUMP_TYPE +/* Define to 1 if you have the `mkdtemp' function. */ +#undef HAVE_MKDTEMP + /* Define to 1 if you have the <netinet/in.h> header file. */ #undef HAVE_NETINET_IN_H diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index f5064d19d3c..3413cb29a42 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -261,6 +261,9 @@ /* Define to 1 if the system has the type `MINIDUMP_TYPE'. */ #define HAVE_MINIDUMP_TYPE 1 +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + /* Define to 1 if you have the <netinet/in.h> header file. */ #define HAVE_NETINET_IN_H 1 diff --git a/src/include/port.h b/src/include/port.h index 0ffcfcb81d9..c117a38f110 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -476,6 +476,9 @@ 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); |