Browse files

fix reference to STDOUT_FILENO on MSVC

The Microsoft Visual C++ compiler doesn't have unistd.h and thus
STDOUT_FILENO is undefined. Define it using stdio.h functions.
  • Loading branch information...
1 parent a6b14bf commit b8428a2a25e6b0aff8ca33dd3d34c5c38fdb8749 @rctay rctay committed with veillard Jan 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 testC14N.c
View
4 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

0 comments on commit b8428a2

Please sign in to comment.