mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Only define usleep() in gregbook/rpng2-x.c if not already defined.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user