From 1be3101aeab9b6136c32a91c23799724a7fe7797 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:48:47 +0000 Subject: XFree86 4.3.0.1 --- AuLock.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'AuLock.c') diff --git a/AuLock.c b/AuLock.c index 6c9aa8d..8e5a2cc 100644 --- a/AuLock.c +++ b/AuLock.c @@ -25,19 +25,14 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xau/AuLock.c,v 3.6 2002/05/31 18:45:43 dawes Exp $ */ #include #include #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif #ifndef X_NOT_POSIX #include #else @@ -47,6 +42,9 @@ extern unsigned sleep (); #define link rename #endif #endif +#ifdef __UNIXOS2__ +#define link rename +#endif #if NeedFunctionPrototypes int @@ -89,7 +87,7 @@ long dead; while (retries > 0) { if (creat_fd == -1) { - creat_fd = creat (creat_name, 0666); + creat_fd = open (creat_name, O_WRONLY | O_CREAT | O_EXCL, 0600); if (creat_fd == -1) { if (errno != EACCES) return LOCK_ERROR; -- cgit v1.2.3