Change #include filenames from <foo.h> to <openssl.h>.
[openssl.git] / crypto / rand / randfile.c
index 3ae95f9012f1f3acb51a3787517a93d3815d1acb..4c7648728c82c52cd77c5a084413253db3ab0abd 100644 (file)
@@ -62,8 +62,8 @@
 #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
@@ -71,9 +71,7 @@
 
 /* #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;
@@ -108,15 +106,14 @@ err:
        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;
@@ -140,9 +137,7 @@ err:
        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;