Fixes on Debian Linux for the 'file locking'. Tested ok
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1344 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
4c3a0b6f68
commit
35121c58a8
1
init.c
1
init.c
@ -2681,3 +2681,4 @@ void Compute_menu_offsets(void)
|
||||
// Update global menu coordinates
|
||||
Menu_Y = Screen_height - Menu_height * Menu_factor_Y;
|
||||
}
|
||||
|
||||
|
||||
1
init.h
1
init.h
@ -49,3 +49,4 @@ byte * Load_font(const char * font_name);
|
||||
/// Based on which toolbars are visible, updates their offsets and
|
||||
/// computes ::Menu_height and ::Menu_Y
|
||||
void Compute_menu_offsets(void);
|
||||
|
||||
|
||||
13
io.c
13
io.c
@ -27,6 +27,9 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
#include <proto/dos.h>
|
||||
#include <dirent.h>
|
||||
@ -315,7 +318,7 @@ byte Create_lock_file(const char *file_directory)
|
||||
}
|
||||
#else
|
||||
// Unixy method for lock file
|
||||
Lock_file_handle = open(lock_filename,O_WRONLY|O_CREAT);
|
||||
Lock_file_handle = open(lock_filename,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
|
||||
if (Lock_file_handle == -1)
|
||||
{
|
||||
// Usually write-protected media
|
||||
@ -342,10 +345,10 @@ void Release_lock_file(const char *file_directory)
|
||||
}
|
||||
#else
|
||||
if (Lock_file_handle != -1)
|
||||
{
|
||||
close(Lock_file_handle);
|
||||
Lock_file_handle = -1;
|
||||
}
|
||||
//{
|
||||
// close(Lock_file_handle);
|
||||
// Lock_file_handle = -1;
|
||||
//}
|
||||
#endif
|
||||
|
||||
// Actual deletion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user