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/Hpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rts/Hpc.c') diff --git a/rts/Hpc.c b/rts/Hpc.c index 7575e34ce0..9ba9b04b61 100644 --- a/rts/Hpc.c +++ b/rts/Hpc.c @@ -13,6 +13,7 @@ #include #include #include +#include #if defined(HAVE_SYS_TYPES_H) #include @@ -233,7 +234,7 @@ startupHpc(void) sprintf(tixFilename, "%s.tix", prog_name); } - if (init_open(fopen(tixFilename,"r"))) { + if (init_open(__rts_fopen(tixFilename,"r"))) { readTix(); } } @@ -387,7 +388,7 @@ exitHpc(void) { // not clober the .tix file. if (hpc_pid == getpid()) { - FILE *f = fopen(tixFilename,"w"); + FILE *f = __rts_fopen(tixFilename,"w"); writeTix(f); } -- cgit v1.2.1