Fix build/runtime issues on Solaris #681

merged 5 commits into from May 14, 2012
Commits on May 10, 2012
  1. @scottjg

    Hook up Windows compat fnmatch() for Solaris

    scottjg committed May 10, 2012
    Since Solaris does not support some of the same flags as glibc fnmatch(),
    we just use the implementation we have for Windows.
    Now that it's no longer a windows-specific thing, I moved it into compat/
    instead of win32/
Commits on May 11, 2012
  1. @scottjg

    Fix rmdir() usage on Solaris

    scottjg committed May 10, 2012
    On Solaris, rmdir() throws EEXIST if the folder is not empty, so just add
    one more case to check for that, alongside ENOTEMPTY.
  2. @scottjg

    Fix comment typo in common.h

    scottjg committed May 11, 2012
Commits on May 12, 2012
  1. @scottjg

    Fix readdir_r() usage for Solaris

    scottjg committed May 10, 2012
    On Solaris, struct dirent is defined differently than Linux. The field
    containing the path name is of size 0, rather than NAME_MAX. So, we need to
    use a properly sized buffer on Solaris to avoid a stack overflow.
    Also fix some DIR* leaks on cleanup.
Commits on May 14, 2012
  1. @scottjg

    Add a test to verify FILENAME_MAX

    scottjg committed May 14, 2012
    Since we now rely on it (at least under Solaris), I figured we probably
    want to make sure it's accurate. The new test makes sure that creating a
    file with a name of length FILENAME_MAX+1 fails.