Changeset 1486


Ignore:
Timestamp:
Jun 17, 2012, 12:32:45 AM (8 years ago)
Author:
sam
Message:

build: a few hacks to allow building with MinGW on Windows.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/lol-build

    r1485 r1486  
    153153            GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
    154154
    155             CPPFLAGS="$CPPFLAGS -L$PWD/contrib/libcaca-0.99.beta18/include -DCACA_STATIC"
     155            CPPFLAGS="$CPPFLAGS -I$PWD/contrib/libcaca-0.99.beta18/include -DCACA_STATIC"
    156156
    157157            PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS"
  • trunk/neercs/neercs.cpp

    r1481 r1486  
    3232#endif
    3333
     34#include <time.h>
     35
    3436#include <caca.h>
    3537
     
    4244#include "neercs.h"
    4345#include "video/render.h"
     46
     47/* FIXME: ugly MinGW hack */
     48#if defined _WIN32 && defined __GNUC__
     49extern "C"
     50{
     51int sprintf_s(char *s, size_t n, const char *fmt, ...)
     52{
     53    va_list args;
     54    int ret;
     55    va_start(args, fmt);
     56    ret = vsnprintf(s, n, fmt, args);
     57    va_end(args);
     58    return ret;
     59}
     60
     61int vsnprintf_s(char *s, size_t n, size_t c, const char *fmt, va_list args)
     62{
     63    return vsnprintf(s, n, fmt, args);
     64}
     65
     66int _time32(__time32_t *timer)
     67{
     68    return 0;
     69}
     70}
     71#endif
    4472
    4573Neercs::Neercs()
  • trunk/tools/make-font.cpp

    r100 r1486  
    1212
    1313#include <caca.h>
     14
     15/* FIXME: ugly MinGW hack */
     16#if defined _WIN32 && defined __GNUC__
     17extern "C"
     18{
     19int sprintf_s(char *s, size_t n, const char *fmt, ...)
     20{
     21    va_list args;
     22    int ret;
     23    va_start(args, fmt);
     24    ret = vsnprintf(s, n, fmt, args);
     25    va_end(args);
     26    return ret;
     27}
     28
     29int vsnprintf_s(char *s, size_t n, size_t c, const char *fmt, va_list args)
     30{
     31    return vsnprintf(s, n, fmt, args);
     32}
     33
     34int _time32(__time32_t *timer)
     35{
     36    return 0;
     37}
     38}
     39#endif
    1440
    1541int main(void)
Note: See TracChangeset for help on using the changeset viewer.