From 4de585a5c1ac3edc2914cebcac1753b514051a89 Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Thu, 29 Mar 2018 14:22:09 +0100 Subject: Remove MAX_PATH restrictions from RTS, I/O manager and various utilities Summary: This shims out fopen and sopen so that they use modern APIs under the hood along with namespaced paths. This lifts the MAX_PATH restrictions from Haskell programs and makes the new limit ~32k. There are only some slight caveats that have been documented. Some utilities have not been upgraded such as lndir, since all these things are different cabal packages I have been forced to copy the source in different places which is less than ideal. But it's the only way to keep sdist working. Test Plan: ./validate Reviewers: hvr, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #10822 Differential Revision: https://phabricator.haskell.org/D4416 --- rts/eventlog/EventLogWriter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rts/eventlog') diff --git a/rts/eventlog/EventLogWriter.c b/rts/eventlog/EventLogWriter.c index d8e5a44192..e6f560fc24 100644 --- a/rts/eventlog/EventLogWriter.c +++ b/rts/eventlog/EventLogWriter.c @@ -14,6 +14,7 @@ #include #include +#include #if defined(HAVE_SYS_TYPES_H) #include #endif @@ -71,7 +72,7 @@ initEventLogFileWriter(void) stgFree(prog); /* Open event log file for writing. */ - if ((event_log_file = fopen(event_log_filename, "wb")) == NULL) { + if ((event_log_file = __rts_fopen(event_log_filename, "wb")) == NULL) { sysErrorBelch( "initEventLogFileWriter: can't open %s", event_log_filename); stg_exit(EXIT_FAILURE); -- cgit v1.2.1