The Chicken command line option -emit-exports FILENAME will not override
explicit emit statements in the code. I don't know whether that's
desired behavior or not.
The problem is that both posixunix.scm and posixwin.scm now emit
posix.exports. So they collide. In theory, both posix.exports declare
the same functions. In practice, I expect people to make errors about
ensuring all Windows functions are available. So we need to ensure
consistency somehow.
In CMake, I've made posixwin.scm in charge of the posix.exports
dependency. That way, if exports go out of sync, we're more likely to
notice. It has a small negative side effect: posixwin.c gets recompiled
every time posixunix.c does. That's because posixunix.c emits
posix.exports, the posixwin.c rule notices, and then fires again.
A command line option to suppress exports, or to send them to a
different filename than what the emit statements say, would clear up the
file collision.