--- parser3/src/classes/math.C 2003/02/20 14:53:33 1.24.2.9 +++ parser3/src/classes/math.C 2003/03/05 13:13:46 1.24.2.12 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_MATH_C="$Date: 2003/02/20 14:53:33 $"; +static const char* IDENT_MATH_C="$Date: 2003/03/05 13:13:46 $"; #include "pa_vmethod_frame.h" @@ -20,8 +20,12 @@ static const char* IDENT_MATH_C="$Date: # include #endif -#ifdef HAVE_CRYPT_H -#include +#ifdef HAVE_CRYPT +# ifdef HAVE_CRYPT_H +# include +# endif +#else + extern char *crypt(const char *, const char *); #endif // defines @@ -41,8 +45,7 @@ public: // Methoded // global variables -MethodedPtr math_class(0); // fictive -MethodedPtr math_base_class(new MMath); +DECLARE_CLASS_VAR(math, 0 /*fictive*/, new MMath); // methods static unsigned int randomizer=0; @@ -170,7 +173,7 @@ static void _crypt(Request& r, StringPtr method_name, "on this platform does not support '%.*s' salt prefix", prefix_size, normal_salt); - r.write_pass_lang(StringPtr(new String(pool.copy(static_sample_buf)))); + r.write_pass_lang(String(pool.copy(static_sample_buf))); #else throw Exception("parser.runtime", method_name,