Libeio on the windows

What is required for the libeio port in windows?

+6
c windows systems-programming
source share
2 answers

Almost a year later, what you might want to learn (you or someone else finding it through search or Google), libuv , formerly liboio. Contrary to the accepted answer, it is not so much that Windows, at that time, was deprived of the concept of eventual input-output, it simply was not known outside the secret circle of deep knowledge of the Windows API Developers. In Windows, a similar concept is implemented as I / O Completion Ports , so it’s not that the libeio / port / fork / analog version would have to re-profile the wheel, it would just have to have an libeio-like API, that used IOCP under the hood.

+7
source share

Libeio uses the unix APIs and unix, which are unknown in the Windows world. The solutions you have:

  • use the unix abstraction layer for windows: for example cygwin or Windows Services for Unix . But even with these layers, you will have difficulty running libeio code, since there are many system-dependent code, for example:
  # if __FreeBSD__ ||  defined __NetBSD__ ||  defined __OpenBSD__
 # define _DIRENT_HAVE_D_TYPE / * sigh * /
 # define D_INO (de) (de) -> d_fileno
 # define D_NAMLEN (de) (de) -> d_namlen
 # elif __linux ||  defined d_ino ||  _XOPEN_SOURCE> = 600
 # define D_INO (de) (de) -> d_ino
 # endif
  • rewrite libeio using a portable abstraction library like GTK + ( glib ), wxWidgets or Qt . Thoses infrastructures have already implemented a powerful API for low-level procedures, communication services, I / O channels and asynchronous queues. The developers of this framework have worked hard to ensure portability of their code. You do not need to reinvent the wheel.

Definitely the second solution is the best, given the relatively small size of eio.c, the only C libeio file.

+1
source share

All Articles