Class WinLibCAdapter

  • All Implemented Interfaces:
    Native.LibC, jnr.ffi.provider.LoadedLibrary

    public final class WinLibCAdapter
    extends Object
    implements Native.LibC, jnr.ffi.provider.LoadedLibrary
    MSVCRT.DLL only supports some LibC functions, but the symbols are different. This adapter maps the MSVCRT.DLL names to standard LibC names
    • Method Detail

      • close

        public int close​(int fd)
        Specified by:
        close in interface Native.LibC
      • read

        public int read​(int fd,
                        byte[] data,
                        long size)
        Specified by:
        read in interface Native.LibC
      • write

        public int write​(int fd,
                         byte[] data,
                         long size)
        Specified by:
        write in interface Native.LibC
      • pipe

        public int pipe​(int[] fds)
        Specified by:
        pipe in interface Native.LibC
      • getRuntime

        public jnr.ffi.Runtime getRuntime()
        Specified by:
        getRuntime in interface jnr.ffi.provider.LoadedLibrary
      • fcntl

        public int fcntl​(int fd,
                         int cmd,
                         int data)
        Specified by:
        fcntl in interface Native.LibC
      • poll

        public int poll​(jnr.ffi.Pointer pfds,
                        int nfds,
                        int timeout)
        Specified by:
        poll in interface Native.LibC
      • kevent

        public int kevent​(int kq,
                          jnr.ffi.Pointer changebuf,
                          int nchanges,
                          jnr.ffi.Pointer eventbuf,
                          int nevents,
                          Native.Timespec timeout)
        Specified by:
        kevent in interface Native.LibC
      • shutdown

        public int shutdown​(int s,
                            int how)
        Specified by:
        shutdown in interface Native.LibC