diff --git a/System/Directory.hs b/System/Directory.hs
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -29,6 +29,7 @@
     , removeDirectory
     , removeDirectoryRecursive
     , renameDirectory
+    , listDirectory
     , getDirectoryContents
     -- ** Current working directory
     , getCurrentDirectory
@@ -176,8 +177,8 @@
 A directory contains a series of entries, each of which is a named
 reference to a file system object (file, directory etc.).  Some
 entries may be hidden, inaccessible, or have some administrative
-function (e.g. `.' or `..' under POSIX
-<http://www.opengroup.org/onlinepubs/009695399/>), but in
+function (e.g. @.@ or @..@ under
+<http://www.opengroup.org/onlinepubs/009695399 POSIX>), but in
 this standard all such entries are considered to form part of the
 directory contents. Entries in sub-directories are not, however,
 considered to form part of the directory contents.
@@ -571,8 +572,8 @@
 removeContentsRecursive :: FilePath -> IO ()
 removeContentsRecursive path =
   (`ioeSetLocation` "removeContentsRecursive") `modifyIOError` do
-    cont <- getDirectoryContents path
-    mapM_ removePathRecursive [path </> x | x <- cont, x /= "." && x /= ".."]
+    cont <- listDirectory path
+    mapM_ removePathRecursive [path </> x | x <- cont]
     removeDirectory path
 
 #if __GLASGOW_HASKELL__
@@ -963,37 +964,8 @@
         else findFilesWith f ds fileName
 
 #ifdef __GLASGOW_HASKELL__
-{- |@'getDirectoryContents' dir@ returns a list of /all/ entries
-in /dir/.
-
-The operation may fail with:
-
-* 'HardwareFault'
-A physical I\/O error has occurred.
-@[EIO]@
-
-* 'InvalidArgument'
-The operand is not a valid directory name.
-@[ENAMETOOLONG, ELOOP]@
-
-* 'isDoesNotExistError' \/ 'NoSuchThing'
-The directory does not exist.
-@[ENOENT, ENOTDIR]@
-
-* 'isPermissionError' \/ 'PermissionDenied'
-The process has insufficient privileges to perform the operation.
-@[EACCES]@
-
-* 'ResourceExhausted'
-Insufficient resources are available to perform the operation.
-@[EMFILE, ENFILE]@
-
-* 'InappropriateType'
-The path refers to an existing non-directory object.
-@[ENOTDIR]@
-
--}
-
+-- | Similar to 'listDirectory', but always includes the special entries (@.@
+-- and @..@).  (This applies to Windows as well.)
 getDirectoryContents :: FilePath -> IO [FilePath]
 getDirectoryContents path =
   modifyIOError ((`ioeSetFileName` path) .
@@ -1029,6 +1001,42 @@
           else return (filename:acc)
                  -- no need to reverse, ordering is undefined
 #endif /* mingw32 */
+
+-- | @'listDirectory' dir@ returns a list of /all/ entries in /dir/ without
+-- the special entries (@.@ and @..@).
+--
+-- The operation may fail with:
+--
+-- * 'HardwareFault'
+--   A physical I\/O error has occurred.
+--   @[EIO]@
+--
+-- * 'InvalidArgument'
+--   The operand is not a valid directory name.
+--   @[ENAMETOOLONG, ELOOP]@
+--
+-- * 'isDoesNotExistError' \/ 'NoSuchThing'
+--   The directory does not exist.
+--   @[ENOENT, ENOTDIR]@
+--
+-- * 'isPermissionError' \/ 'PermissionDenied'
+--   The process has insufficient privileges to perform the operation.
+--   @[EACCES]@
+--
+-- * 'ResourceExhausted'
+--   Insufficient resources are available to perform the operation.
+--   @[EMFILE, ENFILE]@
+--
+-- * 'InappropriateType'
+--   The path refers to an existing non-directory object.
+--   @[ENOTDIR]@
+--
+-- @since 1.2.5.0
+--
+listDirectory :: FilePath -> IO [FilePath]
+listDirectory path =
+  (filter f) <$> (getDirectoryContents path)
+  where f filename = filename /= "." && filename /= ".."
 
 #endif /* __GLASGOW_HASKELL__ */
 
diff --git a/System/Directory/Internal/C_utimensat.hsc b/System/Directory/Internal/C_utimensat.hsc
--- a/System/Directory/Internal/C_utimensat.hsc
+++ b/System/Directory/Internal/C_utimensat.hsc
@@ -30,7 +30,7 @@
       nsec <- #{peek struct timespec, tv_nsec} p
       return (CTimeSpec sec nsec)
 
-c_AT_FDCWD :: Integral a => a
+c_AT_FDCWD :: CInt
 c_AT_FDCWD = (#const AT_FDCWD)
 
 utimeOmit :: CTimeSpec
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,15 @@
 Changelog for the [`directory`][1] package
 ==========================================
 
+## 1.2.5.0 (December 2015)
+
+  * Add `listDirectory`, which is similar to `getDirectoryContents`
+    but omits `.` and `..`
+    ([#36](https://github.com/haskell/directory/pull/36))
+
+  * Remove support for `--with-cc=` in `configure`; use the `CC=` flag instead
+    ([ghc:D1608](https://phabricator.haskell.org/D1608))
+
 ## 1.2.4.0 (September 2015)
 
   * Work around lack of `#const_str` when cross-compiling
@@ -27,6 +36,8 @@
     ([#13](https://github.com/haskell/directory/issues/13))
 
   * Implement `getAccessTime` and `setAccessTime`
+
+  * Set the filename in IO errors from the file time functions
 
   * Fix `canonicalizePath` so that it always returns a reasonable result even
     if the path is inaccessible and will not throw exceptions unless the
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -676,7 +676,6 @@
 ac_user_opts='
 enable_option_checking
 with_gcc
-with_cc
 with_compiler
 '
       ac_precious_vars='build_alias
@@ -2111,18 +2110,12 @@
     esac
 }
 
-# inherit the C compiler from Cabal but allow it to be overridden by --with-cc
-# because Cabal puts its own flags at the end
+# Legacy support for setting the C compiler with Cabal<1.24
+# Newer versions use Autoconf's native `CC=...` facility
 
 # Check whether --with-gcc was given.
 if test "${with_gcc+set}" = set; then :
   withval=$with_gcc; set_with_gcc
-fi
-
-
-# Check whether --with-cc was given.
-if test "${with_cc+set}" = set; then :
-  withval=$with_cc; CC=$withval
 fi
 
 # avoid warnings when run via Cabal
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -16,14 +16,11 @@
     esac
 }
 
-# inherit the C compiler from Cabal but allow it to be overridden by --with-cc
-# because Cabal puts its own flags at the end
+# Legacy support for setting the C compiler with Cabal<1.24
+# Newer versions use Autoconf's native `CC=...` facility
 AC_ARG_WITH([gcc],
             [C compiler],
             [set_with_gcc])
-AC_ARG_WITH([cc],
-            [C compiler],
-            [CC=$withval])
 # avoid warnings when run via Cabal
 AC_ARG_WITH([compiler],
             [GHC compiler],
diff --git a/directory.cabal b/directory.cabal
--- a/directory.cabal
+++ b/directory.cabal
@@ -1,5 +1,5 @@
 name:           directory
-version:        1.2.4.0
+version:        1.2.5.0
 -- NOTE: Don't forget to update ./changelog.md
 license:        BSD3
 license-file:   LICENSE
@@ -59,7 +59,7 @@
         HsDirectory.h
 
     build-depends:
-        base     >= 4.5 && < 4.9,
+        base     >= 4.5 && < 4.10,
         time     >= 1.4 && < 1.6,
         filepath >= 1.3 && < 1.5
     if os(windows)
diff --git a/tests/CopyFile001.hs b/tests/CopyFile001.hs
--- a/tests/CopyFile001.hs
+++ b/tests/CopyFile001.hs
@@ -3,19 +3,17 @@
 #include "util.inl"
 import System.Directory
 import Data.List (sort)
-import Data.Monoid ((<>))
 import System.FilePath ((</>))
 
 main :: TestEnv -> IO ()
 main _t = do
   createDirectory dir
   writeFile (dir </> from) contents
-  T(expectEq) () (specials <> [from]) . sort =<< getDirectoryContents dir
+  T(expectEq) () [from] . sort =<< listDirectory dir
   copyFile (dir </> from) (dir </> to)
-  T(expectEq) () (specials <> [from, to]) . sort =<< getDirectoryContents dir
+  T(expectEq) () [from, to] . sort =<< listDirectory dir
   T(expectEq) () contents =<< readFile (dir </> to)
   where
-    specials = [".", ".."]
     contents = "This is the data\n"
     from     = "source"
     to       = "target"
diff --git a/tests/CopyFile002.hs b/tests/CopyFile002.hs
--- a/tests/CopyFile002.hs
+++ b/tests/CopyFile002.hs
@@ -3,19 +3,17 @@
 #include "util.inl"
 import System.Directory
 import Data.List (sort)
-import Data.Monoid ((<>))
 
 main :: TestEnv -> IO ()
 main _t = do
   -- Similar to CopyFile001 but moves a file in the current directory
   -- (Bug #1652 on GHC Trac)
   writeFile from contents
-  T(expectEq) () (specials <> [from]) . sort =<< getDirectoryContents "."
+  T(expectEq) () [from] . sort =<< listDirectory "."
   copyFile from to
-  T(expectEq) () (specials <> [from, to]) . sort =<< getDirectoryContents "."
+  T(expectEq) () [from, to] . sort =<< listDirectory "."
   T(expectEq) () contents =<< readFile to
   where
-    specials = [".", ".."]
     contents = "This is the data\n"
     from     = "source"
     to       = "target"
diff --git a/tests/CreateDirectoryIfMissing001.hs b/tests/CreateDirectoryIfMissing001.hs
--- a/tests/CreateDirectoryIfMissing001.hs
+++ b/tests/CreateDirectoryIfMissing001.hs
@@ -6,13 +6,10 @@
 import qualified Control.Exception as E
 import Control.Monad (replicateM_)
 import Data.Monoid ((<>))
-import System.FilePath ((</>), addTrailingPathSeparator)
-import System.IO.Error(isAlreadyExistsError, isDoesNotExistError,
-                       isPermissionError)
-#ifndef mingw32_HOST_OS
 import GHC.IO.Exception (IOErrorType(InappropriateType))
-import System.IO.Error(ioeGetErrorType)
-#endif
+import System.FilePath ((</>), addTrailingPathSeparator)
+import System.IO.Error (ioeGetErrorType, isAlreadyExistsError,
+                        isDoesNotExistError, isPermissionError)
 
 main :: TestEnv -> IO ()
 main _t = do
diff --git a/tests/GetDirContents001.hs b/tests/GetDirContents001.hs
--- a/tests/GetDirContents001.hs
+++ b/tests/GetDirContents001.hs
@@ -11,10 +11,12 @@
 main _t = do
   createDirectory dir
   T(expectEq) () specials . sort =<< getDirectoryContents dir
+  T(expectEq) () [] . sort =<< listDirectory dir
   names <- for [1 .. 100 :: Int] $ \ i -> do
     let name = 'f' : show i
     writeFile (dir </> name) ""
     return name
   T(expectEq) () (sort (specials <> names)) . sort =<< getDirectoryContents dir
+  T(expectEq) () (sort names) . sort =<< listDirectory dir
   where dir      = "dir"
         specials = [".", ".."]
diff --git a/tests/TestUtils.hs b/tests/TestUtils.hs
--- a/tests/TestUtils.hs
+++ b/tests/TestUtils.hs
@@ -41,10 +41,10 @@
     dirExists <- doesDirectoryExist source
     if dirExists
       then do
-        contents <- getDirectoryContents source
+        contents <- listDirectory source
         createDirectory dest
         mapM_ (uncurry copyPathRecursive)
-          [(source </> x, dest </> x) | x <- contents, x /= "." && x /= ".."]
+          [(source </> x, dest </> x) | x <- contents]
       else copyFile source dest
 
 modifyPermissions :: FilePath -> (Permissions -> Permissions) -> IO ()
diff --git a/tests/Util.hs b/tests/Util.hs
--- a/tests/Util.hs
+++ b/tests/Util.hs
@@ -16,7 +16,7 @@
 import Control.Exception (SomeException, bracket_, catch,
                           mask, onException, try)
 import Control.Monad (Monad(..), unless, when)
-import System.Directory (createDirectory, makeAbsolute,
+import System.Directory (createDirectoryIfMissing, makeAbsolute,
                          removeDirectoryRecursive, withCurrentDirectory)
 import System.Environment (getArgs)
 import System.Exit (exitFailure)
@@ -134,7 +134,7 @@
 withNewDirectory :: Bool -> FilePath -> IO a -> IO a
 withNewDirectory keep dir action = do
   dir' <- makeAbsolute dir
-  bracket_ (createDirectory dir') (cleanup dir') action
+  bracket_ (createDirectoryIfMissing True dir') (cleanup dir') action
   where cleanup dir' | keep      = return ()
                      | otherwise = removeDirectoryRecursive dir'
 
diff --git a/tests/WithCurrentDirectory.hs b/tests/WithCurrentDirectory.hs
--- a/tests/WithCurrentDirectory.hs
+++ b/tests/WithCurrentDirectory.hs
@@ -1,7 +1,6 @@
 {-# LANGUAGE CPP #-}
 module WithCurrentDirectory where
 #include "util.inl"
-import Data.Monoid ((<>))
 import Data.List (sort)
 import System.Directory
 import System.FilePath ((</>))
@@ -10,17 +9,16 @@
 main _t = do
   createDirectory dir
   -- Make sure we're starting empty
-  T(expectEq) () specials . sort =<< getDirectoryContents dir
+  T(expectEq) () [] . sort =<< listDirectory dir
   cwd <- getCurrentDirectory
   withCurrentDirectory dir (writeFile testfile contents)
   -- Are we still in original directory?
   T(expectEq) () cwd =<< getCurrentDirectory
   -- Did the test file get created?
-  T(expectEq) () (specials <> [testfile]) . sort =<< getDirectoryContents dir
+  T(expectEq) () [testfile] . sort =<< listDirectory dir
   -- Does the file contain what we expected to write?
   T(expectEq) () contents =<< readFile (dir </> testfile)
   where
     testfile = "testfile"
     contents = "some data\n"
     dir = "dir"
-    specials = [".", ".."]
