diff --git a/engine/common/common.c b/engine/common/common.c index 70dce25a4..6892ef902 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -23,10 +23,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include +// These 4 libraries required for the version command - - - +#if defined(MINGW) + #if defined(AVAIL_PNGLIB) && !defined(SERVERONLY) + #include "./mingw-libs/png.h" + #endif + #ifdef AVAIL_ZLIB + #include "./mingw-libs/zlib.h" + #endif + #if defined(AVAIL_JPEGLIB) && !defined(SERVERONLY) + #define JPEG_API VARGS + #include "./mingw-libs/jversion.h" + #include "./mingw-libs/jpeglib.h" + #endif +#elif defined(_WIN32) + #if defined(AVAIL_PNGLIB) && !defined(SERVERONLY) + #include "png.h" + #endif + #ifdef AVAIL_ZLIB + #include "zlib.h" + #endif + #if defined(AVAIL_JPEGLIB) && !defined(SERVERONLY) + #define JPEG_API VARGS + #include "jversion.h" + #include "jpeglib.h" + #endif +#else + #if defined(AVAIL_PNGLIB) && !defined(SERVERONLY) + #include + #endif + #ifdef AVAIL_ZLIB + #include + #endif + #if defined(AVAIL_JPEGLIB) && !defined(SERVERONLY) + #include + #include + #endif +#endif #undef malloc #undef free @@ -3145,15 +3179,24 @@ void COM_Version_f (void) //print out which libraries are disabled #ifndef AVAIL_ZLIB Con_Printf("zlib disabled\n"); +#else + Con_Printf("zlib: %s\n", ZLIB_VERSION); #endif + + //but print client ones only if we're not dedicated #ifndef SERVERONLY #ifndef AVAIL_PNGLIB Con_Printf("libpng disabled\n"); +#else + Con_Printf("libPNG %s -%s", PNG_LIBPNG_VER_STRING, PNG_HEADER_VERSION_STRING); #endif #ifndef AVAIL_JPEGLIB Con_Printf("libjpeg disabled\n"); +#else + //Con_Printf("libjpeg: %i series (%s)\n", ( JPEG_LIB_VERSION / 10 ), JVERSION ); + Con_Printf("libjpeg: %s\n", JVERSION ); #endif #ifndef AVAIL_OGGVORBIS Con_Printf("libvorbis disabled\n"); diff --git a/engine/common/netinc.h b/engine/common/netinc.h index 8e1f42dc8..ed02fc5d9 100644 --- a/engine/common/netinc.h +++ b/engine/common/netinc.h @@ -20,7 +20,11 @@ #ifndef IPPROTO_IPV6 /*for msvc6*/ #define IPPROTO_IPV6 - #define EAI_NONAME 8 + + #ifndef EAI_NONAME + #define EAI_NONAME 8 + #endif + struct ip6_scope_id { union @@ -33,6 +37,8 @@ u_long Value; }; }; + + #if !(_MSC_VER >= 1500) struct in6_addr { u_char s6_addr[16]; /* IPv6 address */ @@ -49,7 +55,6 @@ struct ip6_scope_id sin6_scope_struct; }; }; - struct addrinfo { int ai_flags; @@ -61,6 +66,7 @@ struct sockaddr * ai_addr; struct addrinfo * ai_next; }; + #endif #endif #else diff --git a/engine/libs/jversion.h b/engine/libs/jversion.h new file mode 100644 index 000000000..daf9db243 --- /dev/null +++ b/engine/libs/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "8b 16-May-2010" + +#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding" diff --git a/engine/libs/mingw-libs/jversion.h b/engine/libs/mingw-libs/jversion.h new file mode 100644 index 000000000..daf9db243 --- /dev/null +++ b/engine/libs/mingw-libs/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "8b 16-May-2010" + +#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding"