#ifdef _AIX
#pragma alloca
#else /* not _AIX */
+#ifdef _WIN32
+#include <malloc.h>
+#include <io.h>
+#else
char *alloca ();
+#endif /* not _WIN32 */
#endif /* not _AIX */
#endif /* not HAVE_ALLOCA_H */
#endif /* not __GNUC__ */
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
+#if defined (_WIN32) && defined (_O_BINARY)
+# define WINDOWS_SETFILEMODE_BINARY(IN_STREAM, FILENAME) \
+ do \
+ { /* Turn off DOS text file modes, "rb" doesn't work on stdin. */\
+ if (_setmode (_fileno ((IN_STREAM)), _O_BINARY) == -1) \
+ { \
+ error (0, errno, "%s", (FILENAME)); \
+ err = 1; \
+ continue; \
+ } \
+ } \
+ while (0)
+#else
+# define WINDOWS_SETFILEMODE_BINARY(IN_STREAM, FILENAME) /* empty */
+#endif
+
/* The default number of input bytes per output line. */
#define DEFAULT_BYTES_PER_BLOCK 16
continue;
}
}
+ WINDOWS_SETFILEMODE_BINARY (in_stream, input_filename);
if (n_skip == 0)
break;
err = 1;
}
}
+ WINDOWS_SETFILEMODE_BINARY (in_stream, input_filename);
}
while (in_stream == NULL);
}
err = 1;
}
}
+ WINDOWS_SETFILEMODE_BINARY (in_stream, input_filename);
}
while (in_stream == NULL);
}