Georg Baum schreef op 25-11-2013 21:09:
Stephan Witt wrote:
Am 25.11.2013 um 13:01 schrieb Vincent van Ravesteijn <v...@lyx.org>:
The problem is that the commit is touching very essential code. If
something goes wrong LyX becomes pretty much unusable (e.g. if configure
isn't run anymore). We can never be sure that there is no platform out
there which causes this code to fail. I'm also not sure whether the code
is fixing a bug, or facilitating some tests ?
IMO, the fact that the code is between #ifdef's doesn't make it portable.
IMHO, you are changing the rules. There is plenty of non-portable code in
LyX if this would be the rule.
I don't agree either. ifdefs are fine in many cases, e.g. if you need to
work around a bug that only exists on one specific platform, or if you are
dealing with a feature that exists only on one platform (e.g. the linkback
stuff).
I never said that #ifdefs should be forbidden, but they shouldn't be
used to just make it compile on the other platforms and leave a bug behind.
However, in this particular case, the code has a problem:
support::fileLock() and support::fileUnlock() behave _very_ differently
depending on the platform, although the underlying concept (locking files)
works fine on any platform supported by LyX. I don't care if it is called
nonportable or something else, but it is a problem, since on windows the
functions do not do what their names suggest.
This is what I meant indeed.
Vincent