{
/* Since CRLF is converted to LF within `decode_coding', we
can always open a file with binary mode. */
- callproc_fd[CALLPROC_PIPEREAD] = emacs_open (tempfile,
- O_RDONLY | O_BINARY, 0);
+ callproc_fd[CALLPROC_PIPEREAD] = emacs_open (tempfile, O_RDONLY, 0);
if (callproc_fd[CALLPROC_PIPEREAD] < 0)
{
int open_errno = errno;
encoded_filename = ENCODE_FILE (filename);
fn = SSDATA (encoded_filename);
- open_flags = O_WRONLY | O_BINARY | O_CREAT;
+ open_flags = O_WRONLY | O_CREAT;
open_flags |= EQ (mustbenew, Qexcl) ? O_EXCL : !NILP (append) ? 0 : O_TRUNC;
if (NUMBERP (append))
offset = file_offset (append);
if (timespec_valid_p (modtime)
&& ! (valid_timestamp_file_system && st.st_dev == timestamp_file_system))
{
- int desc1 = emacs_open (fn, O_WRONLY | O_BINARY, 0);
+ int desc1 = emacs_open (fn, O_WRONLY, 0);
if (desc1 >= 0)
{
struct stat st1;
while ((nbytes = readlinkat (AT_FDCWD, lfname, lfinfo, MAX_LFINFO + 1)) < 0
&& errno == EINVAL)
{
- int fd = emacs_open (lfname, O_RDONLY | O_BINARY | O_NOFOLLOW, 0);
+ int fd = emacs_open (lfname, O_RDONLY | O_NOFOLLOW, 0);
if (0 <= fd)
{
/* Use read, not emacs_read, since FD isn't unwind-protected. */
happens, e.g., under Auto Image File Mode.) 'openp'
didn't open the file, so we should, because the caller
expects that. */
- fd = emacs_open (SSDATA (file_found), O_RDONLY | O_BINARY, 0);
+ fd = emacs_open (SSDATA (file_found), O_RDONLY, 0);
}
}
else /* fd < 0, but not -2 */
}
else
{
- int oflags = O_RDONLY + (NILP (predicate) ? 0 : O_BINARY);
- fd = emacs_open (pfn, oflags, 0);
+ fd = emacs_open (pfn, O_RDONLY, 0);
if (fd < 0)
{
if (errno != ENOENT)
{
bool success = false;
#ifndef WINDOWSNT
- int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0);
+ int fd = emacs_open ("/dev/urandom", O_RDONLY, 0);
if (0 <= fd)
{
success = emacs_read (fd, &v, sizeof v) == sizeof v;
switch (*m++)
{
case '+': omode = O_RDWR; break;
- case 'b': bflag = O_BINARY; break;
case 't': bflag = O_TEXT; break;
default: /* Ignore. */ break;
}
infile = add_exe_suffix_if_necessary (infile, infile_buffer);
outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);
- fd_in = emacs_open (infile, O_RDONLY | O_BINARY, 0);
+ fd_in = emacs_open (infile, O_RDONLY, 0);
assert (fd_in >= 0);
- fd_out = emacs_open (outfile, O_RDWR | O_TRUNC | O_CREAT | O_BINARY, 0755);
+ fd_out = emacs_open (outfile, O_RDWR | O_TRUNC | O_CREAT, 0755);
assert (fd_out >= 0);
for (;;)
{