|
From: | Charles Kerr |
Subject: | Re: [Pan-devel] mkstemp impl for windows |
Date: | Fri, 05 May 2006 12:14:14 -0500 |
User-agent: | Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420) |
K. Haley wrote:
Here is an implementation of mkstemp for those of us stuck on windows. Just add this to uunconc.c.#ifdef G_OS_WIN32 #include <fcntl.h> #define _S_IREAD 256 #define _S_IWRITE 128 int mkstemp(char *tmpl) { int ret=-1; mktemp(tmpl);ret=open(tmpl,O_RDWR|O_BINARY|O_CREAT|O_EXCL|_O_SHORT_LIVED, _S_IREAD|_S_IWRITE);return ret; }
Not a bad idea. I was thinking of using g_mkstemp()...
[Prev in Thread] | Current Thread | [Next in Thread] |