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:
parent
c8eebc93a9
commit
70bbfa0e00
@ -825,7 +825,11 @@ void fs__scandir(uv_fs_t* req) {
|
|||||||
* A file name is at most 256 WCHARs long.
|
* A file name is at most 256 WCHARs long.
|
||||||
* According to MSDN, the buffer must be aligned at an 8-byte boundary.
|
* According to MSDN, the buffer must be aligned at an 8-byte boundary.
|
||||||
*/
|
*/
|
||||||
|
#if _MSC_VER
|
||||||
__declspec(align(8)) char buffer[8192];
|
__declspec(align(8)) char buffer[8192];
|
||||||
|
#else
|
||||||
|
__attribute__ ((aligned (8))) char buffer[8192];
|
||||||
|
#endif
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof buffer >=
|
STATIC_ASSERT(sizeof buffer >=
|
||||||
sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR));
|
sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user