Edit

kc3-lang/libevent/test/tinytest_local.h

Branch :

  • Show log

    Commit

  • Author : Nick Mathewson
    Date : 2012-01-24 16:08:00
    Hash : 95e2455c
    Message : When including an -internal.h header outside the main tree, do so early Some of our unit tests and sample code need functions and structures defined in an -internal.h header. But that can freak out OpenSolaris, where stdio.h wants to define _FILE_OFFSET_BITS unless it's already defined, and then evconfig-internal.h defines it. Regular users should never ever use our -internal.h headers, so the solution is to make sure that if we're going to use them ourselves, we do so before system headers.

  • test/tinytest_local.h
  • #include "util-internal.h"
    #ifdef _WIN32
    #include <winsock2.h>
    #endif
    
    #include "event2/util.h"
    
    #ifdef snprintf
    #undef snprintf
    #endif
    #define snprintf evutil_snprintf