From 0152053e5228b6a380f60da1b0b5a2edcf3506e3 Mon Sep 17 00:00:00 2001 From: TTimo Date: Fri, 26 Nov 2010 06:46:05 +0000 Subject: [PATCH] fix Linux compile from mhash stuff git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@339 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- SConscript.q3map2 | 2 +- config.py | 2 +- libs/md4lib.h | 38 +++++++++++++++++++++----------------- libs/md5lib/md4.c | 4 ---- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/SConscript.q3map2 b/SConscript.q3map2 index 963f51af..30ba5cbe 100644 --- a/SConscript.q3map2 +++ b/SConscript.q3map2 @@ -10,7 +10,7 @@ Import( [ 'utils', 'config', 'settings', 'lib_objects' ] ) env = Environment() settings.SetupEnvironment( env, config['name'] ) env.Prepend( CPPPATH = [ '#tools/quake3/common' ] ) -env.Append( LIBS = [ 'pthread', 'png', 'jpeg', 'mhash' ] ) +env.Append( LIBS = [ 'pthread', 'png', 'jpeg' ] ) proj = utils.vcproj( os.path.join( GetLaunchDir(), 'tools/quake3/q3map2/q3map2.vcproj' ) ) objects = lib_objects objects += [ os.path.join( 'tools/quake3/q3map2', i ) for i in proj.getSourceFiles() ] diff --git a/config.py b/config.py index 5c6c150d..563dab65 100644 --- a/config.py +++ b/config.py @@ -158,7 +158,7 @@ class Config: build_dir = os.path.join( 'build', config_name, 'q3map2' ) BuildDir( build_dir, '.', duplicate = 0 ) lib_objects = [] - for project in [ 'libs/cmdlib/cmdlib.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib.vcproj' ]: + for project in [ 'libs/cmdlib/cmdlib.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib_VC9.vcproj' ]: Export( 'project' ) lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) ) Export( 'lib_objects' ) diff --git a/libs/md4lib.h b/libs/md4lib.h index 518a1443..a427af7d 100644 --- a/libs/md4lib.h +++ b/libs/md4lib.h @@ -9,24 +9,28 @@ #ifndef MD4_H #define MD4_H -struct hash_method { - const char *name; - /* Number of bytes that must be allocated for context */ - unsigned int context_size; - /* Number of bytes that must be allocated for result()'s digest */ - unsigned int digest_size; - - void (*init)(void *context); - void (*loop)(void *context, const void *data, size_t size); - void (*result)(void *context, unsigned char *digest_r); -}; - -const struct hash_method *hash_method_lookup(const char *name); - -/* NULL-terminated list of all hash methods */ -extern const struct hash_method *hash_methods[]; +#ifdef _WIN32 + #include "stdint.msvc.h" +#else + #include +#endif -typedef unsigned int uint_fast32_t; +struct hash_method { + const char *name; + /* Number of bytes that must be allocated for context */ + unsigned int context_size; + /* Number of bytes that must be allocated for result()'s digest */ + unsigned int digest_size; + + void (*init)(void *context); + void (*loop)(void *context, const void *data, size_t size); + void (*result)(void *context, unsigned char *digest_r); +}; + +const struct hash_method *hash_method_lookup(const char *name); + +/* NULL-terminated list of all hash methods */ +extern const struct hash_method *hash_methods[]; #define MD4_RESULTLEN (128/8) diff --git a/libs/md5lib/md4.c b/libs/md5lib/md4.c index 73defe09..2ea36cfd 100644 --- a/libs/md5lib/md4.c +++ b/libs/md5lib/md4.c @@ -18,10 +18,6 @@ #include #include -#ifdef _WIN32 - #include "../stdint.msvc.h" -#endif - #include "md4lib.h" /* -- 2.39.2