libport: Remove the usleep() function replacement.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
db7c934f8e
commit
7b4e10c707
|
@ -17778,7 +17778,6 @@ for ac_func in \
|
||||||
readdir \
|
readdir \
|
||||||
readlink \
|
readlink \
|
||||||
sched_yield \
|
sched_yield \
|
||||||
select \
|
|
||||||
setproctitle \
|
setproctitle \
|
||||||
setprogname \
|
setprogname \
|
||||||
settimeofday \
|
settimeofday \
|
||||||
|
@ -17787,8 +17786,7 @@ for ac_func in \
|
||||||
symlink \
|
symlink \
|
||||||
sysinfo \
|
sysinfo \
|
||||||
tcdrain \
|
tcdrain \
|
||||||
thr_kill2 \
|
thr_kill2
|
||||||
usleep
|
|
||||||
|
|
||||||
do :
|
do :
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
|
|
|
@ -2187,7 +2187,6 @@ AC_CHECK_FUNCS(\
|
||||||
readdir \
|
readdir \
|
||||||
readlink \
|
readlink \
|
||||||
sched_yield \
|
sched_yield \
|
||||||
select \
|
|
||||||
setproctitle \
|
setproctitle \
|
||||||
setprogname \
|
setprogname \
|
||||||
settimeofday \
|
settimeofday \
|
||||||
|
@ -2196,8 +2195,7 @@ AC_CHECK_FUNCS(\
|
||||||
symlink \
|
symlink \
|
||||||
sysinfo \
|
sysinfo \
|
||||||
tcdrain \
|
tcdrain \
|
||||||
thr_kill2 \
|
thr_kill2
|
||||||
usleep
|
|
||||||
)
|
)
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
|
||||||
|
|
||||||
/* Maximum wait time for selection notify */
|
/* Maximum wait time for selection notify */
|
||||||
#define SELECTION_RETRIES 500 /* wait for .5 seconds */
|
#define SELECTION_RETRIES 500 /* wait for .5 seconds */
|
||||||
#define SELECTION_WAIT 1000 /* us */
|
#define SELECTION_WAIT 1 /* ms */
|
||||||
|
|
||||||
#define SELECTION_UPDATE_DELAY 2000 /* delay between checks of the X11 selection */
|
#define SELECTION_UPDATE_DELAY 2000 /* delay between checks of the X11 selection */
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ static BOOL convert_selection( Display *display, Window win, Atom selection,
|
||||||
Bool res = XCheckTypedWindowEvent( display, win, SelectionNotify, &event );
|
Bool res = XCheckTypedWindowEvent( display, win, SelectionNotify, &event );
|
||||||
if (res && event.xselection.selection == selection && event.xselection.target == format->atom)
|
if (res && event.xselection.selection == selection && event.xselection.target == format->atom)
|
||||||
return read_property( display, win, event.xselection.property, type, data, size );
|
return read_property( display, win, event.xselection.property, type, data, size );
|
||||||
usleep( SELECTION_WAIT );
|
Sleep( SELECTION_WAIT );
|
||||||
}
|
}
|
||||||
ERR( "Timed out waiting for SelectionNotify event\n" );
|
ERR( "Timed out waiting for SelectionNotify event\n" );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1691,7 +1691,7 @@ static BOOL read_property( Display *display, Window w, Atom prop,
|
||||||
if (res && xe.xproperty.atom == prop &&
|
if (res && xe.xproperty.atom == prop &&
|
||||||
xe.xproperty.state == PropertyNewValue)
|
xe.xproperty.state == PropertyNewValue)
|
||||||
break;
|
break;
|
||||||
usleep(SELECTION_WAIT);
|
Sleep(SELECTION_WAIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i >= SELECTION_RETRIES ||
|
if (i >= SELECTION_RETRIES ||
|
||||||
|
|
|
@ -762,9 +762,6 @@
|
||||||
/* Define to 1 if you have the <Security/Security.h> header file. */
|
/* Define to 1 if you have the <Security/Security.h> header file. */
|
||||||
#undef HAVE_SECURITY_SECURITY_H
|
#undef HAVE_SECURITY_SECURITY_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `select' function. */
|
|
||||||
#undef HAVE_SELECT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `setproctitle' function. */
|
/* Define to 1 if you have the `setproctitle' function. */
|
||||||
#undef HAVE_SETPROCTITLE
|
#undef HAVE_SETPROCTITLE
|
||||||
|
|
||||||
|
@ -1118,9 +1115,6 @@
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `usleep' function. */
|
|
||||||
#undef HAVE_USLEEP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <utime.h> header file. */
|
/* Define to 1 if you have the <utime.h> header file. */
|
||||||
#undef HAVE_UTIME_H
|
#undef HAVE_UTIME_H
|
||||||
|
|
||||||
|
|
|
@ -277,10 +277,6 @@ int readlink( const char *path, char *buf, size_t size );
|
||||||
int symlink(const char *from, const char *to);
|
int symlink(const char *from, const char *to);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_USLEEP
|
|
||||||
int usleep (unsigned int useconds);
|
|
||||||
#endif /* !defined(HAVE_USLEEP) */
|
|
||||||
|
|
||||||
extern int mkstemps(char *template, int suffix_len);
|
extern int mkstemps(char *template, int suffix_len);
|
||||||
|
|
||||||
#else /* NO_LIBWINE_PORT */
|
#else /* NO_LIBWINE_PORT */
|
||||||
|
@ -292,7 +288,6 @@ extern int mkstemps(char *template, int suffix_len);
|
||||||
#define lstat __WINE_NOT_PORTABLE(lstat)
|
#define lstat __WINE_NOT_PORTABLE(lstat)
|
||||||
#define pread __WINE_NOT_PORTABLE(pread)
|
#define pread __WINE_NOT_PORTABLE(pread)
|
||||||
#define pwrite __WINE_NOT_PORTABLE(pwrite)
|
#define pwrite __WINE_NOT_PORTABLE(pwrite)
|
||||||
#define usleep __WINE_NOT_PORTABLE(usleep)
|
|
||||||
|
|
||||||
#endif /* NO_LIBWINE_PORT */
|
#endif /* NO_LIBWINE_PORT */
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,4 @@ C_SRCS = \
|
||||||
pwrite.c \
|
pwrite.c \
|
||||||
readlink.c \
|
readlink.c \
|
||||||
spawn.c \
|
spawn.c \
|
||||||
symlink.c \
|
symlink.c
|
||||||
usleep.c
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
* usleep function
|
|
||||||
*
|
|
||||||
* Copyright 1996 Alexandre Julliard
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#ifndef HAVE_USLEEP
|
|
||||||
int usleep (unsigned int useconds)
|
|
||||||
{
|
|
||||||
#if defined(__EMX__)
|
|
||||||
DosSleep(useconds);
|
|
||||||
return 0;
|
|
||||||
#elif defined(__BEOS__)
|
|
||||||
return snooze(useconds);
|
|
||||||
#elif defined(HAVE_SELECT)
|
|
||||||
struct timeval delay;
|
|
||||||
|
|
||||||
delay.tv_sec = useconds / 1000000;
|
|
||||||
delay.tv_usec = useconds % 1000000;
|
|
||||||
|
|
||||||
select( 0, 0, 0, 0, &delay );
|
|
||||||
return 0;
|
|
||||||
#else /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
|
|
||||||
errno = ENOSYS;
|
|
||||||
return -1;
|
|
||||||
#endif /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
|
|
||||||
}
|
|
||||||
#endif /* HAVE_USLEEP */
|
|
Loading…
Reference in New Issue