Added t4145 - make sure we can't use inputs from a directory we didn't write to.

A Tupfile can use inputs from a generated directory if it wrote to them, but not use inputs that another Tupfile wrote to that directory (unless it uses a group). If the Tupfile doesn't write to the directory at all then it may not exist at parse-time, so we need to get an error message.
Added t4146 - check for adding an invalid node to create_list.

If you made a directory inside a generated directory, tup would error out because the generated dir was in the create list.
Added t2168 - %d should be for the Tupfile directory, not an included file directory.
Disable t5053 in Windows (broken after updating cygwin).
Use bitfield for node flags.
Added t4147 - initial test for ^o flag to skip commands.

If the ^o flag is present, all outputs are moved to .tup/tmp before running instead of unlinking. After the command completes, we can check them to see if they are equal. If they are, we can skip future commands that depend on those files (unless some other input has changed).
Added t4148 - check symlinks correctly with ^o flag.
Don't show skipped command banners.

If there are a lot of skipped commands, it just adds needless noise to the terminal. We still have to keep the progress bar the same length, and just remove the mtime from the total time so our ETA is still accurate.
man page: Document 'o' flag.
Add -static-gcc command for mingw.

Apparently mingw32 with gcc-4.8.1 adds a dependency on libgcc_s_sjlj-1.dll unless we add -static-libgcc now.
Added t4149 - make sure generated dirs are created with ^o.

Currently generated dirs are created by way of the tup_entry_open() in unlink_outputs(). There is probably a better way to do that, but for now just do tup_entry_open() in move_outputs as well.
Added t5078 - make sure ^o^ won't skip commands if we're removed from a group.

When a command is removed from a group, we need to run dependent commands to check for proper dependencies even if the command's outputs are the same.
Added t5079 - make sure groups are modified with ^o^ if outputs change.

Here we remove an output from a group, so we need to make sure that the group is marked as modify so that dependent commands are executed even if the remaining outputs are unchanged.
Added t5080 - make sure transitive deps aren't broken by ^o^.

In this case, we have a normal link on a file because of a transitive dependency. When that transitive dep is broken and our output is the same, we still need to run the dependent command so that its dependencies can be checked.
Helgrind doesn't seem to like bitfields.
fuse: Use fuse_main() instead of fuse_mount/fuse_new to work with gold.

The gold linker is broken and picks the wrong version of the fuse_new() function, so the wrong argument parsing is used and results in the error:

fuse: unknown option `'
fuse_new: Operation not permitted

By calling fuse_main() directly we can avoid this issue. Of course this means we are now desynchronized wrt setting up the file-system and trying to use it. This was already a problem on OSX and FreeBSD anyway, so it will be better to have a single approach that works for all. I suspect the init() function usage will also only work on Linux, but we can add a sleep/try to access a dummy file in the file-system polling loop if necessary.
osx: Fix mount race condition and master_fork wait().

For some reason, the init() callback isn't sufficient for determining when the fs is fully ready to go, so the chdir() into the virtual fs fails unless we wait for it to be fully initialized. We do this by polling for the @tup@ virtual directory.

Also, OSXFUSE is setting signal(SIGCHLD, SIGIGN), which causes the waitpid() on the master_fork to fail. We set this back to SIGDFL so that works properly.
Added t4150 - make sure we can hit the max fd limit still close/open.

This mimics what gold does - it will open a ton of files, hit the fd limit, and then try to close one before opening another. In the fuse fs, the flush() call was trying to dup another file descriptor, which was failing since we didn't have any left. This close(dup()) doesn't seem to do anything for us, so pull it out.
Added t4151 - another max files test.

In this case, we try to open and read from each file. For some reason, the last few file descriptors are returned successfully even though they can't be read from. We need to return -errno if the fd isn't opened correctly, rather than always return 0.
Added t4152 - max files test with mmap.

In this case we open the files and then mmap() them. When we close the last file, we don't munmap() it, so FUSE still thinks it is open. In this case we still want to be able to open & read/write files. This is done by keeping track of how many files are open by the sub-process, and if it goes over a limit, we use the fusexmp model of doing an open()/read()/close() on a read call, rather than keeping the fd open in FUSE. This hurts performance in cases where many file descriptors are open, but at least keeps the system running (in particular for the gold linker).