Ignore:
Timestamp:
Jan 13, 2004, 10:55:32 AM (18 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + Check for sys/times.h and unistd.h. + Added calls to AC_C_CONST and AC_C_INLINE.
  • src/time.c src/graphics.c: + Fixes for MSVC compilation warnings. + Additional sanity checks in the Win32 driver.
  • src/caca.c: + Use raw()/noraw() in the curses driver instead of cbreak().
  • msvc/libcaca.sln: + Added an MSVC solution.
  • examples/aafire.c: + Slightly reduced the maximum cacafire framerate.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/time.c

    r338 r344  
    3131
    3232#include <stdlib.h>
    33 #include <sys/time.h>
     33#if defined(HAVE_SYS_TIME_H)
     34#   include <sys/time.h>
     35#endif
    3436#include <time.h>
    3537
     
    3840#endif
    3941
    40 #include <unistd.h>
     42#if defined(HAVE_UNISTD_H)
     43#   include <unistd.h>
     44#endif
    4145
    4246#include "caca.h"
     
    5963    struct timeval tv;
    6064#elif defined(USE_WIN32)
    61     static long long int freq = -1;
    62     unsigned long long int usec;
     65    static __int64 freq = -1;
     66    unsigned __int64 usec;
    6367#endif
    6468    unsigned int ticks = 0;
     
    7781
    7882    QueryPerformanceCounter((LARGE_INTEGER *)&usec);
    79     new_sec = usec * 1000000 / freq / 1000000;
    80     new_usec = (usec * 1000000 / freq) % 1000000;
     83    new_sec = (int)(usec * 1000000 / freq / 1000000);
     84    new_usec = (int)((usec * 1000000 / freq) % 1000000);
    8185#endif
    8286
Note: See TracChangeset for help on using the changeset viewer.