From ca03e80ee659262b1b830911e9bbbc64ef936acf Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 21 Feb 2001 15:51:43 +0000 Subject: Add mktemp() and mkstemp() emulation for systems which don't have it. Jean-Frederic writes: I have tested Apache2.0 with a ReliantUNIX machine. This machine has a SVR4 Unix implementation. To compile correctly the -DXTI_SUPPORT should be added to CFLAGS (I have done it when calling configure), and I have added a mkstemp() because it is not in the default runtime library. I have reused and enhanced an mkstemp() routine from FreeBSD. Find enclosed the needed patch to test for mkstemp() and to use ap_mkstemp() when needed. Submitted by: Jean-Frederic Clere git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61274 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr_general.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/apr_general.h') diff --git a/include/apr_general.h b/include/apr_general.h index 33d0a8060..52ea78844 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -143,6 +143,12 @@ int strncasecmp(const char *a, const char *b, size_t n); #define memmove(a,b,c) bcopy(b,a,c) #endif +#if (!HAVE_MKSTEMP) +#define mkstemp(a) ap_mkstemp(a) +#define mkstemps(a,b) ap_mkstemp(a,b) +#define mkdtemp(a) ap_mkdtemp(a) +#endif + /** * @package APR Random Functions */ -- cgit v1.2.1