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
868c6df0
Commit
868c6df0
authored
13 years ago
by
pcapriotti
Browse files
Options
Downloads
Patches
Plain Diff
Fix warnings.
parent
9acb33c8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
System/Posix/Files/Common.hsc
+36
-36
36 additions, 36 deletions
System/Posix/Files/Common.hsc
with
36 additions
and
36 deletions
System/Posix/Files/Common.hsc
+
36
−
36
View file @
868c6df0
...
...
@@ -271,69 +271,69 @@ statusChangeTime (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ (#peek struct stat, st_ctime)
accessTimeHiRes (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ \stat -> do
sec <- (#peek struct stat, st_atime) stat :: IO EpochTime
unsafePerformIO $ withForeignPtr stat $ \stat
_ptr
-> do
sec <- (#peek struct stat, st_atime) stat
_ptr
:: IO EpochTime
#ifdef HAVE_STRUCT_STAT_ST_ATIM
nsec <- (#peek struct stat, st_atim.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_atim.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_ATIMESPEC
nsec <- (#peek struct stat, st_atimespec.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_atimespec.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_ATIMENSEC
nsec <- (#peek struct stat, st_atimensec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_atimensec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_ATIME_N
nsec <- (#peek struct stat, st_atime_n) stat :: IO (#type int)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_atime_n) stat
_ptr
:: IO (#type int)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_UATIME
usec <- (#peek struct stat, st_uatime) stat :: IO (#type int)
let frac = toInteger usec % 10^
6
usec <- (#peek struct stat, st_uatime) stat
_ptr
:: IO (#type int)
let frac = toInteger usec % 10^
(6::Int)
#else
let frac = 0
#endif
return $ fromRational $ toRational sec + frac
modificationTimeHiRes (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ \stat -> do
sec <- (#peek struct stat, st_mtime) stat :: IO EpochTime
unsafePerformIO $ withForeignPtr stat $ \stat
_ptr
-> do
sec <- (#peek struct stat, st_mtime) stat
_ptr
:: IO EpochTime
#ifdef HAVE_STRUCT_STAT_ST_MTIM
nsec <- (#peek struct stat, st_mtim.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_mtim.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_MTIMESPEC
nsec <- (#peek struct stat, st_mtimespec.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_mtimespec.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_MTIMENSEC
nsec <- (#peek struct stat, st_mtimensec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_mtimensec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_MTIME_N
nsec <- (#peek struct stat, st_mtime_n) stat :: IO (#type int)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_mtime_n) stat
_ptr
:: IO (#type int)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_UMTIME
usec <- (#peek struct stat, st_umtime) stat :: IO (#type int)
let frac = toInteger usec % 10^
6
usec <- (#peek struct stat, st_umtime) stat
_ptr
:: IO (#type int)
let frac = toInteger usec % 10^
(6::Int)
#else
let frac = 0
#endif
return $ fromRational $ toRational sec + frac
statusChangeTimeHiRes (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ \stat -> do
sec <- (#peek struct stat, st_ctime) stat :: IO EpochTime
unsafePerformIO $ withForeignPtr stat $ \stat
_ptr
-> do
sec <- (#peek struct stat, st_ctime) stat
_ptr
:: IO EpochTime
#ifdef HAVE_STRUCT_STAT_ST_CTIM
nsec <- (#peek struct stat, st_ctim.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_ctim.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_CTIMESPEC
nsec <- (#peek struct stat, st_ctimespec.tv_nsec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_ctimespec.tv_nsec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_CTIMENSEC
nsec <- (#peek struct stat, st_ctimensec) stat :: IO (#type long)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_ctimensec) stat
_ptr
:: IO (#type long)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_CTIME_N
nsec <- (#peek struct stat, st_ctime_n) stat :: IO (#type int)
let frac = toInteger nsec % 10^
9
nsec <- (#peek struct stat, st_ctime_n) stat
_ptr
:: IO (#type int)
let frac = toInteger nsec % 10^
(9::Int)
#elif HAVE_STRUCT_STAT_ST_UCTIME
usec <- (#peek struct stat, st_uctime) stat :: IO (#type int)
let frac = toInteger usec % 10^
6
usec <- (#peek struct stat, st_uctime) stat
_ptr
:: IO (#type int)
let frac = toInteger usec % 10^
(6::Int)
#else
let frac = 0
#endif
...
...
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