diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:47 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:47 +0000 |
commit | 1be3101aeab9b6136c32a91c23799724a7fe7797 (patch) | |
tree | 10e45a24782e633b9f6e1f8b427fac91ee2ddfa8 /AuLock.c | |
parent | dcc3fc52f917603df94ef4207f1dec9238dce23b (diff) |
XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1
Diffstat (limited to 'AuLock.c')
-rw-r--r-- | AuLock.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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 <X11/Xauth.h> #include <X11/Xos.h> #include <sys/stat.h> #include <errno.h> -#ifdef X_NOT_STDC_ENV -extern int errno; -#define Time_t long -extern Time_t time (); -#else #include <time.h> #define Time_t time_t -#endif #ifndef X_NOT_POSIX #include <unistd.h> #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; |