On Mon, Jan 02, 2012 at 03:49:31PM +0800, Tay Ray Chuan wrote: > The Microsoft Visual C++ compiler doesn't have unistd.h and thus > STDOUT_FILENO is undefined. Define it using stdio.h functions. > --- > testC14N.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/testC14N.c b/testC14N.c > index dc1a9a6..f735a29 100644 > --- a/testC14N.c > +++ b/testC14N.c > @@ -13,7 +13,9 @@ > #include <string.h> > #ifdef HAVE_UNISTD_H > #include <unistd.h> > -#endif > +#else > +#define STDOUT_FILENO fileno(stdout) > +#endif /* HAVE_UNISTD_H */ > #ifdef HAVE_STDLIB_H > #include <stdlib.h> > #endif
Sounds safe, applied thanks :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml