A reasonable detection in configure stage is definitively to prefer.

Not necessarily. It would work, obviously, but would bloat the build.
Compile-time generated headers are kinda painful to manage, and I'd like
to keep their number in check. Also, using configure detection would make nonposix.h depend on sysdeps.h, and that's a dependency I'd rather avoid.


If stack allocation is a must, maybe it can be evaluated whether
alloca can be an alternative.

It cannot. alloca is not POSIX, not portable, and not safe.
And one of the main advantages of stack allocation is that it keeps the
code *simple*, compact, and easy to read, as opposed to having malloc()
calls everywhere; using alloca(), which is also a function call,
forfeits that advantage.

I'll do heap allocation where necessary and where I'm certain that
stralloc has already been pulled. For the other places, Hurd+skalibs users
will simply have to avoid ricing their paths.

--
Laurent

Reply via email to