Wed, Aug 30, 2006 at 08:30:03PM +0200, Marc Lehmann wrote:
Wed, Aug 30, 2006 at 11:48:27AM -0500, Steve Peters <steve (AT) fisharerojo (DOT) orgwrote:
crypt_r again requires an initialised struct crypt_data.
This sounds like this needs the bzero-ing done for BSD, and the
pain that that was. Let me take a look into this one.
in this case, bzero works (glibc requires only data->initialized to be
zero, though), while for random_r, a call to initstate_r is required.
however, the real problem is that perl redefines those symbols in
the first place (i guess this is not your current concern, I am just
clarifying this for the bug report itself).
for example:
#include <time.h>
int main(void)
{
time_t t = 0;
return ctime (&t);
}
"works", but when adding #include "perl.h" suddenly segfaults.
the requirement to initialise a perl interpreter just to be able to call
standard functions like localtime or crypt is the real, and rather big,
bug that makes embedding perl almost impossible.
Would changing the Perl headers so that they only do the redefinition inside
the Perl source code resolve this?
Nicholas Clark