ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.166 by root, Tue Jun 3 03:48:10 2008 UTC vs.
Revision 1.169 by root, Fri Jun 20 23:31:19 2008 UTC

1662will be no polling. 1662will be no polling.
1663 1663
1664=head3 ABI Issues (Largefile Support) 1664=head3 ABI Issues (Largefile Support)
1665 1665
1666Libev by default (unless the user overrides this) uses the default 1666Libev by default (unless the user overrides this) uses the default
1667compilation environment, which means that on systems with optionally 1667compilation environment, which means that on systems with large file
1668disabled large file support, you get the 32 bit version of the stat 1668support disabled by default, you get the 32 bit version of the stat
1669structure. When using the library from programs that change the ABI to 1669structure. When using the library from programs that change the ABI to
1670use 64 bit file offsets the programs will fail. In that case you have to 1670use 64 bit file offsets the programs will fail. In that case you have to
1671compile libev with the same flags to get binary compatibility. This is 1671compile libev with the same flags to get binary compatibility. This is
1672obviously the case with any flags that change the ABI, but the problem is 1672obviously the case with any flags that change the ABI, but the problem is
1673most noticeably with ev_stat and large file support. 1673most noticeably disabled with ev_stat and large file support.
1674
1675The solution for this is to lobby your distribution maker to make large
1676file interfaces available by default (as e.g. FreeBSD does) and not
1677optional. Libev cannot simply switch on large file support because it has
1678to exchange stat structures with application programs compiled using the
1679default compilation environment.
1674 1680
1675=head3 Inotify 1681=head3 Inotify
1676 1682
1677When C<inotify (7)> support has been compiled into libev (generally only 1683When C<inotify (7)> support has been compiled into libev (generally only
1678available on Linux) and present at runtime, it will be used to speed up 1684available on Linux) and present at runtime, it will be used to speed up
3326more than a hundred or so sockets, then likely it needs to use a totally 3332more than a hundred or so sockets, then likely it needs to use a totally
3327different implementation for windows, as libev offers the POSIX readiness 3333different implementation for windows, as libev offers the POSIX readiness
3328notification model, which cannot be implemented efficiently on windows 3334notification model, which cannot be implemented efficiently on windows
3329(Microsoft monopoly games). 3335(Microsoft monopoly games).
3330 3336
3337A typical way to use libev under windows is to embed it (see the embedding
3338section for details) and use the following F<evwrap.h> header file instead
3339of F<ev.h>:
3340
3341 #define EV_STANDALONE /* keeps ev from requiring config.h */
3342 #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */
3343
3344 #include "ev.h"
3345
3346And compile the following F<evwrap.c> file into your project (make sure
3347you do I<not> compile the F<ev.c> or any other embedded soruce files!):
3348
3349 #include "evwrap.h"
3350 #include "ev.c"
3351
3331=over 4 3352=over 4
3332 3353
3333=item The winsocket select function 3354=item The winsocket select function
3334 3355
3335The winsocket C<select> function doesn't follow POSIX in that it 3356The winsocket C<select> function doesn't follow POSIX in that it
3336requires socket I<handles> and not socket I<file descriptors> (it is 3357requires socket I<handles> and not socket I<file descriptors> (it is
3337also extremely buggy). This makes select very inefficient, and also 3358also extremely buggy). This makes select very inefficient, and also
3338requires a mapping from file descriptors to socket handles. See the 3359requires a mapping from file descriptors to socket handles (the Microsoft
3360C runtime provides the function C<_open_osfhandle> for this). See the
3339discussion of the C<EV_SELECT_USE_FD_SET>, C<EV_SELECT_IS_WINSOCKET> and 3361discussion of the C<EV_SELECT_USE_FD_SET>, C<EV_SELECT_IS_WINSOCKET> and
3340C<EV_FD_TO_WIN32_HANDLE> preprocessor symbols for more info. 3362C<EV_FD_TO_WIN32_HANDLE> preprocessor symbols for more info.
3341 3363
3342The configuration for a "naked" win32 using the Microsoft runtime 3364The configuration for a "naked" win32 using the Microsoft runtime
3343libraries and raw winsocket select is: 3365libraries and raw winsocket select is:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines