apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Regarding apr_file_writev() and locking...
Date Sat, 12 May 2007 12:41:26 GMT
On Sat, 2007-05-12 at 09:32 -0300, Davi Arnaut wrote:

> No, but this:
> 
> +#define file_lock(f)   { .. }
> +#define file_unlock(f) { .. }
> 
> should be:
> 
> #define file_lock(f) do { .. } while (0)
> #define file_unlock(f) do { .. } while (0)
> 
> or else it will break for expressions like:
> 
> 	if (file->buffered || whatever)
> 		file_lock(f); /* semi-colon after the block */
> 	else
> 		whatever++;

OOPS! Sorry, will fix now.

-- 
Bojan


Mime
View raw message