#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include "e_os.h"
-#include "rand.h"
+#include <openssl/e_os.h>
+#include <openssl/rand.h>
#undef BUFSIZE
#define BUFSIZE 1024
/* #define RFILE ".rand" - defined in ../../e_os.h */
-int RAND_load_file(file,bytes)
-const char *file;
-long bytes;
+int RAND_load_file(const char *file, long bytes)
{
MS_STATIC unsigned char buf[BUFSIZE];
struct stat sb;
return(ret);
}
-int RAND_write_file(file)
-const char *file;
+int RAND_write_file(const char *file)
{
unsigned char buf[BUFSIZE];
int i,ret=0;
FILE *out;
int n;
- out=fopen(file,"w");
+ out=fopen(file,"wb");
if (out == NULL) goto err;
chmod(file,0600);
n=RAND_DATA;
return(ret);
}
-char *RAND_file_name(buf,size)
-char *buf;
-int size;
+char *RAND_file_name(char *buf, int size)
{
char *s;
char *ret=NULL;