atheme/libmowgli-2 — pull request #20 by binki (2013-04-04 16:18:37+00:00)
Title: Drop #define usleep() which can conflict with mingw-w64’s usleep() prototype

If the user has:

#include
#include

compiling that program under mingw-w64 will fail with an error in unistd.h caused by the macro being expanded in mingw-w64’s prototype declaration for usleep().

This pull request has two parts. The first ensures that POSIX is respected to only pass a maximum value of 999999 to usleep() when usleep() is called in a likely very-seldom-used eventloop function (mowgli_null_eventloop_select()). This is necessary because the mingw-w64-provided version of usleep() respects this POSIX specification even when the implementation most people are used to, such as the Linux one, takes any value for usleep(). The second part just drops the declaration from win32_stdinc.h.