Subject: Re: Interix support (missing function utimes())
To: Jesse Off <>
From: Todd Vierling <>
List: tech-toolchain
Date: 01/18/2005 17:56:59
On Tue, 18 Jan 2005, Jesse Off wrote:

> I've been trying to cross build NetBSD-current using Interix (Windows Services
> for UNIX).  Its important to some of our embedded customers to be able to work
> in Windows since there is a lot of good EDA software that only runs on Windows
> (IDE's for FPGA programming, PCB/schematic capture, etc.) I've run into a few
> problems so far:
> * cc did not work for bootstrapping nbmake.. had to use HOST_CC="gcc"

This can be documented.  It's pretty well known that Interix "cc" (which is
a wrapper around Visual C++) is just plain borken.  And, adding to that:

> * many missing declarations unless #define _ALL_SOURCE, had to add both
> seemed to be used only on the nbmake build

HOST_CC="gcc -D_ALL_SOURCE" should fix that globally.

> * missing zlib..  installed pkg from Interopsystems, but installed it in
> /usr/local/[include,lib] so just cp'ed to /usr/include


will fix that without copying.

> * missing sys/mtio.h header for tools/compat..  removed from configure and all
> was fine.

Well, pax won't work without it currently.  The mtio.h fixes in pkgsrc's
copy of pax could be brought back to src/bin/pax.

> * linking tools/binstall failure.   There is no utimes or futimes on interix.
> (Its been officially deprecated by Microsoft for utime())

Of course, utime() is less functional, but yep, I know that one.
tools/compat is replicated in pkgsrc as "libnbcompat", and there's a
utimes() replacement there; this could probably be brought back to
src/tools/compat easily.

This would be worth putting into a PR; failing that, I'll look into
documentation and fixes above when I can get a chance.

-- Todd Vierling <> <>