Re: [Harbour] /NODEFAULTLIB:LIBCMT

2008-02-25 Thread Jacek Potempa

Przemek,

>For sure your application may execute. But you do not know if such 
application is safe. If you want to be
>sure you have to check which functions in MSVC ST LIBC are not MT safe 
and then send this list to OTC
>and ask which ones are used internally by mediator code. If none then 
it's not a problem and mediator can be
>linked with both ST and MT LIBC, if any then you can expect some 
random crashes. Maybe very seldom
>but they can appear. Or in worser cases no crash at all but internal 
data corruption or even data send to RDBMS.


>Jacek, if you read this thread can you say if MEDIATOR needs MT safe 
LIBC or not?


Sorry for delay.

For Mediator client we do not need libcmt.lib. While we create second 
thread, it is created via WIN32 API (not libcmt.lib function). We also 
do all the required synchronization, so there is no risk of  
concurrently calling a single-threaded variant of function from libc.lib.


Regards,
Jacek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] /NODEFAULTLIB:LIBCMT

2008-02-25 Thread Przemyslaw Czerpak
On Mon, 25 Feb 2008, Jacek Potempa wrote:
> Sorry for delay.

NP.

> For Mediator client we do not need libcmt.lib. While we create second 
> thread, it is created via WIN32 API (not libcmt.lib function). We also 
> do all the required synchronization, so there is no risk of  
> concurrently calling a single-threaded variant of function from libc.lib.

Thank you for information. I also guess that you do not use any memory
allocation by hb_xgrab()/hb_xfree() in your threads. Please remember that
some Harbour functions call internally libc functions what also can be
source of problems so your code should use clean WIN32 API only without
any libc functions or Harbour ones which may executes libc code.

best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour