Fix for MSVC 2008 & 2010 (structs the 7.x SDK already defines), "version" now displays loaded static libraries version info
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3645 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
89dae21703
commit
3f95205577
4 changed files with 82 additions and 5 deletions
|
@ -23,10 +23,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
// 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 <png.h>
|
||||||
|
#endif
|
||||||
|
#ifdef AVAIL_ZLIB
|
||||||
|
#include <zlib.h>
|
||||||
|
#endif
|
||||||
|
#if defined(AVAIL_JPEGLIB) && !defined(SERVERONLY)
|
||||||
|
#include <jversion.h>
|
||||||
|
#include <jpeglib.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef malloc
|
#undef malloc
|
||||||
#undef free
|
#undef free
|
||||||
|
@ -3145,15 +3179,24 @@ void COM_Version_f (void)
|
||||||
//print out which libraries are disabled
|
//print out which libraries are disabled
|
||||||
#ifndef AVAIL_ZLIB
|
#ifndef AVAIL_ZLIB
|
||||||
Con_Printf("zlib disabled\n");
|
Con_Printf("zlib disabled\n");
|
||||||
|
#else
|
||||||
|
Con_Printf("zlib: %s\n", ZLIB_VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//but print client ones only if we're not dedicated
|
//but print client ones only if we're not dedicated
|
||||||
#ifndef SERVERONLY
|
#ifndef SERVERONLY
|
||||||
#ifndef AVAIL_PNGLIB
|
#ifndef AVAIL_PNGLIB
|
||||||
Con_Printf("libpng disabled\n");
|
Con_Printf("libpng disabled\n");
|
||||||
|
#else
|
||||||
|
Con_Printf("libPNG %s -%s", PNG_LIBPNG_VER_STRING, PNG_HEADER_VERSION_STRING);
|
||||||
#endif
|
#endif
|
||||||
#ifndef AVAIL_JPEGLIB
|
#ifndef AVAIL_JPEGLIB
|
||||||
Con_Printf("libjpeg disabled\n");
|
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
|
#endif
|
||||||
#ifndef AVAIL_OGGVORBIS
|
#ifndef AVAIL_OGGVORBIS
|
||||||
Con_Printf("libvorbis disabled\n");
|
Con_Printf("libvorbis disabled\n");
|
||||||
|
|
|
@ -20,7 +20,11 @@
|
||||||
#ifndef IPPROTO_IPV6
|
#ifndef IPPROTO_IPV6
|
||||||
/*for msvc6*/
|
/*for msvc6*/
|
||||||
#define IPPROTO_IPV6
|
#define IPPROTO_IPV6
|
||||||
|
|
||||||
|
#ifndef EAI_NONAME
|
||||||
#define EAI_NONAME 8
|
#define EAI_NONAME 8
|
||||||
|
#endif
|
||||||
|
|
||||||
struct ip6_scope_id
|
struct ip6_scope_id
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
|
@ -33,6 +37,8 @@
|
||||||
u_long Value;
|
u_long Value;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !(_MSC_VER >= 1500)
|
||||||
struct in6_addr
|
struct in6_addr
|
||||||
{
|
{
|
||||||
u_char s6_addr[16]; /* IPv6 address */
|
u_char s6_addr[16]; /* IPv6 address */
|
||||||
|
@ -49,7 +55,6 @@
|
||||||
struct ip6_scope_id sin6_scope_struct;
|
struct ip6_scope_id sin6_scope_struct;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct addrinfo
|
struct addrinfo
|
||||||
{
|
{
|
||||||
int ai_flags;
|
int ai_flags;
|
||||||
|
@ -62,6 +67,7 @@
|
||||||
struct addrinfo * ai_next;
|
struct addrinfo * ai_next;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
14
engine/libs/jversion.h
Normal file
14
engine/libs/jversion.h
Normal file
|
@ -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"
|
14
engine/libs/mingw-libs/jversion.h
Normal file
14
engine/libs/mingw-libs/jversion.h
Normal file
|
@ -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"
|
Loading…
Reference in a new issue