diff options
Diffstat (limited to 'src/lib/libcrypto/txt_db/txt_db.h')
-rw-r--r-- | src/lib/libcrypto/txt_db/txt_db.h | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/src/lib/libcrypto/txt_db/txt_db.h b/src/lib/libcrypto/txt_db/txt_db.h index aca6dae393..563392aeff 100644 --- a/src/lib/libcrypto/txt_db/txt_db.h +++ b/src/lib/libcrypto/txt_db/txt_db.h | |||
@@ -59,12 +59,11 @@ | |||
59 | #ifndef HEADER_TXT_DB_H | 59 | #ifndef HEADER_TXT_DB_H |
60 | #define HEADER_TXT_DB_H | 60 | #define HEADER_TXT_DB_H |
61 | 61 | ||
62 | #ifdef __cplusplus | 62 | #ifndef OPENSSL_NO_BIO |
63 | extern "C" { | 63 | #include <openssl/bio.h> |
64 | #endif | 64 | #endif |
65 | 65 | #include <openssl/stack.h> | |
66 | #include "stack.h" | 66 | #include <openssl/lhash.h> |
67 | #include "lhash.h" | ||
68 | 67 | ||
69 | #define DB_ERROR_OK 0 | 68 | #define DB_ERROR_OK 0 |
70 | #define DB_ERROR_MALLOC 1 | 69 | #define DB_ERROR_MALLOC 1 |
@@ -73,6 +72,10 @@ extern "C" { | |||
73 | #define DB_ERROR_NO_INDEX 4 | 72 | #define DB_ERROR_NO_INDEX 4 |
74 | #define DB_ERROR_INSERT_INDEX_CLASH 5 | 73 | #define DB_ERROR_INSERT_INDEX_CLASH 5 |
75 | 74 | ||
75 | #ifdef __cplusplus | ||
76 | extern "C" { | ||
77 | #endif | ||
78 | |||
76 | typedef struct txt_db_st | 79 | typedef struct txt_db_st |
77 | { | 80 | { |
78 | int num_fields; | 81 | int num_fields; |
@@ -85,8 +88,7 @@ typedef struct txt_db_st | |||
85 | char **arg_row; | 88 | char **arg_row; |
86 | } TXT_DB; | 89 | } TXT_DB; |
87 | 90 | ||
88 | #ifndef NOPROTO | 91 | #ifndef OPENSSL_NO_BIO |
89 | #ifdef HEADER_BIO_H | ||
90 | TXT_DB *TXT_DB_read(BIO *in, int num); | 92 | TXT_DB *TXT_DB_read(BIO *in, int num); |
91 | long TXT_DB_write(BIO *out, TXT_DB *db); | 93 | long TXT_DB_write(BIO *out, TXT_DB *db); |
92 | #else | 94 | #else |
@@ -94,22 +96,11 @@ TXT_DB *TXT_DB_read(char *in, int num); | |||
94 | long TXT_DB_write(char *out, TXT_DB *db); | 96 | long TXT_DB_write(char *out, TXT_DB *db); |
95 | #endif | 97 | #endif |
96 | int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(), | 98 | int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(), |
97 | unsigned long (*hash)(),int (*cmp)()); | 99 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); |
98 | void TXT_DB_free(TXT_DB *db); | 100 | void TXT_DB_free(TXT_DB *db); |
99 | char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value); | 101 | char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value); |
100 | int TXT_DB_insert(TXT_DB *db,char **value); | 102 | int TXT_DB_insert(TXT_DB *db,char **value); |
101 | 103 | ||
102 | #else | ||
103 | |||
104 | TXT_DB *TXT_DB_read(); | ||
105 | long TXT_DB_write(); | ||
106 | int TXT_DB_create_index(); | ||
107 | void TXT_DB_free(); | ||
108 | char **TXT_DB_get_by_index(); | ||
109 | int TXT_DB_insert(); | ||
110 | |||
111 | #endif | ||
112 | |||
113 | #ifdef __cplusplus | 104 | #ifdef __cplusplus |
114 | } | 105 | } |
115 | #endif | 106 | #endif |