[hipl-commit] [trunk] Rev 4388: Remove HIPL_OPENSSL_100 #define indirection, instead use LHASH_OF directly.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 21 Apr 2010 18:41:01 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 21/04/2010 at 18:41:01
Revision: 4388
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove HIPL_OPENSSL_100 #define indirection, instead use LHASH_OF directly.
  
  The indirection has no benefits except complication; avoid it.

Modified:
  M  lib/core/hashtable.h
  M  lib/core/list.h

=== modified file 'lib/core/hashtable.h'
--- lib/core/hashtable.h        2010-04-21 15:30:36 +0000
+++ lib/core/hashtable.h        2010-04-21 15:39:34 +0000
@@ -17,13 +17,6 @@
 #include "debug.h"
 #include "list.h"
 
-/* OpenSSL 1.0.0 introduced backwards incompatible changes to the lhash.
- * These backwards compatibility hacks can be removed when all platforms
- * support OpenSSL 1.0.0 by default. */
-#ifdef LHASH_OF
-#define HIPL_OPENSSL_100
-#endif /* LHASH_OF */
-
 #undef MIN_NODES
 #define MIN_NODES       16
 
@@ -35,7 +28,7 @@
 void *hip_ht_delete(void *head, void *data);
 int hip_ht_add(void *head, void *data);
 
-#ifdef HIPL_OPENSSL_100
+#ifdef LHASH_OF
 
 #define LHASH100_CAST _LHASH
 

=== modified file 'lib/core/list.h'
--- lib/core/list.h     2010-03-19 08:47:02 +0000
+++ lib/core/list.h     2010-04-21 15:39:34 +0000
@@ -10,15 +10,6 @@
 
 typedef LHASH_NODE hip_list_t;
 
-/* OpenSSL 1.0.0 introduced backwards incompatible changes to the lhash.
- * These backwards compatibility hacks can be removed when all platforms
- * support OpenSSL 1.0.0 by default. */
-#ifdef LHASH_OF
-#ifndef HIPL_OPENSSL_100
-#define HIPL_OPENSSL_100
-#endif /* HIPL_OPENSSL_100 */
-#endif /* LHASH_OF */
-
 /**
  * list_entry - get the struct for this entry
  * @param ptr the &hip_list_t pointer.
@@ -32,7 +23,7 @@
  * @param entry the entry to find from the list
  * @param head the head for your list.
  */
-#ifdef HIPL_OPENSSL_100
+#ifdef LHASH_OF
 #define list_find(entry, head) lh_retrieve((_LHASH *) head, entry)
 #else
 #define list_find(entry, head) lh_retrieve(head, entry)
@@ -68,7 +59,7 @@
  * Insert a new entry after the specified head.
  * This is good for implementing stacks.
  */
-#ifdef HIPL_OPENSSL_100
+#ifdef LHASH_OF
 #define list_add(entry, head) lh_insert((_LHASH *) head, entry)
 #else
 #define list_add(entry, head) lh_insert(head, entry)
@@ -80,7 +71,7 @@
  * Note: list_empty on entry does not return true after this, the entry is
  * in an undefined state.
  */
-#ifdef HIPL_OPENSSL_100
+#ifdef LHASH_OF
 #define list_del(entry, head) lh_delete((_LHASH *) head, entry)
 #else
 #define list_del(entry, head) lh_delete(head, entry)

Other related posts:

  • » [hipl-commit] [trunk] Rev 4388: Remove HIPL_OPENSSL_100 #define indirection, instead use LHASH_OF directly. - Diego Biurrun