chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] platform auto-detection mechanism


From: .alyn.post.
Subject: Re: [Chicken-hackers] [PATCH] platform auto-detection mechanism
Date: Fri, 1 Feb 2013 12:35:40 -0701

On Fri, Feb 01, 2013 at 02:20:56PM -0500, John Cowan wrote:
> Michele La Monaca scripsit:
> 
> > You have a point here. Let me propose a compromise: detecting Windows
> > is easy and bullet-proof. 
> 
> Just make sure that your Windows detection does not misdetect Cygwin,
> which is not Windows at all for Chicken purposes.  Since you can't count
> on uname in a pure MinGW world, the best thing is probably to invoke "gcc
> -dumpmachine" and test the output with "findstring"; that will give you
> a result that is as reliable as gcc.  Cygwin isn't a cross-compilation
> host normally, so no issues there.
> 

I may have sent this program to the list once before, apologies if I
repeat myself.  While it isn't a solution as-is, the 'output of gcc'
comment reminds me of what may be my favorite C program:

You compile it and it returns the name and version of the compiler it
was compiled with.  It's cute, though it may be useful too, I
haven't looked at whether there is information provided by gcc these
days that wasn't ~5 years ago.

Program atteched.

-Alan
-- 
my personal website: http://c0redump.org/

Attachment: ccinfo.c
Description: Text document


reply via email to

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