http://bugs.winehq.org/show_bug.cgi?id=9353
--- Comment #17 from Dmitry Timoshkov dmitry@codeweavers.com 2008-12-02 22:57:42 --- Probably
(flags & (~O_TRUNC & ~O_CREAT))
should be replaced by
(flags & (~(O_TRUNC | O_CREAT)))
to make the intent more clear.