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
|
// Update global menu coordinates
|
||||||
Menu_Y = Screen_height - Menu_height * Menu_factor_Y;
|
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
|
/// Based on which toolbars are visible, updates their offsets and
|
||||||
/// computes ::Menu_height and ::Menu_Y
|
/// computes ::Menu_height and ::Menu_Y
|
||||||
void Compute_menu_offsets(void);
|
void Compute_menu_offsets(void);
|
||||||
|
|
||||||
|
|||||||
13
io.c
13
io.c
@ -27,6 +27,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
#if defined(__amigaos4__)
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
@ -315,7 +318,7 @@ byte Create_lock_file(const char *file_directory)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Unixy method for lock file
|
// 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)
|
if (Lock_file_handle == -1)
|
||||||
{
|
{
|
||||||
// Usually write-protected media
|
// Usually write-protected media
|
||||||
@ -342,10 +345,10 @@ void Release_lock_file(const char *file_directory)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (Lock_file_handle != -1)
|
if (Lock_file_handle != -1)
|
||||||
{
|
//{
|
||||||
close(Lock_file_handle);
|
// close(Lock_file_handle);
|
||||||
Lock_file_handle = -1;
|
// Lock_file_handle = -1;
|
||||||
}
|
//}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Actual deletion
|
// Actual deletion
|
||||||
|
|||||||
1
io.h
1
io.h
@ -103,3 +103,4 @@ byte Create_lock_file(const char *file_directory);
|
|||||||
///
|
///
|
||||||
/// Release a lock file created by ::Create_Lock_file
|
/// Release a lock file created by ::Create_Lock_file
|
||||||
void Release_lock_file(const char *file_directory);
|
void Release_lock_file(const char *file_directory);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user