bug-gnulib
[Top][All Lists]
Advanced

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

Re: Comparing binary files with Diff 3.2 compiled with MinGW


From: Paul Eggert
Subject: Re: Comparing binary files with Diff 3.2 compiled with MinGW
Date: Sat, 12 May 2012 16:37:58 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/12/2012 10:41 AM, Bruno Haible wrote:
I would suggest to use a function

   int setmode (int fd, int o_mode);

That would clash with the setmode function defined
in <unistd.h> in FreeBSD etc., which is partly why we
removed this stuff from diffutils.
I agree that it'd be nicer to have a function
with an additional argument.  But I'd rather
not use a name like 'setmode' that clashes with BSD.

'set_binary_mode' would be OK, but wouldn't it
be cleaner to use fcntl?  The standard way to
set and clear O_* flags is fcntl, so shouldn't
it look like this?

   flags = fcntl (fd, F_GETFL);
   fcntl (fd, F_SETFL, flags | O_BINARY);



reply via email to

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