Euphoria Ticket #551: Confusion in use of WIN32 versus WINDOWS - WIN32_GUI, WIN32_CONSOLE, EUB_WIN32

I went through the stdlib and the source and the tests and changed most WIN32 ifdefs to use WINDOWS.

However, some tests seem to need WIN32, other places use platform() and the WIN32 constant (which can not be changed for backwards compatibility reasons), and we have at least these ifdefs

WIN32_GUI
WIN32_CONSOLE
EUB_WIN32

Which need to be changed to

WINDOWS_GUI
WINDOWS_CONSOLE
EUB_WINDOWS_GUI

or possibly just

GUI
CONSOLE
EUB_GUI

Details

Type: Bug Report Severity: Blocking Category: Other
Assigned To: unknown Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.0.0

1. Comment by jeremy Dec 16, 2010

GUI and CONSOLE are my votes. Reason being is:

ifdef WINDOWS and GUI then 
    -- CODE 
end ifdef 

Other places I may not care about WINDOWS, I may just want

ifdef CONSOLE then 
    -- Conde 
end ifdef 

2. Comment by jeremy Dec 16, 2010

Further, do we really want to have (not that it's currently possible but it sets the stage):

ifdef OPENBSD_CONSOLE or FREEBSD_CONSOLE or LINUX_CONSOLE then 

3. Comment by jimcbrown Dec 16, 2010

I find myself agreeing with Jeremy. GUI and CONSOLE are the way to go.

4. Comment by DerekParnell Dec 16, 2010

As a general principle, compound definitions are not required if the concepts being compounded are independent as they are equivalent to an implied AND.

So, for example, we should have defines for operating system family (WINDOWS, UNIX), address size (ADR32, ADR64), and user interface (CONSOLE, GUI) etc ...

5. Comment by mattlewis Dec 19, 2010

I don't see any more WIN32 ifdefs in the std lib. Can we close this ticket?

6. Comment by jeremy Dec 19, 2010

I think this ticket is more than just WIN32. It's suggesting we change WIN32_GUI to be WINDOWS and GUI, internally. i.e. we should define CONSOLE and GUI and update relevant docs?

7. Comment by mattlewis Dec 19, 2010

I updated all of the front end and the docs. changeset

Search



Quick Links

User menu

Not signed in.

Misc Menu