[En-Nut-Discussion] Fmode

Harald Kipp harald.kipp at egnite.de
Thu Sep 7 09:54:21 CEST 2006

Hello Ben,

At 16:11 06.09.2006 +1200, you wrote:
>Hi guys,
>I've just been look at _fmode() in crt/fmode.c, and I can't figure out why,
>between file versions and 1.2, the behaviour of "+" was changed from
>just adding read/write access, to adding the CREAT and TRUNC flags. I'm
>pretty sure it should just add RDWR. This is a bug, right?
> mflags |= _O_RDWR;
>1.2: mflags |= _O_RDWR | _O_CREAT | _O_TRUNC;

I changed that. When using fopen(..., "r+"), I expect an existing
file being truncated or a non-existing file being created.

Am I wrong here?


More information about the En-Nut-Discussion mailing list