Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Cygwin read mode in 4,2 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gnulib
Submodule gnulib updated from 13a006 to 6418d7
2 changes: 1 addition & 1 deletion sed/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ compile_file(cur_program, cmdfile)

prog.file = stdin;
if (cmdfile[0] != '-' || cmdfile[1] != '\0')
prog.file = ck_fopen(cmdfile, "rt", true);
prog.file = ck_fopen(cmdfile, read_mode, true);

cur_input.line = 1;
cur_input.name = cmdfile;
Expand Down
4 changes: 4 additions & 0 deletions sed/sed.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ bool follow_symlinks = false;
char *in_place_extension = NULL;

/* The mode to use to read files, either "rt" or "rb". */
#ifndef __CYGWIN__
char *read_mode = "rt";
#else
char *read_mode = "r";
#endif

/* Do we need to be pedantically POSIX compliant? */
enum posixicity_types posixicity;
Expand Down