Should check for ELF_CLASS, not ELFCLASS32.
Fixed incorrect sizeof in LinkReceiver::ReadRegion.

The type of BRegion::fCount is long, and ServerLink sends/receives it
with sizeof(long), but LinkReceiver was using sizeof(int32). Due to
long being 64 bit this was resulting in a mismatch. This fixes the
drawing problems on x86_64.
Added Tracker and Deskbar to x86_64 build.
Added more things to x86_64 image.

Some preference apps, mount_server and AboutSystem. Removed the check
for x86_64 in the boot script, the normal path through the script will
work now. Also removed a temporary hack to workaround AboutSystem not
being there in build_haiku_image.
Fixed type mismatch in picture data.

The size of an operation block was written as size_t by PictureDataWriter
but read as int32 by PicturePlayer. Fixes an app_server crash.
Added translator add-ons.
Fixed up network stack and drivers for x86_64.

* Various compilation fixes.
* Fixes to the FreeBSD compatibility layer (from comparing the x86-
  specific bits with the equivalent amd64 sources in FreeBSD).
* Compile all the Ethernet drivers except for sis900 and wb840, these
  require a bit more work to fix (will file a ticket soon). Tested
  ipro1000 and rtl81xx, no issues.
Changed BRegion to use int32 instead of long.

There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that
out.
Added Network preferences.
Support ELF64 in set_haiku_revision.
Revert "Fixed type mismatch in picture data."

This reverts commit 81aad168f87486149f6e4ce8acc43e3e7a5de9e1.
Better fix for picture data type mismatch.

Should use a fixed-size type (int32) rather than a platform-dependent
one.
Fix expr from coreutils on x86_64.

The coreutils sources get built against the regex.h included with
coreutils, but linked against the regex implementation in libroot. Some
of the types used by coreutils' regex implementation differ from those
in libroot's on 64-bit platforms meaning they are incompatible. Fixed by
building coreutils' own regex implementation rather than linking to
libroot's (GCC 2 still uses libroot though, coreutils' implementation
doesn't build with GCC 2).
Jump to the fault handler for GPFs in the debugger.

If an uncanonical address is accessed a general protection fault will
be raised. When in the debugger, uncanonical address faults should be
handled by the fault handler (if any).
Fixed possible NULL dereference in vm_page_fault.

This bug was introduced by changing IS_USER_ADDRESS to check against
USER_BASE AND USER_TOP rather than just !IS_KERNEL_ADDRESS. Faults
on addresses outside both the user and kernel address spaces (i.e. the
gap between user and kernel) would result in addressSpace being NULL,
but addressSpace was being used without checking for NULL at one point.
Fix from glibc for possible crash when printf()'ing a long double.
More x86_64 printf() fixes from glibc.
Build a separate libsupc++ for the kernel with correct flags.

Kernel mode code on x86_64 needs to be built with -mno-red-zone as
interrupts would corrupt the red zone if it were in use. However, the
kernel is linked with libsupc++, which was not compiled with
-mno-red-zone. If an interrupt occurred in libsupc++ code the red zone
would get corrupted. This was causing random panics, particularly under
heavy system load. Therefore, on x86_64 a separate build of libsupc++
with -mno-red-zone is now done for the kernel to use. Note: this commit
will require a rerun of configure and rebuild of cross tools.
Compilation fix for malloc_debug.
Do a separate libgcc build for the kernel as well.

Turns out that libgcc is needed, for some reason building the kernel
with -O0 does not end up referencing libgcc but -O2 does. A separate
build of it is done with -mno-red-zone, same reason as for libsupc++.
Ended up being easy to rebuild with different CFLAGS: previously I'd
tried doing `CFLAGS="-mno-red-zone" make` in the libgcc dir which
didn't override, the correct way is `make CFLAGS="-mno-red-zone"`