diff options
author | 2008-09-06 12:17:47 +0000 | |
---|---|---|
committer | 2008-09-06 12:17:47 +0000 | |
commit | 4fcf65c5c59fcf6124cf9f1fd81aa546850f974c (patch) | |
tree | 3c0b4c46d91bcb87c8eef7a1e84711159b17f71b /lib/libcrypto/buffer/buffer.h | |
parent | import of OpenSSL 0.9.8h (diff) | |
download | wireguard-openbsd-4fcf65c5c59fcf6124cf9f1fd81aa546850f974c.tar.xz wireguard-openbsd-4fcf65c5c59fcf6124cf9f1fd81aa546850f974c.zip |
resolve conflicts
Diffstat (limited to 'lib/libcrypto/buffer/buffer.h')
-rw-r--r-- | lib/libcrypto/buffer/buffer.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/libcrypto/buffer/buffer.h b/lib/libcrypto/buffer/buffer.h index 465dc34f3fe..1db96074503 100644 --- a/lib/libcrypto/buffer/buffer.h +++ b/lib/libcrypto/buffer/buffer.h @@ -59,25 +59,35 @@ #ifndef HEADER_BUFFER_H #define HEADER_BUFFER_H +#include <openssl/ossl_typ.h> + #ifdef __cplusplus extern "C" { #endif #include <stddef.h> + +#if !defined(NO_SYS_TYPES_H) #include <sys/types.h> +#endif + +/* Already declared in ossl_typ.h */ +/* typedef struct buf_mem_st BUF_MEM; */ -typedef struct buf_mem_st +struct buf_mem_st { int length; /* current number of bytes */ char *data; int max; /* size of buffer */ - } BUF_MEM; + }; BUF_MEM *BUF_MEM_new(void); void BUF_MEM_free(BUF_MEM *a); int BUF_MEM_grow(BUF_MEM *str, int len); int BUF_MEM_grow_clean(BUF_MEM *str, int len); char * BUF_strdup(const char *str); +char * BUF_strndup(const char *str, size_t siz); +void * BUF_memdup(const void *data, size_t siz); /* safe string functions */ size_t BUF_strlcpy(char *dst,const char *src,size_t siz); @@ -93,9 +103,12 @@ void ERR_load_BUF_strings(void); /* Error codes for the BUF functions. */ /* Function codes. */ +#define BUF_F_BUF_MEMDUP 103 #define BUF_F_BUF_MEM_GROW 100 +#define BUF_F_BUF_MEM_GROW_CLEAN 105 #define BUF_F_BUF_MEM_NEW 101 #define BUF_F_BUF_STRDUP 102 +#define BUF_F_BUF_STRNDUP 104 /* Reason codes. */ |