summaryrefslogtreecommitdiff
path: root/rts/Profiling.c
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2018-03-29 14:22:09 +0100
committerTamar Christina <tamar@zhox.com>2018-03-31 10:11:53 +0100
commit4de585a5c1ac3edc2914cebcac1753b514051a89 (patch)
tree09bfb4251808007bb4ad79c6f10f3e4fbe3e9312 /rts/Profiling.c
parentafb686a88901d7d0c93627806d7e4d0444aa17e8 (diff)
downloadhaskell-4de585a5c1ac3edc2914cebcac1753b514051a89.tar.gz
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
Diffstat (limited to 'rts/Profiling.c')
-rw-r--r--rts/Profiling.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/Profiling.c b/rts/Profiling.c
index 803f86befc..9f1a442951 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -22,6 +22,7 @@
#include "Printer.h"
#include "Capability.h"
+#include <fs_rts.h>
#include <string.h>
#if defined(DEBUG)
@@ -264,7 +265,7 @@ initProfilingLogFile(void)
sprintf(prof_filename, "%s.prof", stem);
/* open the log file */
- if ((prof_file = fopen(prof_filename, "w")) == NULL) {
+ if ((prof_file = __rts_fopen(prof_filename, "w")) == NULL) {
debugBelch("Can't open profiling report file %s\n", prof_filename);
RtsFlags.CcFlags.doCostCentres = 0;
// Retainer profiling (`-hr` or `-hr<cc> -h<x>`) writes to
@@ -281,7 +282,7 @@ initProfilingLogFile(void)
sprintf(hp_filename, "%s.hp", stem);
/* open the log file */
- if ((hp_file = fopen(hp_filename, "w")) == NULL) {
+ if ((hp_file = __rts_fopen(hp_filename, "w")) == NULL) {
debugBelch("Can't open profiling report file %s\n",
hp_filename);
RtsFlags.ProfFlags.doHeapProfile = 0;