]> git.pld-linux.org Git - packages/dx.git/blame - dx-open.patch
- build at most in C++14 mode; release 25
[packages/dx.git] / dx-open.patch
CommitLineData
ced11c9b
JR
1--- dx-4.4.4/src/exec/libdx/fileio.c.open 2006-01-05 23:55:47.000000000 +0100
2+++ dx-4.4.4/src/exec/libdx/fileio.c 2007-08-17 18:43:14.000000000 +0200
3@@ -263,7 +263,7 @@ Error _dxffile_open(char *name, int rw)
4 case 2:/* read/write */
5 fd = open(name, O_RDWR);
6 if (fd < 0) {
7- fd = open(name, O_WRONLY | O_CREAT);
8+ fd = open(name, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
9 if (fd < 0) {
10 DXSetError(ERROR_DATA_INVALID,
11 "can't open/create file '%s'", name);
12--- dx-4.4.4/src/exec/libdx/plock.c.open 2002-07-17 06:48:18.000000000 +0200
13+++ dx-4.4.4/src/exec/libdx/plock.c 2007-08-17 19:05:14.000000000 +0200
14@@ -37,7 +37,8 @@ struct seminfo *__buf; /* buffer fo
15
16 #define SEM_FLAGS (IPC_CREAT | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
17 #define SHM_FLAGS (IPC_CREAT | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
18-#define OPEN_FLAGS (O_CREAT | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
19+#define OPEN_FLAGS (O_CREAT)
20+#define OPEN_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
21 #define IS_MINE(a) (locks->_owner[a] == getpid())
22 #define SET_OWNER(a) (locks->_owner[a] = getpid())
23 #define CLEAR_OWNER(a) (locks->_owner[a] = 0)
24@@ -268,7 +269,7 @@ PLockInit()
25
26 if (stat(LOCKFILE, &statbuf))
27 {
28- int fd = open(LOCKFILE, OPEN_FLAGS);
29+ int fd = open(LOCKFILE, OPEN_FLAGS, OPEN_MODE);
30 if (fd < 0)
31 {
32 fprintf(stderr, "initLocks: error accessing locks shared block: open\n");
This page took 0.195862 seconds and 4 git commands to generate.