Original issue was described here http://curl.haxx.se/mail/lib-2010-09/0010.html
Solution for this issue:
S_IFMT and S_IFREG macro should be defined first for S_ISREG macro. So S_ISREG should be moved below setup_once.h inclusion.
I've submitted pull request (https://github.com/bagder/curl/pull/41) on github with fix.
Thanks for the report, this problem is now fixed in the git repository.
To try it out, you either checkout/update your git clone: http://curl.haxx.se/source.html
or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/