Use ossl_inline and DEFINE_LHASH_OF
authorDr. Stephen Henson <steve@openssl.org>
Mon, 11 Jan 2016 15:22:30 +0000 (15:22 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 11 Jan 2016 17:50:42 +0000 (17:50 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/progs.h
apps/progs.pl
crypto/engine/eng_int.h
crypto/err/err_lcl.h
crypto/include/internal/cryptlib.h
crypto/objects/obj_lcl.h
include/openssl/conf.h
include/openssl/err.h
include/openssl/lhash.h
ssl/ssl_locl.h

index 400fefcbfd19ab9ca3650113a1bbc80e0a1b1f3c..f3eaf2ac42fcc4b3886730f4e6dcf1c849230f75 100644 (file)
@@ -16,7 +16,7 @@ typedef struct function_st {
     const OPTIONS *help;
 } FUNCTION;
 
-DECLARE_LHASH_OF(FUNCTION);
+DEFINE_LHASH_OF(FUNCTION);
 
 extern int asn1parse_main(int argc, char *argv[]);
 extern int ca_main(int argc, char *argv[]);
index dd935cee0d39bb4f01512c73d36ef13ff7333842..4ffa1f1e7967cc665bdda141a7d662886970cf73 100644 (file)
@@ -20,7 +20,7 @@ typedef struct function_st {
     const OPTIONS *help;
 } FUNCTION;
 
-DECLARE_LHASH_OF(FUNCTION);
+DEFINE_LHASH_OF(FUNCTION);
 
 EOF
 
index e68ef445784109d415786fe06575ef807e4e21ce..7062bda889305bb16a0893ed80d60ccbe7fde1a4 100644 (file)
@@ -218,7 +218,7 @@ struct engine_st {
 
 typedef struct st_engine_pile ENGINE_PILE;
 
-DECLARE_LHASH_OF(ENGINE_PILE);
+DEFINE_LHASH_OF(ENGINE_PILE);
 
 #ifdef  __cplusplus
 }
index 16404df4a4014b6a96810e8923a4eb03a7c1697d..c9d24f111e73e2e444220a192953135d1c655c48 100644 (file)
@@ -1,2 +1,2 @@
 
-DECLARE_LHASH_OF(ERR_STATE);
+DEFINE_LHASH_OF(ERR_STATE);
index 041ab7ebe2b56d0c369a1aa551eaebd56531cfed..45a4d7a0e78e04c5a358d4affee272e1b9728619 100644 (file)
@@ -86,9 +86,9 @@ DEFINE_STACK_OF(EX_CALLBACK)
 DEFINE_STACK_OF(CRYPTO_dynlock)
 
 typedef struct app_mem_info_st APP_INFO;
-DECLARE_LHASH_OF(APP_INFO);
+DEFINE_LHASH_OF(APP_INFO);
 typedef struct mem_st MEM;
-DECLARE_LHASH_OF(MEM);
+DEFINE_LHASH_OF(MEM);
 
 # ifndef OPENSSL_SYS_VMS
 #  define X509_CERT_AREA          OPENSSLDIR
index 6a8f75f09e747b6e94edb67fc027009f15cc78c8..c451088459264531c76ee1ea4e16b4d27718dfb5 100644 (file)
@@ -2,6 +2,6 @@
 
 typedef struct name_funcs_st NAME_FUNCS;
 DEFINE_STACK_OF(NAME_FUNCS)
-DECLARE_LHASH_OF(OBJ_NAME);
+DEFINE_LHASH_OF(OBJ_NAME);
 typedef struct added_obj_st ADDED_OBJ;
-DECLARE_LHASH_OF(ADDED_OBJ);
+DEFINE_LHASH_OF(ADDED_OBJ);
index 118307270f5b18457e7892fac49b9af0e1690539..81b7b95050598dfd6c1971dc593abf37e9b5d610 100644 (file)
@@ -78,7 +78,7 @@ typedef struct {
 } CONF_VALUE;
 
 DEFINE_STACK_OF(CONF_VALUE)
-DECLARE_LHASH_OF(CONF_VALUE);
+DEFINE_LHASH_OF(CONF_VALUE);
 
 struct conf_st;
 struct conf_method_st;
index e763731f309b0887d12df2fb541c22d633695ef4..df9cab2110585f7300a97d3d14883e7e8ff7ecd7 100644 (file)
@@ -315,7 +315,7 @@ typedef struct ERR_string_data_st {
     const char *string;
 } ERR_STRING_DATA;
 
-DECLARE_LHASH_OF(ERR_STRING_DATA);
+DEFINE_LHASH_OF(ERR_STRING_DATA);
 
 void ERR_put_error(int lib, int func, int reason, const char *file, int line);
 void ERR_set_error_data(char *data, int flags);
index cb89edb28b0b671d0b32fc96d672b1817a6d06c7..b83fc6e6f108aadf1794ba584a6f510194603781 100644 (file)
@@ -184,60 +184,60 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
 
 # define LHASH_OF(type) struct lhash_st_##type
 
-# define DECLARE_LHASH_OF(type) \
+# define DEFINE_LHASH_OF(type) \
     LHASH_OF(type) { int dummy; }; \
-    static inline LHASH_OF(type) * \
+    static ossl_inline LHASH_OF(type) * \
         lh_##type##_new(unsigned long (*hfn)(const type *), \
                         int (*cfn)(const type *, const type *)) \
     { \
         return (LHASH_OF(type) *) \
             lh_new((LHASH_HASH_FN_TYPE) hfn, (LHASH_COMP_FN_TYPE)cfn); \
     } \
-    static inline void lh_##type##_free(LHASH_OF(type) *lh) \
+    static ossl_inline void lh_##type##_free(LHASH_OF(type) *lh) \
     { \
         lh_free((_LHASH *)lh); \
     } \
-    static inline type *lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
+    static ossl_inline type *lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
     { \
         return lh_insert((_LHASH *)lh, d); \
     } \
-    static inline type *lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
+    static ossl_inline type *lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
     { \
         return lh_delete((_LHASH *)lh, d); \
     } \
-    static inline type *lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
+    static ossl_inline type *lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
     { \
         return lh_retrieve((_LHASH *)lh, d); \
     } \
-    static inline int lh_##type##_error(LHASH_OF(type) *lh) \
+    static ossl_inline int lh_##type##_error(LHASH_OF(type) *lh) \
     { \
         return lh_error((_LHASH *)lh); \
     } \
-    static inline unsigned long lh_##type##_num_items(LHASH_OF(type) *lh) \
+    static ossl_inline unsigned long lh_##type##_num_items(LHASH_OF(type) *lh) \
     { \
         return lh_num_items((_LHASH *)lh); \
     } \
-    static inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
+    static ossl_inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
     { \
         lh_node_stats_bio((_LHASH *)lh, out); \
     } \
-    static inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
+    static ossl_inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
     { \
         lh_node_usage_stats_bio((_LHASH *)lh, out); \
     } \
-    static inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
+    static ossl_inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
     { \
         lh_stats_bio((_LHASH *)lh, out); \
     } \
-    static inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \
+    static ossl_inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \
     { \
         return lh_get_down_load((_LHASH *)lh); \
     } \
-    static inline void lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
+    static ossl_inline void lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
     { \
         lh_set_down_load((_LHASH *)lh, dl); \
     } \
-    static inline void lh_##type##_doall(LHASH_OF(type) *lh, \
+    static ossl_inline void lh_##type##_doall(LHASH_OF(type) *lh, \
                                          void (*doall)(type *)) \
     { \
         lh_doall((_LHASH *)lh, (LHASH_DOALL_FN_TYPE)doall); \
@@ -251,7 +251,7 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
     int_implement_lhash_doall(type, argtype, type)
 
 #define int_implement_lhash_doall(type, argtype, cbargtype) \
-    static inline void \
+    static ossl_inline void \
         lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \
                                    void (*fn)(cbargtype *, argtype *), \
                                    argtype *arg) \
@@ -267,8 +267,8 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
 # define LHM_lh_doall_arg(type, lh, fn, arg_type, arg) \
   lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
 
-DECLARE_LHASH_OF(OPENSSL_STRING);
-DECLARE_LHASH_OF(OPENSSL_CSTRING);
+DEFINE_LHASH_OF(OPENSSL_STRING);
+DEFINE_LHASH_OF(OPENSSL_CSTRING);
 
 #ifdef  __cplusplus
 }
index a9d4f54ef11ad29fb349ae89581ca31a8ce770e2..a490cd3e4b1592ee8cc48bca1302f176aa25c103 100644 (file)
@@ -694,7 +694,7 @@ struct ssl_comp_st {
 };
 
 DEFINE_STACK_OF(SSL_COMP)
-DECLARE_LHASH_OF(SSL_SESSION);
+DEFINE_LHASH_OF(SSL_SESSION);
 
 
 struct ssl_ctx_st {