Remove warnings.
[openssl.git] / crypto / buffer / buffer.h
index 417548c04a474789f71220be133b448962343146..465dc34f3fea5696d723b17ce6b021eb00e31452 100644 (file)
@@ -63,6 +63,9 @@
 extern "C" {
 #endif
 
+#include <stddef.h>
+#include <sys/types.h>
+
 typedef struct buf_mem_st
        {
        int length;     /* current number of bytes */
@@ -70,38 +73,33 @@ typedef struct buf_mem_st
        int max;        /* size of buffer */
        } BUF_MEM;
 
-#ifndef NOPROTO
 BUF_MEM *BUF_MEM_new(void);
 void   BUF_MEM_free(BUF_MEM *a);
 int    BUF_MEM_grow(BUF_MEM *str, int len);
-char * BUF_strdup(char *str);
-
-void ERR_load_BUF_strings(void );
-
-#else
+int    BUF_MEM_grow_clean(BUF_MEM *str, int len);
+char * BUF_strdup(const char *str);
 
-BUF_MEM *BUF_MEM_new();
-void   BUF_MEM_free();
-int    BUF_MEM_grow();
-char * BUF_strdup();
+/* safe string functions */
+size_t BUF_strlcpy(char *dst,const char *src,size_t siz);
+size_t BUF_strlcat(char *dst,const char *src,size_t siz);
 
-void ERR_load_BUF_strings();
-
-#endif
 
 /* BEGIN ERROR CODES */
+/* The following lines are auto generated by the script mkerr.pl. Any changes
+ * made after this point may be overwritten when the script is next run.
+ */
+void ERR_load_BUF_strings(void);
+
 /* Error codes for the BUF functions. */
 
 /* Function codes. */
 #define BUF_F_BUF_MEM_GROW                              100
 #define BUF_F_BUF_MEM_NEW                               101
 #define BUF_F_BUF_STRDUP                                102
-#define BUF_F_PXYCLNT_READ                              103
 
 /* Reason codes. */
+
 #ifdef  __cplusplus
 }
 #endif
 #endif
-