bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use O_BINARY to detect whether to pass "rb" to popen


From: Andreas Schwab
Subject: Re: [PATCH] Use O_BINARY to detect whether to pass "rb" to popen
Date: Fri, 22 May 2015 11:15:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Bruce Korb <address@hidden> writes:

> @@ -1402,12 +1402,12 @@ open_encoded_file (char const * local_name,
>        sprintf (p, uu_cmd_fmt, restore_name);
>      }
>  
> -  /* Don't use freadonly_mode because it might be "rb", while we need
> +  /* Don't use "r" FOPEN_BINARY mode because it might be "rb", while we need
>       text-mode read here, because we will be reading pure text from
>       uuencode, and we want to drop any CR characters from the CRLF
>       line endings, when we write the result into the shar.  */
>    {
> -    FILE * in_fp = popen (cmdline, "r");
> +    FILE * in_fp = popen (cmdline, "r" TEXT_MODE);

Didn't you mean FOPEN_TEXT?

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]