Make Directory::Current() work with unenhanced POSIX getcwd
Make Directory::Current() work with unenhanced POSIX getcwd

POSIX says getcwd needs to be passed a pre-allocated
buffer, but many platforms provide an extended version
of getcwd that will allocate a buffer when called with
arguments (NULL, 0).

Display::Current() was depending upon this extended
behavior, which happens to work on Linux and Mac
platforms, but which doesn't work on other POSIX
platforms (such as Android.)

Fixed by using the preprocessor to choose between two
implementations of Display::Current, one of which depends
upon the extended semantics of getcwd, the other of which
only depends upon the standard semantics of getcwd.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10824159

git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@10309 260f80e4-7a28-3924-810f-c04153c831b5

dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk