apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: cvs commit: apr/file_io/unix mktemp.c
Date Fri, 23 Feb 2001 10:36:30 GMT
On 23 Feb 2001 trawick@apache.org wrote:

> trawick     01/02/23 10:35:43
>
>   Modified:    file_io/unix mktemp.c
>   Log:
>   fix for ReliantUNIX and other platforms with no mkstemp() routine:
>
>   Don't rename mkstemp(); locks/unix/crossproc.c assumes that mkstemp() is the
>   name of the function.

I believe this goes the wrong way.  Go ahead and rename mkstemp.  Change
the locking code to use the corrent apr_mkstemp, instead of the system
one.

We should not be exporting symbols from apr that are not namespace
protected, even if those functions are supposed to be provided by the
system.

Ryan

>
>   Don't provide mkstemps(), mkdtemp(), or mktemp().
>
>   Submitted by:	jean-frederic clere <jfrederic.clere@fujitsu-siemens.com>
>   Mangled by:	Jeff Trawick
>
>   Revision  Changes    Path
>   1.3       +4 -4      apr/file_io/unix/mktemp.c
>
>   Index: mktemp.c
>   ===================================================================
>   RCS file: /home/cvs/apr/file_io/unix/mktemp.c,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- mktemp.c	2001/02/21 18:51:14	1.2
>   +++ mktemp.c	2001/02/23 18:35:42	1.3
>   @@ -48,10 +48,6 @@
>    #define seedrandom(a) srandom(a)
>    #endif
>    #define _open(a,b,c) open(a,b,c)
>   -#define mkdtemp ap_mkdtemp
>   -#define mkstemp ap_mkstemp
>   -#define mkstemps ap_mkstemps
>   -#define mktemp ap_mktemp
>
>    #if defined(LIBC_SCCS) && !defined(lint)
>    #if 0
>   @@ -84,6 +80,7 @@
>    "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
>    static uint32_t randseed=0;
>
>   +#ifdef APR_STARTS_USING_IT
>    int
>    mkstemps(path, slen)
>    	char *path;
>   @@ -93,6 +90,7 @@
>
>    	return (_gettemp(path, &fd, 0, slen) ? fd : -1);
>    }
>   +#endif /* APR_STARTS_USING_IT */
>
>    int
>    mkstemp(path)
>   @@ -103,6 +101,7 @@
>    	return (_gettemp(path, &fd, 0, 0) ? fd : -1);
>    }
>
>   +#ifdef APR_STARTS_USING_IT
>    char *
>    mkdtemp(path)
>    	char *path;
>   @@ -126,6 +125,7 @@
>    {
>    	return(_mktemp(path));
>    }
>   +#endif /* APR_STARTS_USING_IT */
>
>    static int
>    _gettemp(path, doopen, domkdir, slen)
>
>
>
>
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message