getTempFifo :: String -> IO FilePath
getTempFifo f = do
  tmpDir <- getTemporaryDirectory
  (tmpFile, hdl) <- openTempFile tmpDir f
  hClose hdl
  removeFile tmpFile
  createNamedPipe tmpFile $ unionFileModes ownerReadMode ownerWriteMode
  return tmpFile
#else
getTempFifo :: String -> IO FilePath
getTempFifo _ = return ""
#endif

#ifdef UNIX
getTempFifo :: String -> IO FilePath
getTempFifo f = do
  tmpDir <- getTemporaryDirectory
  (tmpFile, hdl) <- openTempFile tmpDir f
  hClose hdl
  removeFile tmpFile
  createNamedPipe tmpFile $ unionFileModes ownerReadMode ownerWriteMode
  return tmpFile
#else
getTempFifo :: String -> IO FilePath
getTempFifo _ = return ""
#endif

#ifdef UNIX
getTempFifo f = do
  tmpDir <- getTemporaryDirectory
  (tmpFile, hdl) <- openTempFile tmpDir f
  hClose hdl
  removeFile tmpFile
  createNamedPipe tmpFile $ unionFileModes ownerReadMode ownerWriteMode
  return tmpFile
#else
getTempFifo :: String -> IO FilePath
getTempFifo _ = return ""
#endif

#ifdef UNIX