Re: [fpc-devel] How to use fpFlock?

2008-05-05 Thread amir
So what wrong is with the following code? When running two instance of this program, *both* print "After Flock" and wait for an input? uses Unix; var InputFile: TextFile; begin AssignFile (InputFile, 'Lock.txt'); WriteLn ('Before Flock'); Flush (Output); Fpflock (InputFile, LOCK_SH); Wr

Re: [fpc-devel] How to use fpFlock?

2008-05-05 Thread ik
flock in Linux (at least) is blocking by default unless passed with specific parameter. You can try also to create a mutex that only when removed you will access the procedure/function that try to write to the file, and the process that created the mutex is the only one that can write to that file

[fpc-devel] How to use fpFlock?

2008-05-05 Thread amir
Hi, I have many process wanting to write in a file. Each process is going to open the file as a writeonly (using Assignfile and rewrite or fpOpen with o_WrOnly). But there is a risk that two processes simultaneously trying to write a message in the file. I want to use fpflock to avoid this. I

Re: [fpc-devel] VarArray 64bit clean patch

2008-05-05 Thread petr . kristan
On Mon, Apr 28, 2008 at 10:19:37AM +0200, [EMAIL PROTECTED] wrote: > On Sat, Apr 26, 2008 at 07:28:46PM +0200, Florian Klaempfl wrote: > > [EMAIL PROTECTED] schrieb: > > >Hi. > > > > > >Today I worked on VarArrays. Here is 64-bit friendly VariantArray > > patch. > > >Testing program is attached too

Re: [fpc-devel] SDL on Mac OS X 10.5 and fpc 2.3.1

2008-05-05 Thread Jonas Maebe
On 05 May 2008, at 09:50, Schindler Karl-Michael wrote: SDL is used in the program Ultrastar. on macosx 10.5 and fpc 2.3.1 sdl_init leads to a large number of warnings. This is the line with sdl_init: SDL_Init(SDL_INIT_VIDEO or SDL_INIT_TIMER); This is the related part of the output:

Re: [fpc-devel] SDL on Mac OS X 10.5 and fpc 2.3.1

2008-05-05 Thread Adriaan van Os
Schindler Karl-Michael wrote: SDL is used in the program Ultrastar. on macosx 10.5 and fpc 2.3.1 sdl_init leads to a large number of warnings. This is the line with sdl_init: SDL_Init(SDL_INIT_VIDEO or SDL_INIT_TIMER); This is the related part of the output: 2008-05-05 01:17:26.689 Ultr

[fpc-devel] SDL on Mac OS X 10.5 and fpc 2.3.1

2008-05-05 Thread Schindler Karl-Michael
Hi all, SDL is used in the program Ultrastar. on macosx 10.5 and fpc 2.3.1 sdl_init leads to a large number of warnings. This is the line with sdl_init: SDL_Init(SDL_INIT_VIDEO or SDL_INIT_TIMER); This is the related part of the output: 2008-05-05 01:17:26.689 UltraStar[22982:807] ***