Survive pedanticism.
[openssl.git] / crypto / bio / bio.h
index 8e5b7b5280735f19b32f1e8e3c89e1348dd06d3a..f75e77b941eeeb7888e2244ce9994f0dcc87e83f 100644 (file)
@@ -460,7 +460,7 @@ BIO *BIO_new_fp_internal(FILE *stream, int close_flag);
 #    define BIO_new_fp BIO_new_fp_internal
 #  else /* FP_API */
 BIO_METHOD *BIO_s_file(void );
-BIO *BIO_new_file(char *filename, char *mode);
+BIO *BIO_new_file(const char *filename, const char *mode);
 BIO *BIO_new_fp(FILE *stream, int close_flag);
 #    define BIO_s_file_internal                BIO_s_file
 #    define BIO_new_file_internal      BIO_new_file
@@ -512,6 +512,14 @@ int BIO_fd_non_fatal_error(int error);
 int BIO_dump(BIO *b,const char *bytes,int len);
 
 struct hostent *BIO_gethostbyname(const char *name);
+/* We might want a thread-safe interface too:
+ * struct hostent *BIO_gethostbyname_r(const char *name,
+ *     struct hostent *result, void *buffer, size_t buflen);
+ * or something similar (caller allocates a struct hostent,
+ * pointed to by "result", and additional buffer space for the various
+ * substructures; if the buffer does not suffice, NULL is returned
+ * and an appropriate error code is set).
+ */
 int BIO_sock_error(int sock);
 int BIO_socket_ioctl(int fd, long type, unsigned long *arg);
 int BIO_socket_nbio(int fd,int mode);