X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbio%2Fbss_file.c;h=0d44dc388968975751f5d535277118b92be62b18;hb=3167f68faf4cd8f2a29b48785dc8e59ba0a2d25c;hp=ab73b23d0ada0e7f82db3475775e16959f1ce113;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a;p=oweals%2Fopenssl.git diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index ab73b23d0a..0d44dc3889 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -73,7 +73,6 @@ #if !defined(NO_STDIO) -#ifndef NOPROTO static int MS_CALLBACK file_write(BIO *h,char *buf,int num); static int MS_CALLBACK file_read(BIO *h,char *buf,int size); static int MS_CALLBACK file_puts(BIO *h,char *str); @@ -81,16 +80,6 @@ static int MS_CALLBACK file_gets(BIO *h,char *str,int size); static long MS_CALLBACK file_ctrl(BIO *h,int cmd,long arg1,char *arg2); static int MS_CALLBACK file_new(BIO *h); static int MS_CALLBACK file_free(BIO *data); -#else -static int MS_CALLBACK file_write(); -static int MS_CALLBACK file_read(); -static int MS_CALLBACK file_puts(); -static int MS_CALLBACK file_gets(); -static long MS_CALLBACK file_ctrl(); -static int MS_CALLBACK file_new(); -static int MS_CALLBACK file_free(); -#endif - static BIO_METHOD methods_filep= { BIO_TYPE_FILE, @@ -102,9 +91,10 @@ static BIO_METHOD methods_filep= file_ctrl, file_new, file_free, + NULL, }; -BIO *BIO_new_file(char *filename, char *mode) +BIO *BIO_new_file(const char *filename, const char *mode) { BIO *ret; FILE *file; @@ -182,7 +172,7 @@ static int MS_CALLBACK file_write(BIO *b, char *in, int inl) if (fwrite(in,(int)inl,1,(FILE *)b->ptr)) ret=inl; /* ret=fwrite(in,1,(int)inl,(FILE *)b->ptr); */ - /* acording to Tim Hudson , the commented + /* according to Tim Hudson , the commented * out version above can cause 'inl' write calls under * some stupid stdio implementations (VMS) */ } @@ -211,7 +201,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)