diff --git a/neo/SConstruct b/neo/SConstruct index c7000241..aa5ced1c 100644 --- a/neo/SConstruct +++ b/neo/SConstruct @@ -180,6 +180,11 @@ SILENT = '0' # site settings ---------------------------------- +printed_config = False + +def getKeyValue(k, v): + return k + '=\'' + v + '\'' + if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ): site_dict = {} if (os.path.exists(conf_filename)): @@ -187,21 +192,21 @@ if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ): p = pickle.Unpickler(site_file) site_dict = p.load() print 'Loading build configuration from ' + conf_filename + ':' + printed_config = True for k, v in site_dict.items(): - exec_cmd = k + '=\'' + v + '\'' - print ' ' + exec_cmd - exec(exec_cmd) + print ' ' + getKeyValue(k, v) + globals()[k] = v else: - print 'Site settings ignored' + print 'Site settings ignored - using default' # end site settings ------------------------------ # command line settings -------------------------- for k in ARGUMENTS.keys(): - exec_cmd = k + '=\'' + ARGUMENTS[k] + '\'' - print 'Command line: ' + exec_cmd - exec( exec_cmd ) + value = ARGUMENTS[k] + print 'Command line: ' + getKeyValue(k, value); + globals()[k] = value # end command line settings ---------------------- @@ -209,8 +214,7 @@ for k in ARGUMENTS.keys(): if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ): for k in serialized: - exec_cmd = 'site_dict[\'' + k + '\'] = ' + k - exec(exec_cmd) + site_dict[k] = globals()[k] site_file = open(conf_filename, 'w') p = pickle.Pickler(site_file) diff --git a/neo/idlib/Str.h b/neo/idlib/Str.h index 393b3665..c82134a2 100644 --- a/neo/idlib/Str.h +++ b/neo/idlib/Str.h @@ -61,9 +61,15 @@ If you have questions concerning this license or the applicable additional terms #endif #define StrCmpNI use_idStr_Icmpn +#ifdef stricmp +#undef stricmp +#endif #define stricmp idStr::Icmp // use_idStr_Icmp #define _stricmp use_idStr_Icmp #define strcasecmp use_idStr_Icmp +#ifdef strnicmp +#undef strnicmp +#endif #define strnicmp use_idStr_Icmpn #define _strnicmp use_idStr_Icmpn #define _memicmp use_idStr_Icmpn diff --git a/neo/idlib/containers/VectorSet.h b/neo/idlib/containers/VectorSet.h index 5205a3e5..5f9daccf 100644 --- a/neo/idlib/containers/VectorSet.h +++ b/neo/idlib/containers/VectorSet.h @@ -163,7 +163,11 @@ ID_INLINE int idVectorSet::FindVector(const type &v, const float } hash.Add(hashKey, idList::Num()); +#ifdef __llvm__ + idList:: +#endif Append(v); + return idList::Num()-1; } diff --git a/neo/idlib/math/Curve.h b/neo/idlib/math/Curve.h index c8c454fe..29c13b88 100644 --- a/neo/idlib/math/Curve.h +++ b/neo/idlib/math/Curve.h @@ -386,7 +386,7 @@ idCurve::SetConstantSpeed template< class type > ID_INLINE void idCurve::SetConstantSpeed(const float totalTime) { - int i, j; + int i; float *length, totalLength, scale, t; length = (float *) _alloca16(values.Num() * sizeof(float)); @@ -876,7 +876,9 @@ idCurve_QuadraticBezier::BasisSecondDerivative template< class type > ID_INLINE void idCurve_QuadraticBezier::BasisSecondDerivative(const float t, float *bvals) const { +#if 0 float s1 = (float)(t - this->times[0]) / (this->times[2] - this->times[0]); +#endif bvals[0] = 2.0f; bvals[1] = -4.0f; bvals[2] = 2.0f; diff --git a/neo/sys/scons/scons_utils.py b/neo/sys/scons/scons_utils.py index 270c36be..e557cca9 100644 --- a/neo/sys/scons/scons_utils.py +++ b/neo/sys/scons/scons_utils.py @@ -116,7 +116,7 @@ def checkLDD( target, source, env ): file = target[0] if (not os.path.isfile(file.abspath)): print('ERROR: CheckLDD: target %s not found\n' % target[0]) - Exit(1) + sys.exit(1) ( status, output ) = commands.getstatusoutput( 'ldd -r %s' % file ) # if ( status != 0 ): # print 'ERROR: ldd command returned with exit code %d' % status @@ -178,7 +178,12 @@ def SetupUtils( env ): env.SharedLibrarySafe = SharedLibrarySafe def BuildList( s_prefix, s_string ): - s_list = string.split( s_string ) + try: + s_list = string.split( s_string ) + except: + # Assume already list + s_list = s_string + for i in range( len( s_list ) ): s_list[ i ] = s_prefix + '/' + s_list[ i ] return s_list diff --git a/neo/tools/compilers/roqvq/codec.cpp b/neo/tools/compilers/roqvq/codec.cpp index a59538f0..dcac0b9b 100644 --- a/neo/tools/compilers/roqvq/codec.cpp +++ b/neo/tools/compilers/roqvq/codec.cpp @@ -30,6 +30,10 @@ If you have questions concerning this license or the applicable additional terms #include "codec.h" +#ifndef HUGE +#define HUGE HUGE_VAL +#endif //!HUGE + float glimit(const float val) { if (val<0) return 0;