• Show log

    Commit

  • Hash : e8eecfd3
    Author : Eric Blake
    Date : 2009-11-17T09:24:56

    usleep: new module
    
    mingw usleep(1000000) failed with EINVAL, as allowed by POSIX,
    but contrary to GNU usage.  Rather than implement an accurate
    usleep based on select or nanosleep, both of which drag in
    dependencies on external libraries, this version intentionally
    takes the ceiling in seconds if usleep() is missing.
    
    * modules/usleep: New file.
    * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
    * lib/usleep.c (usleep): Likewise.
    * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
    * modules/unistd (Makefile.am): Substitute witnesses.
    * lib/unistd.in.h (usleep): Add declaration.
    * doc/pastposix-functions/usleep.texi (usleep): Document this.
    * MODULES.html.sh (Date and time): Likewise.
    * modules/usleep-tests (Depends-on): New test.
    * tests/test-usleep.c: New file.
    
    Signed-off-by: Eric Blake <ebb9@byu.net>