Changeset 338 for libcaca/trunk


Ignore:
Timestamp:
Jan 12, 2004, 3:01:40 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + Better win32 check for Sleep().
Location:
libcaca/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r337 r338  
    3131AC_CHECK_HEADERS(inttypes.h endian.h)
    3232AC_CHECK_FUNCS(vsnprintf getenv putenv strcasecmp usleep gettimeofday)
    33 case "${target_os}" in
    34   *mingw32*|*cygwin*)
    35     AC_CHECK_LIB(kernel32, Sleep,
    36                  [AC_DEFINE(HAVE_KERNEL32_SLEEP, 1, [Define if you have Windows' Sleep])])
    37     ;;
    38 esac
     33AC_MSG_CHECKING(for Sleep)
     34AC_TRY_COMPILE([#include <windows.h>],[Sleep(42);],
     35 [AC_MSG_RESULT(yes)
     36  AC_DEFINE(HAVE_SLEEP, 1, [Define if you have Windows' Sleep])],
     37 [AC_MSG_RESULT(no)])
    3938AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
    4039
  • libcaca/trunk/src/time.c

    r337 r338  
    4747#if defined(HAVE_USLEEP)
    4848        usleep(usec);
    49 #elif defined(HAVE_KERNEL32_SLEEP)
     49#elif defined(HAVE_SLEEP)
    5050        Sleep(usec / 1000);
    5151#else
Note: See TracChangeset for help on using the changeset viewer.