mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
because usleep() is deprecated.
This commit is contained in:
parent
e4489f1db2
commit
996046aed5
5
ANNOUNCE
5
ANNOUNCE
@ -33,8 +33,11 @@ Version 1.6.14beta01 [September 14, 2014]
|
|||||||
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
||||||
|
|
||||||
Version 1.6.14beta02 [September 14, 2014]
|
Version 1.6.14beta02 [September 14, 2014]
|
||||||
|
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
||||||
|
because usleep() is deprecated.
|
||||||
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
||||||
in unistd.h; fixes error introduced in libpng-1.6.13.
|
in unistd.h and nanosleep() is not available; fixes error introduced
|
||||||
|
in libpng-1.6.13.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
5
CHANGES
5
CHANGES
@ -4986,8 +4986,11 @@ Version 1.6.14beta01 [September 14, 2014]
|
|||||||
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
||||||
|
|
||||||
Version 1.6.14beta02 [September 14, 2014]
|
Version 1.6.14beta02 [September 14, 2014]
|
||||||
|
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
||||||
|
because usleep() is deprecated.
|
||||||
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
||||||
in unistd.h; fixes error introduced in libpng-1.6.13.
|
in unistd.h and nanosleep() is not available; fixes error introduced
|
||||||
|
in libpng-1.6.13.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
@ -115,8 +115,15 @@
|
|||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <X11/keysym.h> /* defines XK_* macros */
|
#include <X11/keysym.h> /* defines XK_* macros */
|
||||||
|
|
||||||
/* This is temporary until the code is rewritten to use nanosleep(). */
|
#if _POSIX_C_SOURCE >= 199309L /* have nanosleep() */
|
||||||
#ifndef usleep
|
# undef usleep
|
||||||
|
# define usleep(usec) { \
|
||||||
|
struct timespec ts; \
|
||||||
|
ts.tv_nsec = (usec) * 1000; \
|
||||||
|
nanosleep(&ts, NULL); }
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#ifndef usleep /* have neither nanosleep() nor usleep() */
|
||||||
# define usleep(x) sleep(((x)+499999)/1000000)
|
# define usleep(x) sleep(((x)+499999)/1000000)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user