From: Elizabeth Smith Date: Thu, 10 Jul 2014 22:52:22 +0000 (-0700) Subject: Small changes for cygwin build X-Git-Tag: v0.22.0~458 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0e2b90930eeb9a29a6651c89dfd19d1dfe44cbce;p=folly.git Small changes for cygwin build Summary: Folly is almost "out of the box" working with cygwin This has the proper ifdefs to include cygwin in two areas and a workaround for a cygwin bug when including headers Test Plan: fbconfig -r folly && fbmake runtests Reviewed By: delong.j@fb.com FB internal diff: D1413303 --- diff --git a/folly/String.cpp b/folly/String.cpp index f6fc8def..091cd67d 100644 --- a/folly/String.cpp +++ b/folly/String.cpp @@ -308,7 +308,7 @@ fbstring errnoStr(int err) { // https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strerror_r.3.html // http://www.kernel.org/doc/man-pages/online/pages/man3/strerror.3.html -#if defined(__APPLE__) || defined(__FreeBSD__) || \ +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__CYGWIN__) ||\ ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) // Using XSI-compatible strerror_r int r = strerror_r(err, buf, sizeof(buf)); diff --git a/folly/Synchronized.h b/folly/Synchronized.h index 83ca833d..0e692789 100644 --- a/folly/Synchronized.h +++ b/folly/Synchronized.h @@ -49,7 +49,8 @@ struct HasLockUnlock { enum { value = IsOneOf