{-# LINE 1 "System/Xattr/CFuncs.hsc" #-}

{-# LINE 2 "System/Xattr/CFuncs.hsc" #-}
module System.Xattr.CFuncs where

import Foreign.C
import Foreign.Ptr

{-# LINE 9 "System/Xattr/CFuncs.hsc" #-}
import System.Posix.Types

type Void = CChar


{-# LINE 56 "System/Xattr/CFuncs.hsc" #-}

-- We assume Linux.

foreign import ccall unsafe "setxattr" c_setxattr :: CString -> CString -> Ptr Void -> CSize -> CInt -> IO CInt
foreign import ccall unsafe "lsetxattr" c_lsetxattr :: CString -> CString -> Ptr Void -> CSize -> CInt -> IO CInt
foreign import ccall unsafe "fsetxattr" c_fsetxattr :: CInt -> CString -> Ptr Void -> CSize -> CInt -> IO CInt

foreign import ccall unsafe "getxattr" c_getxattr :: CString -> CString -> Ptr Void -> CSize -> IO CSize
foreign import ccall unsafe "lgetxattr" c_lgetxattr :: CString -> CString -> Ptr Void -> CSize -> IO CSize
foreign import ccall unsafe "fgetxattr" c_fgetxattr :: CInt -> CString -> Ptr Void -> CSize -> IO CSize

foreign import ccall unsafe "listxattr" c_listxattr :: CString -> CString -> CSize -> IO CSsize
foreign import ccall unsafe "llistxattr" c_llistxattr :: CString -> CString -> CSize -> IO CSsize
foreign import ccall unsafe "flistxattr" c_flistxattr :: CInt -> CString -> CSize -> IO CSsize


{-# LINE 72 "System/Xattr/CFuncs.hsc" #-}