Move dirent.h include to after sys/types.h

Linas Vepstas
Wed, 30 Jan 2002 10:05:13 -0600

On Wed, Jan 30, 2002 at 12:52:10PM +0900, Peter O'Gorman was heard to remark:
> Hi, I'm looking at getting HEAD to build on Mac OS X.
> I thought that I'd start out small..
> This patch moves #include <dirent.h> in a couple of files so 
> that it gets included after sys/types.h.

Looks like Dave applied the patch.

> I don't think that it'll break anything else.

Feel free to encourage Apple to fix thier borken headers.  It should be
possible to include headers in any order at all, including alphabetical.

In the good old bad days, there were rare situations where there was no
ordering that would work.  I thought those days were behind us; I'm
sorry to hear that they are not  :-(

(I'm surprised, I thought osx was *bsd based. I thought gnucash ran on
free/netbsd unmodified, so I don't understand why osx got broken).

> I assume that this is the right place to send these.



p.s. please annotate such 'unusual' fixes with a note like /* mac os x
needs types before dirent */.  Otherwise, the next person to alphabetize
the #includes will break your fix.

pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933