force 32bit compile
added t2123 (already worked) and t8067 (was broken: node-variables referring to non-generated files in variants)
Documentation improvements

- Add instructions how to install tup from MacPorts package manager
- Mention that Ubuntu PPA works on 12.04 as well
win32: Fix warnings reported by gcc-4.6.3
Print whole tup entry for unspecified outputs.

Displaying the directory tupid is useless - we can just print the tent directly anyway.
man page: Clarify usage of 'export' keyword.
Added t6065 - failed nodes shouldn't break things.

If a command fails, tup doesn't call pop_node() so that any dependent nodes are not executed (eg: we won't call the linker if one of the compilations it needs has failed). However, tup was removing the node from the graph, though the links were not removed. When destroy_graph() was ultimately called, tup would then remove the links from the other end where the node still exists, and try to access the freed memory. This resulted in a strange "fuse internal error", presumably because fuse ended up with an old pointer of tup's.

The fix is to just leave a failed node on the node_list, so that it will get freed in destroy_graph() along with all the rest. Since it was already cleared of all incoming links, it won't go back to plist so we don't have to worry about running it again.
Clean up error messages.

Some of these were printing tupids for directories, when we can just print the path instead. Also the error messages from find_dir_tupid_dt_pg should go to the error file for things like the parser to display messages in the right order.
Run valgrind even on tests expected to fail.

We can at least use valgrind here to check memory accesses and such, even though we don't worry about freeing all used memory in error conditions. This would've helped find t6065 much sooner.
Fix helgrind warning.

This is pretty innocuous, since we set the server_fail flag in the fuse thread and don't check it until after we are stopping the parser.
Implemented stronger function hooking using "hot patching" method.

Original IAT patching approach have a drawback of not intercepting
function calls done dynamically (i.e. GetProcAddress->call). Also it
requires all variants of the function to be hooked instead of single
base one making whole process open to calls not visible to hook.

This fix implements "hot patching" hooking method which inserts redirection
instructions directly to function body if the function is compiled with
"hot patching" compiler switches on. Most functions on recent Windows
versions have this option enabled.

However not all API functions support this method, therefore IAT and hot
patching are both enabled for now. In first pass hot patching redirection
is applied, and then functions which cannot be hooked using redirection are
then patched in import tables (IAT).

In overall this makes hooking much stable for me when using old MingW
/Cygwin tool builds. In long run  IAT patching can be probably dropped
allowing to greatly simplify dllinject.c but that would require
re-organizing list of patched functions.

As a side-effect dllinject.c was refactored a bit into multiple modules.
Implemented colored output for win32.

ANSI escapes are parsed out in compat/win32/printf.c and color commands
are redirected to console API. Also due to using console API directly this
fix greatly improves console output speed of tup - previously printing
thousands of lines was slowing down tup greatly on win32 (i.e. initial
directory scanning was noticeable slow when tup was not redirected to a file).
fixed broken redirection to a file.
Fix Cygwin crash after injecting hook library.

It looks like Cygwin gets confused by receiving DllMain THREAD_ATTACH
notification when the library is not yet initialized causing it
to later crash. This can be easily reproduced by modifying tup-dllinject
to just CreateRemoteThread which does nothing.

Proposed fix changes injection method from remote thread to code cave
(write stub, adjust eip, resume). This method is safer in overall
because have no side effects of THREAD_ATTACH notification on loaded
libraries.
Fixed fopen with "rb+" mode was always considered as write operation

by hook even if file does not exist and open fails.
Some MingW gcc builds are trying to open some kind of database files
this way (.gcda code coverage?) near output files.
Fixed win32 API hooks were not preserving GetLastError() value
causing applications to get confused on errors.

For example in my scenario MingW was trying to get information regarding
include folders, but was using buffers which are too small to fit all
information, win32 API was reporting this, but error code was lost in
hook, causing MingW to think that API call failed due to unknown failure
instead of retrying call with bigger buffer.
Fixed get_relative_dir() was using POSIX path separators when generating
relative directory string on win32.

Windows shell (cmd.exe) in most cases treats slashes as start of command
parameters, thus making get_relative_dir()-derived paths unusable for
usage in shell scripts on win32.
Merge remote branch 'forester/win32_colors'
Code formatting fixes.
options: Remove DEFAULT_COLOR define.

This was used to differentiate between Windows/other OS defaults, but now they all use "auto".