From 3e4a348ea6f027e6337a9d0709e7f32422f04f19 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 2 Jul 2019 20:43:00 +0200 Subject: getcwd: Fix crash when invoked with size = 0 on MSVC. * lib/getcwd.c: Include msvc-inval.h. (getcwd_nothrow): New function/macro. (getcwd_system): New macro. (__getcwd): Use it instead of getcwd. * modules/getcwd (Depends-on): Add msvc-inval. * doc/posix-functions/getcwd.texi: Mention the MSVC issue. --- modules/getcwd | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/getcwd') diff --git a/modules/getcwd b/modules/getcwd index 628c4d1f6f..90299a1c7e 100644 --- a/modules/getcwd +++ b/modules/getcwd @@ -13,6 +13,7 @@ Depends-on: unistd extensions pathmax [test $REPLACE_GETCWD = 1] +msvc-inval [test $REPLACE_GETCWD = 1] mempcpy [test $REPLACE_GETCWD = 1] d-ino [test $REPLACE_GETCWD = 1] memmove [test $REPLACE_GETCWD = 1] -- cgit v1.2.1