1
0
Fork 0
forked from fte/fteqw

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:
Lance 2010-11-11 09:06:36 +00:00
parent 89dae21703
commit 3f95205577
4 changed files with 82 additions and 5 deletions

View file

@ -23,10 +23,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#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 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");

View file

@ -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

14
engine/libs/jversion.h Normal file
View 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"

View 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"