Add the PID to the output on Win32.
[oweals/openssl.git] / crypto / bio / bss_file.c
index 323286b09fcd2fba808745edd9b1cec369f617b3..52c0c39df045a0b303c33967fa43ae32b33527cc 100644 (file)
@@ -93,7 +93,7 @@ static BIO_METHOD methods_filep=
        file_free,
        };
 
-BIO *BIO_new_file(char *filename, char *mode)
+BIO *BIO_new_file(const char *filename, const char *mode)
        {
        BIO *ret;
        FILE *file;
@@ -200,7 +200,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, char *ptr)
                break;
        case BIO_C_SET_FILE_PTR:
                file_free(b);
-               b->shutdown=(int)num;
+               b->shutdown=(int)num&BIO_CLOSE;
                b->ptr=(char *)ptr;
                b->init=1;
 #if defined(MSDOS) || defined(WINDOWS)