bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] merging/factoring safe-read.c and safe-write.c


From: Jim Meyering
Subject: Re: [Bug-gnulib] merging/factoring safe-read.c and safe-write.c
Date: Wed, 04 Dec 2002 08:49:46 +0100

"Paul Eggert" <address@hidden> wrote:
>> From: Jim Meyering <address@hidden>
>> Date: Tue, 03 Dec 2002 11:50:16 +0100
>>
>> I want to generate one from the other, or maybe generate both from a
>> template, as is already done to get stat.c and lstat.c from xstat.in.
>
> I'd rather have one include the other (e.g., xstrtoul.c and xstrtolc),
> or perhaps have both include a template source file.  That way, we
> don't need to generate a source file.  Generated source files tend to
> be harder for me to follow than ordinary ones.

You're right.  I prefer that, too.
So I've just done it.

Here's what matters from safe-write.c:

#define SAFE_WRITE
#include "safe-read.c"

And here's safe-read.c:

Attachment: safe-read.c
Description: Text Data

> Hmm, it's already on my list of things to do, to fix unlocked-io to
> not be generated.  Perhaps I should add stat.c and lstat.c to my list
> too?

Nah.  I did that, so I'll clean up :-)

reply via email to

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