[resend] Allow use of MAP_TRYFIXED for better mmap()

Todd Vierling tv at pobox.com
Thu Aug 28 12:58:39 CDT 2003

On Thu, 28 Aug 2003, Alexandre Julliard wrote:

: Anyway it doesn't really matter for that specific issue, if you don't
: feel the performance gain is worth the trouble that's your call.

It's not.  NetBSD's userbase [capable of running Wine] is moving rapidly
enough, and enough are compiling Wine from source, that this is all a
non-issue and the simple few-line diff I supplied is the easiest.

: I was just raising a general point that checking run-time features with
: #ifdef is not a good idea, no matter how much autoconf encourages that
: style.

But it is, depending on what you need to do.  Duplicating #defines, struct
declarations, etc. from newer OS versions is prone to error -- not to
mention heavily OS dependent! -- and does not let the OS provide its proper
degree of source compatibility that is common to all Unix flavors, including
Linux.  That's why autoconf has tests, and why people have used #ifdef for
decades.  (Autoconf is big and bloated, to be sure, but there's a reason it
is so damned popular.)

I definitely don't want to reproduce apt-to-change parts of the OS in an
application just because it *might* be built on an earlier version of that
OS.  If an app is built on the earlier OS version, the user should expect to
be missing features.  Unix users accept this as a fact of life.

This is not to say that there is no case where forward-looking checks are
useful.  The Linux VFAT ioctls are a marginally good example where such a
check can be done with low impact, but these cases should be evaluated
carefully and kept in the "rare" category as much as possible.

-- Todd Vierling <tv at pobox.com>

More information about the wine-devel mailing list