From a71ed469befc3c1a352638244ba262d42fe0f775 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Fri, 1 Dec 2017 12:38:13 +0100 Subject: Unix: Remove MaxPath, MaxName (#15229) * Unix: Remove MaxPath, MaxName PATH_MAX is not an upper bound on path lengths on Unix. system function return values should be used to determine behavior, instead of limiting the path length. NAME_MAX depends on the file system used. Its value depends on the path, it is not constant for the entire system. * PR feedback * Sync with corefx Interop.ReadLink * Deal with /etc/localtime link containing relative path --- src/corefx/System.Globalization.Native/timeZoneInfo.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/corefx') diff --git a/src/corefx/System.Globalization.Native/timeZoneInfo.cpp b/src/corefx/System.Globalization.Native/timeZoneInfo.cpp index 0dd28b4b70..d5ab7e094d 100644 --- a/src/corefx/System.Globalization.Native/timeZoneInfo.cpp +++ b/src/corefx/System.Globalization.Native/timeZoneInfo.cpp @@ -11,20 +11,6 @@ #include "holders.h" #include "errors.h" -/* -Gets the symlink value for the path. -*/ -extern "C" int32_t GlobalizationNative_ReadLink(const char* path, char* result, size_t resultCapacity) -{ - ssize_t r = readlink(path, result, resultCapacity - 1); // subtract one to make room for the NULL character - - if (r < 1 || r >= resultCapacity) - return false; - - result[r] = '\0'; - return true; -} - /* These values should be kept in sync with the managed Interop.GlobalizationInterop.TimeZoneDisplayNameType enum. */ -- cgit v1.2.3