[Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

Simon Urbanek simon.urbanek at r-project.org
Tue Aug 14 16:32:22 CEST 2012

On Aug 14, 2012, at 10:19 AM, nobody wrote:

> On Tue, Aug 14, 2012 at 01:48:44PM +0200, peter dalgaard wrote:
>> Perhaps I'm confused, but how did either of you expect to fix a problem with fgetc by modifying fgets???
>> -- 
>> Peter Dalgaard, Professor
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
> i'm not well versed in C. do know how to fix this? or, as i gather, this
> is not something trivial and it has to be fixed uclibc upstream?

What Peter is saying that my fix was useless because I was talking about fgetc but fixed fgets: P
So the fix attempt should have been

static int fix_fgetc(FILE *stream) { return fgetc(stream); }
#undef fgetc
static int fgetc(FILE *stream) { return fix_fgetc(stream); }

It should still be fixed upstream because I don't think POSIX allows fgetc to be a macro.


More information about the R-devel mailing list