[libpng16] Only define usleep() in gregbook/rpng2-x.c if not already defined.

This commit is contained in:
Glenn Randers-Pehrson 2014-09-14 14:53:09 -05:00
parent 3fe1616c45
commit e4489f1db2
3 changed files with 9 additions and 3 deletions

View File

@ -33,6 +33,8 @@ Version 1.6.14beta01 [September 14, 2014]
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
Version 1.6.14beta02 [September 14, 2014]
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
in unistd.h; fixes error introduced in libpng-1.6.13.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4986,6 +4986,8 @@ Version 1.6.14beta01 [September 14, 2014]
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
Version 1.6.14beta02 [September 14, 2014]
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
in unistd.h; fixes error introduced in libpng-1.6.13.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -103,9 +103,6 @@
#define RESNAME "rpng2" /* our X resource application name */
#define RESCLASS "Rpng" /* our X resource class name */
/* This is temporary until the code is rewritten to use nanosleep(). */
#define usleep(x) sleep(((x)+499999)/1000000)
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@ -118,6 +115,11 @@
#include <X11/Xos.h>
#include <X11/keysym.h> /* defines XK_* macros */
/* This is temporary until the code is rewritten to use nanosleep(). */
#ifndef usleep
# define usleep(x) sleep(((x)+499999)/1000000)
#endif
#ifdef VMS
# include <unistd.h>
#endif