[Top][All Lists]

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

Re: Cross-platform availability of header files

From: Zack Weinberg
Subject: Re: Cross-platform availability of header files
Date: Fri, 15 Mar 2013 16:17:31 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 2013-03-15 12:05 AM, Russ Allbery wrote:
Zack Weinberg <address@hidden> writes:

I think we should try to come up with a principled cutoff for how old is
too old, though. I started this thinking POSIX.1-2001 (including XSI,
but maybe not any other options) was a reasonable place to draw the
line, but it turns out Android omits a bunch of that (and not the old
junk either) so it's not so simple.

"You can assume a C89 hosted environment" does still seem like a sound
assertion, though.

It's also important not to exclude Windows, which sometimes is missing
some things that are otherwise universal.

Quite so; I have been at pains to divide everything beyond C89 into "truly universal" and "not available on Windows". And I do find it useful to be able to reuse configure in one of the pseudo-Unix environments on Windows.

However, I think the right way to handle Windows/not-Windows *in the code* is with #if(n)def _WIN32. One probably needs to do more than just avoid unavailable headers, after all.

I should also emphasize that what I've been doing is *only* about the presence of headers, not their contents.


reply via email to

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