diff options
Diffstat (limited to 'src/lib/libcrypto/buffer/buffer.h')
-rw-r--r-- | src/lib/libcrypto/buffer/buffer.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/lib/libcrypto/buffer/buffer.h b/src/lib/libcrypto/buffer/buffer.h index 1db9607450..465dc34f3f 100644 --- a/src/lib/libcrypto/buffer/buffer.h +++ b/src/lib/libcrypto/buffer/buffer.h | |||
@@ -59,35 +59,25 @@ | |||
59 | #ifndef HEADER_BUFFER_H | 59 | #ifndef HEADER_BUFFER_H |
60 | #define HEADER_BUFFER_H | 60 | #define HEADER_BUFFER_H |
61 | 61 | ||
62 | #include <openssl/ossl_typ.h> | ||
63 | |||
64 | #ifdef __cplusplus | 62 | #ifdef __cplusplus |
65 | extern "C" { | 63 | extern "C" { |
66 | #endif | 64 | #endif |
67 | 65 | ||
68 | #include <stddef.h> | 66 | #include <stddef.h> |
69 | |||
70 | #if !defined(NO_SYS_TYPES_H) | ||
71 | #include <sys/types.h> | 67 | #include <sys/types.h> |
72 | #endif | ||
73 | |||
74 | /* Already declared in ossl_typ.h */ | ||
75 | /* typedef struct buf_mem_st BUF_MEM; */ | ||
76 | 68 | ||
77 | struct buf_mem_st | 69 | typedef struct buf_mem_st |
78 | { | 70 | { |
79 | int length; /* current number of bytes */ | 71 | int length; /* current number of bytes */ |
80 | char *data; | 72 | char *data; |
81 | int max; /* size of buffer */ | 73 | int max; /* size of buffer */ |
82 | }; | 74 | } BUF_MEM; |
83 | 75 | ||
84 | BUF_MEM *BUF_MEM_new(void); | 76 | BUF_MEM *BUF_MEM_new(void); |
85 | void BUF_MEM_free(BUF_MEM *a); | 77 | void BUF_MEM_free(BUF_MEM *a); |
86 | int BUF_MEM_grow(BUF_MEM *str, int len); | 78 | int BUF_MEM_grow(BUF_MEM *str, int len); |
87 | int BUF_MEM_grow_clean(BUF_MEM *str, int len); | 79 | int BUF_MEM_grow_clean(BUF_MEM *str, int len); |
88 | char * BUF_strdup(const char *str); | 80 | char * BUF_strdup(const char *str); |
89 | char * BUF_strndup(const char *str, size_t siz); | ||
90 | void * BUF_memdup(const void *data, size_t siz); | ||
91 | 81 | ||
92 | /* safe string functions */ | 82 | /* safe string functions */ |
93 | size_t BUF_strlcpy(char *dst,const char *src,size_t siz); | 83 | size_t BUF_strlcpy(char *dst,const char *src,size_t siz); |
@@ -103,12 +93,9 @@ void ERR_load_BUF_strings(void); | |||
103 | /* Error codes for the BUF functions. */ | 93 | /* Error codes for the BUF functions. */ |
104 | 94 | ||
105 | /* Function codes. */ | 95 | /* Function codes. */ |
106 | #define BUF_F_BUF_MEMDUP 103 | ||
107 | #define BUF_F_BUF_MEM_GROW 100 | 96 | #define BUF_F_BUF_MEM_GROW 100 |
108 | #define BUF_F_BUF_MEM_GROW_CLEAN 105 | ||
109 | #define BUF_F_BUF_MEM_NEW 101 | 97 | #define BUF_F_BUF_MEM_NEW 101 |
110 | #define BUF_F_BUF_STRDUP 102 | 98 | #define BUF_F_BUF_STRDUP 102 |
111 | #define BUF_F_BUF_STRNDUP 104 | ||
112 | 99 | ||
113 | /* Reason codes. */ | 100 | /* Reason codes. */ |
114 | 101 | ||