Add support for generating MPW Makefiles. This makes the following changes:
[u/mdw/putty] / sshrand.c
index 3014da4..95c7b49 100644 (file)
--- a/sshrand.c
+++ b/sshrand.c
@@ -39,7 +39,7 @@ struct RandPool {
 };
 
 static struct RandPool pool;
-static int random_active = 0;
+int random_active = 0;
 
 void random_stir(void)
 {
@@ -201,7 +201,10 @@ int random_byte(void)
 
 void random_get_savedata(void **data, int *len)
 {
+    void *buf = smalloc(POOLSIZE / 2);
     random_stir();
-    *data = pool.pool + pool.poolpos;
+    memcpy(buf, pool.pool + pool.poolpos, POOLSIZE / 2);
     *len = POOLSIZE / 2;
+    *data = buf;
+    random_stir();
 }