pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2011-06-29
2011-06-29 12:42:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>
863df0b41bec0e4d46473127d0ae6e3083340374 (
22
lines) (+
20
/-
2
)
[
Show
|
Annotate
]
Branch:
7.2
Survive crypt(3C) failing. Fixes [bug
6013 (#6013)
].
5:
\*/ /**/ #include "global.h"
-
RCSID("
$Id: builtin_functions.c,v 1.369 2003/09/19 12:28:52 jonasw Exp $
");
+
RCSID("
$Id$
");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
2228:
saltp=Pike_sp[1-args].u.string->str; } else {
-
unsigned int foo; /* Sun CC
want's
this :( */
+
unsigned int foo; /* Sun CC
wants
this :( */
foo=my_rand(); salt[0] = choise[foo % (size_t) strlen(choise)]; foo=my_rand();
2244:
ret = Pike_sp[-args].u.string->str; #endif #endif
+
if (!ret) {
+
switch(errno) {
+
#ifdef ELIBACC
+
case ELIBACC:
+
Pike_error("Failed to load a required shared library. "
+
"Unsupported salt.\n");
+
break;
+
#endif
+
case ENOMEM:
+
Pike_error("Out of memory.\n");
+
break;
+
case EINVAL:
+
default:
+
Pike_error("Unsupported salt (%d).\n", errno);
+
break;
+
}
+
}
if(args < 2) { pop_n_elems(args);