1. ifdef documentation

In the Euphoria docs 4.4.3.5 Using ifdef, there are several statements that seem to be - wrong.

First, we see the example:

ifdef WINDOWS then 
   -- Windows specific code. 
elsedef 
   include std/error.e 
   crash("This program must be run with the Windows interpreter.") 
end ifdef 

Later on, we see a warning which seems to say the above example won't work!

"Do be careful to put the numbers after the platform names for Windows:"

-- This puts() routine will never be called 
-- even when run by the Windows interpreter! 
ifdef WINDOWS then 
     puts(1,"I am on Windows\n") 
end ifdef 

Is this confusing? What numbers? 7, 10, XP? Also, is it correct to say:

-- OSX is not supported but we define public symbols for it anyhow.
new topic     » topic index » view message » categorize

2. Re: ifdef documentation

irv said...

In the Euphoria docs 4.4.3.5 Using ifdef, there are several statements that seem to be - wrong.

First, we see the example:

ifdef WINDOWS then 
   -- Windows specific code. 
elsedef 
   include std/error.e 
   crash("This program must be run with the Windows interpreter.") 
end ifdef 

That should work.

irv said...

Later on, we see a warning which seems to say the above example won't work!

"Do be careful to put the numbers after the platform names for Windows:"

-- This puts() routine will never be called 
-- even when run by the Windows interpreter! 
ifdef WINDOWS then 
     puts(1,"I am on Windows\n") 
end ifdef 

Good catch. This is a mistake. Hard to believe that it took 6+ years for anyone to notice.

The mistaken commit: http://scm.openeuphoria.org/hg/euphoria/annotate/f424a79ccb5d/docs/refman_2.txt#l2913

This is the original:

http://scm.openeuphoria.org/hg/euphoria/file/56a06e0b7d14/docs/refman_2.txt

-- This puts() routine will never be called 
-- even when run by the Windows interpreter! 
ifdef WIN then 
     puts(1,"I am on Windows\n") 
end ifdef 
irv said...

Is this confusing? What numbers? 7, 10, XP?

This is referring to WIN32.

That is,

-- This puts() routine will never be called 
-- even when run by the Windows interpreter! 
ifdef WIN then 
     puts(1,"I am on Windows\n") 
end ifdef 
-- However, this will work 
ifdef WIN32 then 
     puts(1,"I am on Windows\n") 
end ifdef 
-- This will also work. 
ifdef WINDOWS then 
     puts(1,"I am on Windows\n") 
end ifdef 

Hopefully _tom can fix the docs on this point.

irv said...

Also, is it correct to say:

-- OSX is not supported but we define public symbols for it anyhow.

Sort of. We have three tiers of support - Linux/GNU and Windoze (i386 and x64 both) are tier 1 and every official release will support them. If there's an issue with a tier 1 platform then the release will be held up until the problem is resolved.

Tier 2 is Linux/GNU on ARM (the "Android" port). We'll release binaries and test when we can, but issues here won't hold up a release.

Tier 3 are the BSDs and OSX. We'll try to release translated sources so someone can compile them themselves, but we won't test them and they won't hold a release up.

Tier 4 (or should this be Tier 0?) are MS-DOS and OpenSolaris. We once supported them but dropped support and stripped the code out.

OSX used to be a tier 1 platform, but the only guy with an OSX system and compiler, eumario, hasn't been around in years. If eumario comes back, we might upgrade OSX back to a tier 1 platform again.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu