Fix getaddrinfo when AI_PASSIVE is set.

Peviously the port number was being ignored when AI_PASSIVE
was being set, which was resulting in httpd being bound to
port 0 (a random port).

R=binji@chromium.org

Review URL: https://codereview.chromium.org/18238013

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@814 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Build nacl-mounts and gtest as shared libraries under glibc.

This fixes a recent breakage which was introduced
where gtest started shipping with the SDK as a
shared library.  If nacl-mounts was static only
then its symbols would not be abailable to the gtest
so at runtime (not without -Wl,-export-dynamic anyway).

R=binji@chromium.org

Review URL: https://codereview.chromium.org/19172004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@815 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Don't add system -I and -L paths to naclports builds.

The default naclports include and library paths are
included implicitly either by the toolchain itself
or via the patched specs file.

Thie change removes the redundant setting of -I and
-L and also moves the specs file pathing to before
the first build runs.

BUG=
R=binji@chromium.org

Review URL: https://codereview.chromium.org/19259002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@816 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix build by adding -lppapi_cpp_private to bochs and dosbox.

Now that nacl-mounts is built as a shared library this
extra dependency is required in all its consumers.

BUG=
R=binji@chromium.org

Review URL: https://codereview.chromium.org/19312002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@817 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Use create_nmf to create dosbox nmf rather than using a static one.

This is needed, for example, to run the glibc build.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/19266006

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@818 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding vim to naclports.

Vim comes up largely functional.
Initially under glibc only due to ncurses.

BUG=None
TEST=None
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/19272006

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@819 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding padding to Makefile to prevent modeline problem.

vim interprets lines toward the end of a file containing
"vim:" as a "modeline" (special tag).
This causes vim to fail when opening our Makefile.
Adding padding to prevent this.

BUG=None
TEST=opens in vim
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/19381006

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@820 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix linking of bxcommit (part of bochs) under newlib.

Added -lnosys to resolve undefined refernce to unlink().

TBR=binji

Review URL: https://codereview.chromium.org/19366007

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@821 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding nano to naclports.

Working around polling limitations for now.

BUG=None
TEST=None
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/19372007

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@822 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix python to build with newlib.

Work around various issues with building python with
newlib.  Many of these fixes should be upstreamed
to newlib itself ASAP.

BUG=None
TEST=./build_all.py python
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/18112024

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@823 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding git.

It builds, however, it is unlikely to run at this point.
Needed before it can be really useful:
- multi-process
- perl :-(

It also only builds under glibc.

BUG=None
TEST=None
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/19417003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@824 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Adding bash to naclports.

Works, but has a few issues:
- no fork, so job control is disabled
- terminal echo seems broken
- works with --enabled-nacl but not as an unpacked extension.
  * terminate called after throwing an instance of 'std::bad_alloc'
  * what():  std::bad_alloc

BUG=None
TEST=None
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/19218008

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@825 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix pnacl build of webp.

Be explicit about webp depending on jpeg and tiff and
add -lm which they in turn depend on.

Not quite sure how this was broken, my guess is that
libtool .la magic was effected by the recent change to
install pnacl libs and headers directly into the toolchain.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/19428002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@826 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix broken webp build.

Turns out the brokenness was caused by the fact that libtool
doesn't honor the exteral gcc 'specs' file that we write so
we need to keep the -L on the link line for the naclports
libdir.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/19685003

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@827 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Remove gtest to avoid conflicting with the copy now shipping in the SDK

In the long run we shouldn't really be shipping gtest
in library form at all as it goes against the recommendations
for how to use it.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/19705005

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@828 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fixes for newlib python build.

Python (under newlib anyway) seems to rely on a working
getcwd() and the one from -lnosys is not enough.  Always
returning "." seems to be enough to get the interpreter
working.

Statically link all the common posix modules in
the newlib build.

Define "timezone" and "daylight" which are expected
by the time module.

Increase the buffer size used to report the compiler
used to build python since the nacl compiler string
is very long (it includes a git hash!).

When a posix file i/o function returns ENOSYS report
the function name that reported it rather then that
filename that the function was called with (we should
probably upstream this).

BUG= http://code.google.com/p/nativeclient/issues/detail?id=1229
R=binji@chromium.org

Review URL: https://codereview.chromium.org/19503002

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@829 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add readline to naclports

R=bradnelson@google.com

Review URL: https://codereview.chromium.org/19608004

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@830 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Disable python/newlib until ncurses/newlib lands

TBR=binji

Review URL: https://codereview.chromium.org/19729014

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@831 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add NACL_EXEEXT variable for executable extension

BUG=
R=bradnelson@google.com

Review URL: https://codereview.chromium.org/19822005

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@832 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix broken build which was attempting to write to non-existant folder.

Add a mkdir for "usr/share" before trying to write to it.

TBR=bradnelson

Review URL: https://codereview.chromium.org/19506009

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@833 7dad1e8b-422e-d2af-fbf5-8013b78bd812