File locking

Paolo Carlini
Tue Jan 22 00:28:00 GMT 2002

Chris Blake wrote:

>How does one do Posix file locking with gcc3 / libstdc++-v3?
>I posted this question to gcc-help last week, but it seems that
>nobody knows the answer. I realise the C++ standard may not concern
>itself with such OS-specific things as file locking, but I'd appreciate
>any suggestions, even if the only solution is to reinstall g++ 2.95.
I found useful, as a starting point, the following class:

Notice, however, that, due to a more strict implementation of the ISO 
IOstreams, *as is* the class does not work well with the current 
libstdc++-v3 library.

Please contact me privately if you want to test an updated version I' 
currently experimenting with.


More information about the Libstdc++ mailing list