[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_
From: |
Brian Dean |
Subject: |
Re: [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay] |
Date: |
Thu, 12 Aug 2004 20:07:17 -0400 |
User-agent: |
Mutt/1.4.2.1i |
On Thu, Aug 12, 2004 at 03:18:57PM -0700, Theodore A. Roth wrote:
> The mode string can also include the letter ``b'' either as a last
> character or as a character between the characters in any of the two-
> character strings described above. This is strictly for compatibility
> with ANSI X3.159-1989 (``ANSI C'') and has no effect; the ``b'' is
> ignored on all POSIX conforming systems, including Linux. (Other sys-
> tems may treat text files and binary files differently, and adding the
> ``b'' may be a good idea if you do I/O to a binary file and expect that
> your program may be ported to non-Unix environments.)
>
> If it's a binary file, just use "wb" or "rb" on all systems.
While 'b' is not documented to work on FreeBSD nor Mac, I checked the
FreeBSD sources for fopen() and indeed it catches and properly ignores
the 'b'. This part of MacOS X is purported to be derived from FreeBSD
so I suspect the code is identical for it. Indeed, I tested the use
of "rb" here on my Mac and see no problems, so I'd say this is a safe
change to pull out from under the #ifdef.
-Brian
--
Brian Dean
http://www.bdmicro.com/
- [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork,however ("\r\n") is okay], E. Weddington, 2004/08/12
- [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork,however ("\r\n") is okay], Theodore A. Roth, 2004/08/12
- [avrdude-dev] RE: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay], Bernard Fouché, 2004/08/13
- [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay], Joerg Wunsch, 2004/08/13
- [avrdude-dev] RE: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork,however ("\r\n") is okay], Theodore A. Roth, 2004/08/13
- [avrdude-dev] Re: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork,however ("\r\n") is okay], E. Weddington, 2004/08/13
- [avrdude-dev] RE: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay], Bernard Fouché, 2004/08/15
- [avrdude-dev] RE: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay], E. Weddington, 2004/08/15
- [avrdude-dev] RE: FIXED: was avrdude prb [RE: [avr-gcc-list] printf_P + PSTR("\n\r") does not seem towork, however ("\r\n") is okay], Bernard Fouché, 2004/08/16