diff --git a/System/Directory/Internal/C_utimensat.hsc b/System/Directory/Internal/C_utimensat.hsc index 3d9b1942..cf2aeb34 100644 --- a/System/Directory/Internal/C_utimensat.hsc +++ b/System/Directory/Internal/C_utimensat.hsc @@ -12,7 +12,6 @@ module System.Directory.Internal.C_utimensat where #ifdef HAVE_SYS_STAT_H # include #endif -#include import Prelude () import System.Directory.Internal.Prelude import Data.Time.Clock.POSIX (POSIXTime) @@ -21,8 +20,7 @@ data CTimeSpec = CTimeSpec EpochTime CLong instance Storable CTimeSpec where sizeOf _ = #{size struct timespec} - -- workaround (hsc2hs for GHC < 8.0 doesn't support #{alignment ...}) - alignment _ = #{size char[alignof(struct timespec)] } + alignment _ = #{alignment struct timespec} poke p (CTimeSpec sec nsec) = do (#poke struct timespec, tv_sec) p sec (#poke struct timespec, tv_nsec) p nsec diff --git a/System/Directory/Internal/Windows.hsc b/System/Directory/Internal/Windows.hsc index 1c723fb4..df11afff 100644 --- a/System/Directory/Internal/Windows.hsc +++ b/System/Directory/Internal/Windows.hsc @@ -12,7 +12,6 @@ module System.Directory.Internal.Windows where #include #include #include -#include #include import Prelude () import System.Directory.Internal.Prelude @@ -177,8 +176,7 @@ win32_alloca_REPARSE_DATA_BUFFER action = allocaBytesAligned size align $ \ ptr -> action (ptr, size) where size = fromIntegral win32_mAXIMUM_REPARSE_DATA_BUFFER_SIZE - -- workaround (hsc2hs for GHC < 8.0 don't support #{alignment ...}) - align = #{size char[alignof(HsDirectory_REPARSE_DATA_BUFFER)]} + align = #{alignment HsDirectory_REPARSE_DATA_BUFFER]} win32_peek_REPARSE_DATA_BUFFER :: Ptr Win32_REPARSE_DATA_BUFFER -> IO Win32_REPARSE_DATA_BUFFER diff --git a/System/Directory/Internal/utility.h b/System/Directory/Internal/utility.h deleted file mode 100644 index 2f37ef34..00000000 --- a/System/Directory/Internal/utility.h +++ /dev/null @@ -1,6 +0,0 @@ -#if !defined(alignof) && __cplusplus < 201103L -# ifdef STDC_HEADERS -# include -# endif -# define alignof(x) offsetof(struct { char c; x m; }, m) -#endif