head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.40 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.38 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.36 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.34 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.32 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.30 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.28 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.26 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.24 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.22 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.20 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.18 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.16 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.14 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.12 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.10 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.8 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.6 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.4 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.2 pkgsrc-2021Q2-base:1.2; locks; strict; comment @# @; 1.2 date 2021.05.05.16.38.40; author pho; state Exp; branches; next 1.1; commitid RIafGeZ4LzuKLYRC; 1.1 date 2021.05.05.16.18.07; author pho; state Exp; branches; next ; commitid 4nuGT95uUm4HEYRC; desc @@ 1.2 log @Fix several linker warnings @ text @$NetBSD: patch-Foundation_System_Bindings_Posix.hsc,v 1.1 2021/05/05 16:18:07 pho Exp $ * dirfd(3) is a macro on NetBSD. It doesn't exist as a symbol in libc. * Suppress linker warnings about compatibility syscall wrappers by using "capi" instead of "ccall". --- Foundation/System/Bindings/Posix.hsc.orig 2019-09-02 03:58:08.000000000 +0000 +++ Foundation/System/Bindings/Posix.hsc @@@@ -27,8 +27,8 @@@@ import Foundation.System.Bindings.PosixD #include #include -data CDir -data CDirent +data {-# CTYPE "dirent.h" "DIR" #-} CDir +data {-# CTYPE "dirent.h" "struct dirent" #-} CDirent sysPosix_E2BIG , sysPosix_EACCES @@@@ -312,7 +312,7 @@@@ foreign import ccall unsafe "madvise" sysPosixMadvise :: Ptr a -> CSize -> CMemAdvice -> IO CInt #endif -foreign import ccall unsafe "msync" +foreign import capi unsafe "sys/mman.h msync" sysPosixMsync :: Ptr a -> CSize -> CMemSyncFlags -> IO CInt foreign import ccall unsafe "mprotect" @@@@ -361,13 +361,13 @@@@ foreign import ccall unsafe "ftruncate" -- directories -------------------------------------------------------------------------------- -foreign import ccall unsafe "opendir" +foreign import capi unsafe "dirent.h opendir" sysPosixOpendir :: Ptr CChar -> IO (Ptr CDir) foreign import ccall unsafe "fdopendir" sysPosixFdopendir :: CFd -> IO (Ptr CDir) -foreign import ccall unsafe "readdir" +foreign import capi unsafe "dirent.h readdir" sysPosixReaddir :: Ptr CDir -> IO (Ptr CDirent) -foreign import ccall unsafe "readdir_r" +foreign import capi unsafe "dirent.h readdir_r" sysPosixReaddirR :: Ptr CDir -> Ptr CDirent -> Ptr (Ptr CDirent) -> IO CInt foreign import ccall unsafe "telldir" sysPosixTelldir :: Ptr CDir -> IO CLong @@@@ -377,5 +377,5 @@@@ foreign import ccall unsafe "rewinddir" sysPosixRewinddir :: Ptr CDir -> IO () foreign import ccall unsafe "closedir" sysPosixClosedir :: Ptr CDir -> IO CInt -foreign import ccall unsafe "dirfd" +foreign import capi unsafe "dirent.h dirfd" sysPosixDirfd :: Ptr CDir -> IO CFd @ 1.1 log @Fix reference to undefined symbol "dirfd" on NetBSD @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 dirfd(3) is a macro on NetBSD. It doesn't exist as a symbol in libc. d5 4 a8 1 --- Foundation/System/Bindings/Posix.hsc.orig 2021-05-05 16:09:20.261233488 +0000 d10 1 a10 1 @@@@ -27,7 +27,7 @@@@ import Foundation.System.Bindings.PosixD d15 1 d17 1 a17 1 data CDirent d20 27 @