Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Jul 16, 2024
1 parent fd7af8b commit 686cd91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions foo.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include <stdio.h>
#ifdef _WIN32
#include <fcntl.h>
#include <io.h>
#endif
main() {
int main() {
FILE *fp = stdout;
#ifdef _WIN32
if ( _setmode(fileno(stdout), O_BINARY) == -1 ) {
perror("_setmode to binary failed");
exit(1);
return(1);
}
#endif
fprintf(fp, "foo\nbar\n");
Expand All @@ -24,4 +25,5 @@ main() {
fprintf(fp, "foo\nbar\n");
fprintf(fp, "foo\012bar\012");
} else perror("binary");
return 0;
}

0 comments on commit 686cd91

Please sign in to comment.