On Sat, Feb 11, 2012 at 12:53 AM, Ludovic Courtès <l...@gnu.org> wrote:
>
>> * R7RS feature identifiers: r7rs, exact-closed, ratios, exact-complex,
>>   ieee-float, full-unicode, windows, posix, unix, darwin, linux, bsd,
>>   freebsd, solaris, i386, x86-64, ppc, sparc, jvm, clr, llvm, ilp32,
>>   lp64, ilp64, big-endian, little-endian, guile, guile-2, guile-2.0
>
> I wonder how these are specified.  Does a *-kfreebsd-gnu build have
> ‘freebsd’?  And ‘bsd’?  Do *-gnu* have ‘linux’ defined, even when Linux
> isn’t used?  Does Cygwin have ‘unix’?

First note the list of feature identifiers is one of the
things most likely to be trimmed in the next draft.

There is no "gnu" feature proposed in R7RS, though
Guile can of course define whatever non-portable
features it needs.  I don't see why "gnu" would imply
"linux".

The point about the "unix" feature being vague is well
taken.  I think it's meant to be widely encompassing
and refer to Unix-like systems, including cygwin, with
a guarantee of a Bourne-like shell in /bin/sh and common
Unix programs like cp, rm, ls etc. available, but we'll
be sure to revisit this.

> And above all: are people going to write #ifdef __linux__ish code when
> what they mean is #ifdef __GLIBC__ or even something different?

This particular analogy doesn't apply.  As I see with
the current list of proposed features the only confusion
is in the granularity of the feature to use, where, e.g.

  freebsd < bsd < posix, unix

as opposed to two completely unrelated concepts like
OS and libc.

Regardless, we're likely to add a disclaimer that you
should only resort to cond-expanded code as a last
resort.

-- 
Alex

Reply via email to