aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--System/Posix/Files.hsc2
-rw-r--r--System/Posix/Files/ByteString.hsc2
-rw-r--r--cbits/HsUnix.c6
-rw-r--r--include/HsUnix.h3
4 files changed, 2 insertions, 11 deletions
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc
index 2df973d..d0ff4bf 100644
--- a/System/Posix/Files.hsc
+++ b/System/Posix/Files.hsc
@@ -215,7 +215,7 @@ createDevice path mode dev =
withFilePath path $ \s ->
throwErrnoPathIfMinus1_ "createDevice" path (c_mknod s mode dev)
-foreign import ccall unsafe "__hsunix_mknod"
+foreign import capi unsafe "HsUnix.h mknod"
c_mknod :: CString -> CMode -> CDev -> IO CInt
-- -----------------------------------------------------------------------------
diff --git a/System/Posix/Files/ByteString.hsc b/System/Posix/Files/ByteString.hsc
index e560500..12bd39a 100644
--- a/System/Posix/Files/ByteString.hsc
+++ b/System/Posix/Files/ByteString.hsc
@@ -221,7 +221,7 @@ createDevice path mode dev =
withFilePath path $ \s ->
throwErrnoPathIfMinus1_ "createDevice" path (c_mknod s mode dev)
-foreign import ccall unsafe "__hsunix_mknod"
+foreign import capi unsafe "HsUnix.h mknod"
c_mknod :: CString -> CMode -> CDev -> IO CInt
-- -----------------------------------------------------------------------------
diff --git a/cbits/HsUnix.c b/cbits/HsUnix.c
index 74112c0..dc42098 100644
--- a/cbits/HsUnix.c
+++ b/cbits/HsUnix.c
@@ -16,12 +16,6 @@ void *__hsunix_rtldNext (void) {return RTLD_NEXT;}
void *__hsunix_rtldDefault (void) {return RTLD_DEFAULT;}
#endif
-// mknod is a macro on some platforms, so we need a wrapper:
-int __hsunix_mknod(const char *pathname, mode_t mode, dev_t dev)
-{
- return mknod(pathname,mode,dev);
-}
-
#ifdef HAVE_GETPWENT
// getpwent is a macro on some platforms, so we need a wrapper:
struct passwd *__hsunix_getpwent(void)
diff --git a/include/HsUnix.h b/include/HsUnix.h
index def34ca..87ac3e6 100644
--- a/include/HsUnix.h
+++ b/include/HsUnix.h
@@ -113,9 +113,6 @@ fall back to O_FSYNC, which should be the same */
# define WCOREDUMP(s) 0
#endif
-// mknod is a macro on some platforms, so we need a wrapper:
-int __hsunix_mknod(const char *pathname, mode_t mode, dev_t dev);
-
#ifdef HAVE_GETPWENT
// getpwent is a macro on some platforms, so we need a wrapper:
struct passwd *__hsunix_getpwent(void);