Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Wojtek Lerch Newsgroups: comp.std.c,comp.lang.c Subject: Re: The threading specs in the standard: a new catastrophe Date: Thu, 07 Jul 2011 14:42:28 -0400 Lines: 22 Message-ID: <97mcvlF1i3U1@mid.individual.net> References: <97m59uF1nsU1@mid.individual.net> <6851e796-252b-467e-b790-3cb2c3aeefc0@j25g2000vbr.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net PEXtLQYm8e0PX1RZgfq8lwH2oRAU+WU807X54OUk+bQNUPhTlu Cancel-Lock: sha1:pny4X4sDDHk2k8fcbPjA8FPQoGM= User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <6851e796-252b-467e-b790-3cb2c3aeefc0@j25g2000vbr.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.std.c:613 comp.lang.c:7867 On 07/07/2011 12:40 PM, Malcolm McLean wrote: > On Jul 7, 7:31 pm, Wojtek Lerch wrote: >> >> Do you find fopen() absurd and impossible to use too? Or are file or >> stream attributes (such as the POSIX permission bits, or O_EXCL) less >> important to you than some of the thread attributes that POSIX or >> Windows have? >> > If it's the only interface to the file system, you may have problems. Or not, depending on what you're trying to do. > For instance you can't tell the size of a file, you can't scan a > directory, you can't set read or write permissions or flag it as a > temporary. You can't lock it from other processes. Right; but if you do need to do any of those things, then you can't rely on C99 alone. You need to lose some portability and rely on something like POSIX or the Windows API or whatever. But that doesn't make fopen() absurd or impossible to use -- a lot of code has been written that happily uses fopen() without worrying about any of the fancy OS-specific stuff.