diff --git a/src/main.c b/src/main.c index 8a5f941ad0764273fca11881e0129ac367244c61..eae5fbc0026285e081cdf467da59d8ca7ca7fccf 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: main.c,v 1.224 2005/05/20 10:39:04 mast Exp $ +|| $Id: main.c,v 1.225 2006/07/05 00:37:18 mast Exp $ */ #include "global.h" @@ -171,8 +171,6 @@ static void (*init_pike_runtime)(void (*exit_cb)(int)); static void find_lib_dir(int argc, char **argv) { int e; - char *p; - char *dir; TRACE((stderr, "find_lib_dir...\n")); @@ -216,25 +214,30 @@ static void find_lib_dir(int argc, char **argv) break; } } + #ifdef LIBPIKE - memcpy(libpike_file, master_location + CONSTANT_STRLEN(MASTER_COOKIE), - sizeof(master_location) - CONSTANT_STRLEN(MASTER_COOKIE)); - for (p = dir = libpike_file; *p; p++) { - if ((*p == '/') + { + char *p; + char *dir; + memcpy(libpike_file, master_location + CONSTANT_STRLEN(MASTER_COOKIE), + sizeof(master_location) - CONSTANT_STRLEN(MASTER_COOKIE)); + for (p = dir = libpike_file; *p; p++) { + if ((*p == '/') #ifdef __NT__ - || (*p == '\\') + || (*p == '\\') #endif /* __NT__ */ - ) - dir = p+1; - } - if ((p + CONSTANT_STRLEN("pike.so")) >= libpike_file + 2*MAXPATHLEN) { - /* Not likely to happen as long as MASTER_COOKIE is longer than "pike.so". - */ - fprintf(stderr, "Too long path to pike.so.\n"); - exit(1); + ) + dir = p+1; + } + if ((p + CONSTANT_STRLEN("pike.so")) >= libpike_file + 2*MAXPATHLEN) { + /* Not likely to happen as long as MASTER_COOKIE is longer than "pike.so". + */ + fprintf(stderr, "Too long path to pike.so.\n"); + exit(1); + } + /* Don't forget the NUL! */ + memcpy(p, "pike.so", CONSTANT_STRLEN("pike.so") + 1); } - /* Don't forget the NUL! */ - memcpy(p, "pike.so", CONSTANT_STRLEN("pike.so") + 1); #endif /* LIBPIKE */ } @@ -243,7 +246,6 @@ int main(int argc, char **argv) JMP_BUF back; int e, num; char *p; - struct array *a; TRACE((stderr, "Init master...\n")); diff --git a/src/modules/_math/math.c b/src/modules/_math/math.c index 24c9dc2a17c882187d154d18a0e98ac74a2c25bd..9951810a7db0ade34042e8d53cd11a6de5c34845 100644 --- a/src/modules/_math/math.c +++ b/src/modules/_math/math.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: math.c,v 1.84 2006/07/04 21:49:38 mast Exp $ +|| $Id: math.c,v 1.85 2006/07/05 00:47:36 mast Exp $ */ #include "global.h" @@ -144,7 +144,7 @@ void f_asin(INT32 args) sp[-1].u.float_number = FL1(asin,sp[-1].u.float_number); } else { DECLARE_NAN; - sp[-1].u.float_number = MAKE_NAN(); + sp[-1].u.float_number = (FLOAT_TYPE) MAKE_NAN(); } } @@ -178,7 +178,7 @@ void f_acos(INT32 args) sp[-1].u.float_number = FL1(acos,sp[-1].u.float_number); } else { DECLARE_NAN; - sp[-1].u.float_number = MAKE_NAN(); + sp[-1].u.float_number = (FLOAT_TYPE) MAKE_NAN(); } } @@ -600,7 +600,6 @@ void f_round(INT32 args) */ void f_limit(INT32 args) { - INT32 i; INT32 minpos = 0; if(args != 3)