Re: [fpc-devel] Issue with Critical sections

2007-04-05 Thread Vinzent Hoefler
On Wednesday 04 April 2007 15:29, Sergei Gorelkin wrote: That is exactly what I'm speaking about. Removing 'Windows' from uses clause is essentially stopping using it :) And if the code continues to compile and work after that, it is just fine. Sorry, I always forget that most people are not

Re: [fpc-devel] Issue with Critical sections

2007-04-05 Thread Ivo Steinmann
Sergei Gorelkin schrieb: Hello, I was porting to Linux some Windows code which uses critical sections API, and got 'Identifier not found' error on InitializeCriticalSection and DeleteCriticalSection symbols. After searching through RTL code, I discovered that abovementioned functions are named

Re: [fpc-devel] Issue with Critical sections

2007-04-05 Thread Vinzent Hoefler
On Thursday 05 April 2007 09:16, Sergei Gorelkin wrote: It appears that my way of thinking has been severely affected by using IDEs. When putting mouse over identifier shows where it comes from, prefixing seems redundant :) Prefixing *is* redundant, that's the whole point of it, but it also

Re: [fpc-devel] Issue with Critical sections

2007-04-05 Thread Sergei Gorelkin
Thursday, April 05, 2007, 11:45:34 AM, Vinzent wrote: VH Sorry, I always forget that most people are not like me and just use VH subroutine names without caring where they come from, while I'm used to VH always prefix the unit names to the subroutines and thus simply VH removing Windows from

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Vinzent Hoefler
On Wednesday 04 April 2007 10:33, Sergei Gorelkin wrote: I was porting to Linux some Windows code which uses critical sections API, and got 'Identifier not found' error on InitializeCriticalSection and DeleteCriticalSection symbols. If I had to guess, I'd say this is probably because those

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Micha Nelissen
Sergei Gorelkin wrote: But EnterCriticalSection/LeaveCriticalSection also exist in Windows API. And they are implemented in System unit without changing names. Therefore, to They shouldn't be exposed publicly in the system unit. Micha ___ fpc-devel

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Vinzent Hoefler
On Wednesday 04 April 2007 12:59, Sergei Gorelkin wrote: But EnterCriticalSection/LeaveCriticalSection also exist in Windows API. And they are implemented in System unit without changing names. Therefore, to make my code cross-platform, I have only to remove Windows from uses clause - then

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Vinzent Hoefler
On Wednesday 04 April 2007 13:13, Micha Nelissen wrote: Sergei Gorelkin wrote: But EnterCriticalSection/LeaveCriticalSection also exist in Windows API. And they are implemented in System unit without changing names. Therefore, to They shouldn't be exposed publicly in the system unit.

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Sergei Gorelkin
Wednesday, April 04, 2007, 5:13:43 PM, Vinzent wrote: VH On Wednesday 04 April 2007 12:59, Sergei Gorelkin wrote: But EnterCriticalSection/LeaveCriticalSection also exist in Windows API. And they are implemented in System unit without changing names. Therefore, to make my code cross-platform,

Re: [fpc-devel] Issue with Critical sections

2007-04-04 Thread Luca Olivetti
En/na Sergei Gorelkin ha escrit: The code I was compiling was already cross-platform (Delphi/Kylix), and 'uses Windows' was wrapped by {$IFDEF MSWINDOWS}. In Kylix, InitializeCriticalSection and DeleteCriticalSection are implemented in SysUtils unit, so any code using these functions continue