Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
unix
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
unix
Commits
28a7a416
Commit
28a7a416
authored
13 years ago
by
dterei
Browse files
Options
Downloads
Patches
Plain Diff
Fix validation error
parent
6d8b741f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
System/Posix/Temp.hsc
+3
-1
3 additions, 1 deletion
System/Posix/Temp.hsc
System/Posix/Temp/ByteString.hsc
+4
-2
4 additions, 2 deletions
System/Posix/Temp/ByteString.hsc
with
7 additions
and
3 deletions
System/Posix/Temp.hsc
+
3
−
1
View file @
28a7a416
...
@@ -25,7 +25,9 @@ module System.Posix.Temp (
...
@@ -25,7 +25,9 @@ module System.Posix.Temp (
import System.IO
import System.IO
import System.Posix.IO
import System.Posix.IO
import System.Posix.Types
import System.Posix.Types
#if !defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)
import System.Posix.Directory (createDirectory)
import System.Posix.Directory (createDirectory)
#endif
import Foreign.C
import Foreign.C
#if __GLASGOW_HASKELL__ > 700
#if __GLASGOW_HASKELL__ > 700
...
@@ -78,7 +80,7 @@ mkdtemp template' = do
...
@@ -78,7 +80,7 @@ mkdtemp template' = do
let template = template' ++ "XXXXXX"
let template = template' ++ "XXXXXX"
#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
withFilePath template $ \ ptr -> do
withFilePath template $ \ ptr -> do
throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
_ <-
throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
name <- peekFilePath ptr
name <- peekFilePath ptr
return name
return name
#else
#else
...
...
This diff is collapsed.
Click to expand it.
System/Posix/Temp/ByteString.hsc
+
4
−
2
View file @
28a7a416
...
@@ -22,10 +22,12 @@ module System.Posix.Temp.ByteString (
...
@@ -22,10 +22,12 @@ module System.Posix.Temp.ByteString (
#include "HsUnix.h"
#include "HsUnix.h"
import System.IO
( Handle, openFile, IOMode(..) )
import System.IO
import System.Posix.IO
import System.Posix.IO
import System.Posix.Types
import System.Posix.Types
#if !defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)
import System.Posix.Directory (createDirectory)
import System.Posix.Directory (createDirectory)
#endif
import Foreign.C
import Foreign.C
...
@@ -69,7 +71,7 @@ mkdtemp template' = do
...
@@ -69,7 +71,7 @@ mkdtemp template' = do
let template = template' `B.append` (BC.pack "XXXXXX")
let template = template' `B.append` (BC.pack "XXXXXX")
#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
withFilePath template $ \ ptr -> do
withFilePath template $ \ ptr -> do
throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
_ <-
throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
name <- peekFilePath ptr
name <- peekFilePath ptr
return name
return name
#else
#else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment