win,fs: Fixes align(8) directive on mingw

Fixes: https://github.com/libuv/libuv/issues/190
PR-URL: https://github.com/libuv/libuv/pull/398
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Stefano Cristiano 2015-06-15 12:03:42 +02:00 committed by Saúl Ibarra Corretgé
parent c8eebc93a9
commit 70bbfa0e00

View File

@ -825,7 +825,11 @@ void fs__scandir(uv_fs_t* req) {
* A file name is at most 256 WCHARs long.
* According to MSDN, the buffer must be aligned at an 8-byte boundary.
*/
#if _MSC_VER
__declspec(align(8)) char buffer[8192];
#else
__attribute__ ((aligned (8))) char buffer[8192];
#endif
STATIC_ASSERT(sizeof buffer >=
sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR));