Enable disasm by default - in adds some useful information to debug messages in log file
Remove defines for 8bit registers from cpu.h, the x86 arch defines not match defines used by set_reg and get_reg methods.
The Bochs anyway even doesn't compile if cosimulation configured enabled.
But in the same time the cosimulation code only disturbs to the future development of Bochs debugger, for example adding x86-64 functionality ...
For those of you who still may want to see the cosimulation code inside I put it in patch and upload it Bochs CVS patches folder. Read comments for the patch ! ----------------------------------------------------------------------
Change BxSupportPAE and BxSupportGlobalPages macros to Bochs style names
Set bx_cpu_id in BX_CPU_C constructor (safe way)
Backup cpu-level check for paging features at compile time (already checked in configure)
Some warnings and indent fixes
speed up get_segment_base method for x86-64 case
present and a quickstart option exists, too
- improved check for GTK 2.x (only needed if basename of wx is 'wx_gtk2')
- moved/added some deprecated configure options to the end of the script. These
checks should force users and distrubutors to update their config options.
* added hack to detect GTK 2 and set include path
* don't use obsolete wxNotebookSizer
* TODO: wxGTK version is still buggy (wrong dialogs when pressing toolbar buttons)
- updated version number and strings
* SSE/SSE2 need CPU level 6
* external debuggger supported on win32 only
* docbook2html needed for building Docbook documentation
- missing result value for 3DNow! support added
- OSX sound support is used for MacOS 9, too
- changes to the original svga_cirrus patch:
* PCI memory/mmio PnP support, some emulation and compile fixes
* ported write mode 4 + 5 and some bufixes from cirrus vga in qemu
* new graphics API, hardware cursor support, configure option added (Robin Kay)
* partial support for transparent bitblt and bitblt write mask
2. Fixed bug
[ 989478 ] I-Cache and undefined Instruktions
The L4 microkernel uses an undefined instruction to
trap for a special requests into the kernel (LOCK NOP).
The handler fixes this up and gives the user a special
code page with syscall stubs. If you're not using the
I-Cache optimization everthing works find on bochs. But
if you enable the I-Cache (--enable-icache), then the
undefined opcode exception is thrown only once for ever
virtual address it occurs. See the demodisk of the
L4KA::pistachio
(http://www.l4ka.org/projects/pistachio/download.php).
In this case the pingpong benchmark of this demo is of
interest. Everything runs fine until the program tries
to spawn a new task for its measurements. This new task
shares the code of the creating program. But the new
task stops executing at the undefined instruction
explained above and no exception is thrown.
configure script option --enable-magic-breakpoints (enabled by default).
Documented the instruction required to trigger the magic breakpoint
(xchgw %bx,%bx).
- pit: and time0: options are still supported but deprecated
- warn when parsing deprecated directives
- fix wrong number of ata_device_translation_names
- still to do:
- setting time0 to utc is not yet supported
- the man page, user guide and .bochsrc still need to be updated
with the new options
* configure.in: readline check is only necessary if the debugger is enabled
(patch from Jeroen Janssen)
* iodev/Makefile.in: dependencies updated after adding gameport device
* support for different resource compilers added (rc / windres)
* bochs must be linked with advapi.lib for registry access
* optimization flag changed to /Ox
* symbols BX_HAVE_MKSTEMP, BX_HAVE_SYS_MMAN_H and HAVE_ETHERTAP must be set to 0
* BX_HAVE_REALTIME_USEC definition fixed for MSVC
* vmware3.h: definition of COW_Header fixed for MSVC
These changes are based on the SF patch #742670. It did not work with
plugins disabled.
Here is the descriiption of patch #742670:
the library dependencies (see objdump -p file) in the
main bochs binary and the gui plugins are wrong:
- the gui plugins don't depend on their respective gui
libraries
- the main bochs binary depends on all the gui libraries
this doesn't seem much of a problem, since the needed
libraries are loaded anyway, but it's problematic when
building packages for binary distribution of bochs.
in Debian, the package building tools will set package
dependencies according to the library dependencies of
each file, so the result is:
- the main bochs package depends on all libraries. this
includes libwx, libsdl, libncurses and xlibs.
- the indivudual plugin packages don't depend on any
gui library
so when a user wants to run bochs with the curses gui
and installs the bochs-curses package, he/she will be
forced to install Xfree86, WxWindows and GTK+ on
his/her system.
the attached patch fixes the problem by moving the
linker flags related to GUI libraries to the right
makefile (gui/Makefile.in)
You can now choose for each disk on the ata interfaces the
disk mode, between :
- flat : one file flat layout
- concat : multiple files layout
- external : developer's specific, through a C++ class
- dll : developer's specific, through a DLL
- sparse : stackable, commitable, rollbackable
- vmware3 : vmware3 disk support
- undoable : flat file with commitable redolog
- growable : growing file
- volatile : flat file with volatile redolog
- z-undoable : gziped flat file with commitable redolog
- z-volatile : gziped flat file with volatile redolog
A new "bxcommit" utility can merge commitable redologs to
flat images.
- it works only on x86 with gcc2.95+
- uses the GCC function atribute "regparm(n)" to declare that certain
functions use the register calling convention
- performance improvement is about 6%
and improved by Christophe Bothamy and Volker Ruppert)
Comment from the author:
Attached is a "patch" file detailing what you need to do
to add USB support (UHCI only for now) to your existing
Bochs (2.0.xx) source code.
I use Win32 and VC++ but the source and modifications
should be platform and compiler independant.
Please let me know if this patch some how breaks the
build process of your compilation (Bochs 2.0.0 or above
only).
I would also like any feedback on how this code works
(or doesn't work) on your platform and within your
images. If you explain in as much detail as you can on
how it did or did not work, I will try to add to the source
to help it work on all platforms and images.
make install it will build the docbook documentation and install it
into $(prefix)/share/doc/bochs. If it is not specified, then it will
be enabled only if the program "docbook2html" is found in your path.
- this completes [ 652957 ] install docbook docs instead of HTML
Modified Files:
Makefile.in configure configure.in doc/docbook/Makefile.in
- now configure script does substitutions in doc/docbook/Makefile.in
- add "make install_docbook" target in main makefile that runs make install
in doc/docbook. It will not be run unless you ask for it.
Modified Files:
configure.in Makefile.in configure doc/docbook/Makefile.in
- move DOC-linux.html into the docbook in a section called "Quick Start for
Linux Users", and removed all references to the DOC-linux file that I could
find. Most of the text has been moved into the Linux RPM section. Parts
that did not fit into the docbook are now in doc/docbook/misc.txt.
- put vga.pcf into INSTALL_LIST_X11 so that it's only installed when
you configure with --with-x11.
- transfer section on VGA font installation from docs-html into user guide
- remove RCS id from screen shots within user guide, since they are changed
to the revision info of user.dbk.
Modified Files:
Makefile.in configure configure.in build/linux/.cvsignore
build/redhat/bochs.rpmspec.template doc/docbook/misc.txt
doc/docbook/user/user.dbk doc/man/bochs-dlx.1 doc/man/bochs.1
doc/man/bochsrc.5 doc/man/bximage.1 docs-html/install.html
Removed Files:
build/linux/DOC-linux.html.in build/linux/bochs-docs.in
add SVGALIB display library by Igor Popik <igipop@wsfiz.edu.pl>
While it's running, you can press F12 to escape into the runtime config
menu, and then you can change disks or quit or whatever.
Better not try it with the bochs debugger...you could get stuck.
Modified Files:
Makefile.in config.h.in configure configure.in main.cc
plugin.h gui/Makefile.in
Added Files:
gui/svga.cc
Removed Files:
patches/patch.svgalib-gui patches/patch.svgalib-gui-f12
to make Bochs compile on DJGPP.
- put references to SIGSTOP and SIGTSTP in #ifdefs
- add definition of BX_CD_FRAMESIZE and CD_FRAMESIZE
- look for curses functions in -ldcurses
Modified Files:
gui/term.cc iodev/cdrom.cc configure.in configure
- configure script adds -DBX_PLUGIN_PATH="${plugdir}" to CFLAGS/CXXFLAGS
in the Makefile.
- in main.cc, if plugins enabled and the environment variable LTDL_LIBRARY_PATH
is not set, then it gets set to the value supplied by BX_PLUGIN_PATH.
Modified Files:
main.cc Makefile.in configure.in config.h.in configure
- plugins are installed into ${plugdir} which is defined to be
${libdir}/bochs-${VERSION}/plugins.
Modified Files:
Makefile.in plugin.cc configure.in configure gui/Makefile.in
iodev/Makefile.in
New behaviour is:
. No command line arg (user want to load or create a new conf file)
-> no .bochsrc is loaded
-> defaults to "2. Read options from..."
. command line arg -q (user want to quick start from .bochsrc)
-> .bochsrc is loaded
-> if found Run the simulation
-> if not found defaults to "2. Read options from..."
. command line arg -f (user want to edit a conf file)
-> conf file is loaded
-> if found defaults to "3. Edit options"
-> if not found defaults to "2. Read options from..."
. command line arg -qf (user want to quick start from a conf file)
-> conf file is loaded
-> if found Run the simulation
-> if not found defaults to "2. Read options from..."
. After selection of "2. Read options from..."
-> defaults to "5. Begin simulation"
- fix "enable-control-panel" behaviour in configure.in.
- check if a romimage was supplied in the conf file.
If not, print a hint about a missing/corrupt conf file.
I hope I did not break anything, notably the Carbon gui
These files are part of the wx plugin, and they should not be linked
into a separate plugin. I have changed gui/Makefile.in and configure.in
to correct this.
- This fixes bug [ 628667 ] don't build plugin for wxdialog, wxmain
- modified: gui/Makefile.in configure.in configure
one for --disable-cdrom, and one for the defalt if it's not specified. The
enabled action and default are supposed to be the same, but they were
slightly different, and Bochs on BeOS was able to compile with --enable-cdrom
but not with the default action. Solution: now the autoconf actions only
sets bx_cdrom=0 or bx_cdrom=1. Then afterward, it tests $bx_cdrom and does
the enable or disable action. This will be easier to maintain because there
is just one copy of each action, instead of two copies that are supposed to
be kept identical to each other.
bx_shadow_num_c able to handle pointers to 64 bit values. This
allows x86-64 and wxWindows to coexist.
- I had a number of duplicate constructors for bx_shadow_num_c,
with an without the description arg. I eliminated the ones
that had no description, and also removed the min/max arg from
all. I still need a bunch of constructors though, for
Bit64u*, Bit64s*, Bit32u*, Bit32s*, Bit16u*, Bit16s*, Bit8u*, Bit8s*.
Having all these constructors allows us to write
new bx_shadow_num (bxid, name, description, &value)
for basically any integer variable. They are all handled by the same class.
- these changes led to minor touchups in cpu/init.cc and iodev/keyboard.cc
- modified:
configure main.cc cpu/init.cc iodev/keyboard.cc
gui/siminterface.cc gui/siminterface.h
SSE/SSE2 for Stanislav. Also, some method prototypes and
skeletal functions in access.cc for read/write double quadword
features.
Also cleaned up one warning in protect_ctrl.cc for non-64 bit compiles.
There was an unused variable, only used for 64-bit.
to give the compiler some hints:
BX_CPP_AttrPrintf(formatArg, firstArg)
BX_CPP_AttrNoReturn()
The first is to tell the compiler that a function receives printf-like
arguments so it can do some smart argument checking w.r.t. the
format string. The 2nd tells the compiler that the function does
not ever return; it's not used yet, but I'd like to use it on
exception() after we fix the situation of it returning for debugging.
I fixed one parameter mismatch in cpu/ by deleting a deprecated
debug print statement. There are several other mismatches in
other code modules.
override default. This is useful if you have more than one wx installation,
for example debug and release libraries.
- modified: Makefile.in configure.in configure
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
"-pthread" flag to the link line, but as of wxWindows 2.3.3 their
wx-config script adds it for us. Given the keyboard mapping improvements
in wx 2.3.3, I don't expect to support any previous version.
all available optimizations in one shot.
Finished one last case of an instruction which could but didn't use
the Read-Modify-Write variants of access.cc functions.
Started going through the integer instructions, merging obvious cases
where there are two "if (modrm==11b) {" clauses and very little
action in between, and cleaning up the aweful indentation leftover
from many years ago when those instructions were implemented using
cut-and-paste. We may get a little extra performance out of these
mods, but they'll also be easier after I'm finished to enhance
with asm() statements to knock out the lazy flags processing on x86.
just the wxwindows ones. This is required on cygwin, for example, because
the CFLAGS and CXXFLAGS include gcc flags that change code generation:
-fno-pcc-struct-return and -fvtable-thunks. It is not safe to mix code
compiled with these flags with code compiled without. I learned this the
hard way when I found that sometimes code that called a virtual member
function was jumping to the WRONG member function.
wxWindows guis.
- if cross configuring, don't insist on finding curses library.
- on normal configures, when the target platform is win32 (windows, cygwin,
mingw), don't insist on finding pthread either.
(I'm starting to wonder if when cross_configure=1 we shouldn't just skip over
ALL of the library and header checks. When you're going to configure on one
platform and build on another, all that information is useless anyway.)
smarter. If you use --enable-x86-64, it has the following side
effects on other options:
- cpu level defaults to 6 instead of 5
- ignore bad msr defaults to on (Peter T. requested this)
- if cpu level is 6 or greater, these options are enabled by default.
- 4meg pages (PSE)
- physical address extensions (PAE)
- global pages (PGE)
- apic support
configuring for a different machine. This is used to short-circuit
certain sanity checks, such as existence of certain required libraries.
- in --with-wx configuration, when $cross_configure=1, do not abort
configure if library is not found.
- if wxWindows version not found, print "not_found" instead of nothing
From his patch file text:
> This patch adds Promise DC2300 VLB IDE Support.
> You may find msdos and win95 drivers on the net. Look for
> P2300W95.ZIP and DC2300VLBIDEver260b.ZIP.
>
> The good news is that now win95 natively sees my cdrom,
> and that the disks are not in msdos compatibility mode any more.
>
> The bad news is that it works only for the first ata interface.
>
> I tested that patch on msdos and win95 only.
>
> Some info on VLB IDE can be found at http://ryston.cz/petr/vlb/
I got Win95 running with 32-bit paging/filesystem using the
recommended driver and these patches. Since the patches did
such a good job bracketing code modifications with a #define,
they might as well become part of the current CVS code.
user can turn on/off use of native host specific inline asm
statements. By default, this option is enabled, so you only
need it to disable inline asms in your compile for now.
Currently only on x86+GCC environments, will inline asm()
statements be used. Eventually, other platforms could specify
some asm()s; probably for endian issues such as byte-swapping
and unaligned memory accesses. On x86, there are some inline
asm()s which do the arithmetic EFLAGS processing so that the
lazy flags handling is somewhat bypassed. Eventually, I'll
add more, at least for the more common instructions. This
adds a little extra performance.
- hardcode BX_HAVE_GETTIMEOFDAY=0 if cross compiling for VC++
(this part hasn't been tested)
- modified files: configure configure.in config.h.in iodev/pit_wrap.cc
in cpu.cc out of the main loop, and into the asynchronous
events handling. I went through all the code paths, and
there doesn't seem to be any reason for that code to be
in the hot loop.
Added another accessor for getting instruction data, called
modC0(). A lot of instructions test whether the mod field
of mod-nnn-rm is 0xc0 or not, ie., it's a register operation
and not memory. So I flag this in fetchdecode{,64}.cc.
This added on the order of 1% performance improvement for
a Win95 boot.
Macroized a few leftover calls to Write_RMV_virtual_xyz()
that didn't get modified in the x86-64 merge. Really, they
just call the real function for now, but I want to have them
available to do direct writes with the guest2host TLB pointers.
but if you hand edit cpu/cpu.h, and change BxICacheEntries,
you can try different sizes. I'll make this more flexible
with configure. For now, use "--enable-icache" with no parameters.
- Modified fetchdecode.cc/fetchdecode64.cc just enough so that
instructions which encode a direct address now use a memory
resolution function which just sticks the immediate address
into rm_addr. With cached instructions we need this.
enhancement to bochs. You can now configure with
--enable-guest2host-tlb.
Force the support of big pages (PSE) when x86-64 is configured.
Reverted back to only one kind of TLB entry style, since everything
is ported.
Fixed one bug in io.cc with as_64 and the index registers.
There are others, as noticed by Peter.
you have AC_DEFINE(var, value) executed more than once, autoconf is
supposed to use the last AC_DEFINE value, but sometimes it doesn't.
I haven't been able to figure out why, so I've just worked around it
instead.
- for BX_SupportGlobalPages, which could call AC_DEFINE twice, I kept the
value in a shell variable $support_global_pages until the end and then
did one AC_DEFINE after it had reached its final value. Same thing
with BX_USE_CONFIG_INTERFACE.
- also I realized that we are using AC_SUBST() in many cases where it is
not needed. AC_SUBST(name) substitutes the string @name@ with a
value from the configure script. For preprocessor symbols like
BX_SupportPAE, we only need the AC_DEFINE; the AC_SUBST has no effect.
be used at all, and Peter didn't want it. "extdb.o" is compiled
into libcpu.a, if configured for it.
Removed a few #warnings for x86-64 compile, based on Peter's
line-item comments regarding the warnings I inserted during
the port/merge.
printing a message when a reserved bit was set, but not causing
a #GP(0). As well, I force a new PAE support option to 1 when
Hammer support is enabled.
circular dependencies between 3 cpu related libs that I need
as part of this transition. I changed the "ar rv" to "ld -i -o"
to do an incremental load instead of an archive. Hope this
doesn't break any platforms. We can reset this later.
to incrementally merge files. For a test, shift16.cc is always
compiled in the cpu/ directory regardless of 32/64-bit configure.
Ultimately, all files will migrate from cpu64 to cpu.
This adds a whole new directory cpu64 with the new emulation code.
Very few changes were necessary outside cpu64. To try it, configure
with --enable-x86-64 and make.
- also this adds Peter Tattam's external debugger interface.
- modified files: Makefile.in bochs.h config.h.in configure.in
load32bitOShack.cc logio.cc cpu/Makefile.in cpu/cpu.cc debug/dbg_main.cc
- added files: cpu/extdb.cc cpu/extdb.h and cpu64/*
You need to use '--enable-global-pages' to configure in support.
If you have something to boot that uses them, give them a
spin. Really the were introduced for PPro and above, but
I haven't put in any limits. CPUID and CR4 report the proper
bits when configured, regardless of --enable-cpu-level at the
moment.
work (control-C kills process instead of returning to debugger prompt), give
a configure-time error if they are enabled together. If we can fix the
signal problem in readline, this check can be removed.
files that need them. This is more in line with the other gui libraries,
and the compile line is easier to read.
- modified: Makefile.in configure.in configure gui/Makefile.in
added --enable-repeat-speedups with default to disabled.
Reconfigure/recompile and the speedup code will be #ifdef'd
out for now. It manifested as junk written to the VGA screen
while booting/running Windows.
Also made some more mods to the main cpu loop. Moved the
handling of EXT/errorno outside the main loop, much like
the extra EIP/ESP commits were moved, for a little better
performance.
I changed the fetch_ptr/bytesleft method of fetching to
a slightly different model, which calculates a window
for which EIP will be valid (land on the current page),
and a bias which when applied to EIP will be from
0..upper_page_limit. Speed is about the same for either
method, but a pseudo-op/threaded-interpreter will plug
in better with this and be faster.
- Paging code rehash. You must now use --enable-4meg-pages to
use 4Meg pages, with the default of disabled, since we don't well
support 4Meg pages yet. Paging table walks model a real CPU
more closely now, and I fixed some bugs in the old logic.
- Segment check redundancy elimination. After a segment is loaded,
reads and writes are marked when a segment type check succeeds, and
they are skipped thereafter, when possible.
- Repeated IO and memory string copy acceleration. Only some variants
of instructions are available on all platforms, word and dword
variants only on x86 for the moment due to alignment and endian issues.
This is compiled in currently with no option - I should add a configure
option.
- Added a guest linear address to host TLB. Actually, I just stick
the host address (mem.vector[addr] address) in the upper 29 bits
of the field 'combined_access' since they are unused. Convenient
for now. I'm only storing page frame addresses. This was the
simplest for of such a TLB. We can likely enhance this. Also,
I only accelerated the normal read/write routines in access.cc.
Could also modify the read-modify-write versions too. You must
use --enable-guest2host-tlb, to try this out. Currently speeds
up Win95 boot time by about 3.5% for me. More ground to cover...
- Minor mods to CPUI/MOV_CdRd for CMOV.
- Integrated enhancements from Volker to getHostMemAddr() for PCI
being enabled.
the terminology a bit. In particular, the term "gui" has started
to mean different things in different contexts, so I've defined
some more specific names for the parts of the user interface, and
updated comments and some variable names to reflect it. See
siminterface.h for a more complete description of all of these.
VGAW: VGA display window and toolbar buttons, the traditional Bochs
display which is ported to X, win32, MacOS X, etc. Implemented
in gui/gui.* and platform dependent gui/*.cc files.
CI: configuration interface that lets the user change settings such
as floppy disk image, ne2k settings, log options. The CI consists
of two parts: configuration user interface (CUI) which does the
actual rendering to the screen and handles key/mouse/menu events,
and the siminterface object.
CUI: configuration user interface. This handles the user interactions
that allow the user to configure Bochs. To actually change any
values it talks to the siminterface object. One implementation of
the CUI is the text-mode menus in gui/control.cc. Another
implementation is (will be) the wxWindows menus and dialogs in
gui/wxmain.cc.
siminterface: the glue between the CUI and the simulation code,
accessible throughout the code by the global variable
bx_simulator_interface_c *SIM;
Among other things, siminterface methods allow the simulator to ask the
CUI to display things or ask for user input, and allows the CUI
to query and modify variables in the simulation code.
GUI: Literally, "graphical user interface". Until the configuration menus
and wxWindows came along, everyone understood that "gui" referred to the
VGA display window and the toolbar buttons because that's all there
was. Now that we have the wxWindows code, which implements both the VGAW
and the CUI, while all other platforms implement only the VGAW, it's not
so clear. So, I'm trying to use VGAW, CI, and CUI consistently since
they are more specific.
control panel: This has been used as another name for the configuration
interface. "control panel" is also somewhat unspecific and it sounds
like it would be graphical with buttons and sliders, but our text-mode
thing is not graphical at all. I've replaced "control panel" with
"configuration interface" wherever I could find it. In configure script,
the --disable-control-panel option is still supported, but it politely
suggests that you use --disable-config-interface instead.
- clean up comments in siminterface,wx* code
- add comments and examples for bx_param_* and BxEvents
- remove some obsolete stuff: notify_*_args,
bx_simulator_interface_c::[sg]et_enabled() methods
- in siminterface.cc, move a few bx_real_sim_c methods to where they belong,
with the rest of the methods. No changes to the actual methods.
- remove some DOS ^M's which crept in and confused my editor.
called <linux/netlink.h> the ethertap module will be defined. If other
OSes turn up that also have ethertap, we can change the test.
- in eth_tap.cc, I replaced the calls to GPL code from maconlinux with
my own stuff.
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.