pqueue and dtls uses 64-bit values. Unfortunately, OpenSSL doesn't
have a uniform representation for those over all architectures, so a little bit of hackery is needed. Contributed by nagendra modadugu <nagendra@cs.stanford.edu>
This commit is contained in:
@@ -64,18 +64,20 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/pq_compat.h>
|
||||
|
||||
typedef struct _pqueue *pqueue;
|
||||
|
||||
typedef struct _pitem
|
||||
{
|
||||
BN_ULLONG priority;
|
||||
PQ_64BIT priority;
|
||||
void *data;
|
||||
struct _pitem *next;
|
||||
} pitem;
|
||||
|
||||
typedef struct _pitem *piterator;
|
||||
|
||||
pitem *pitem_new(BN_ULLONG priority, void *data);
|
||||
pitem *pitem_new(PQ_64BIT priority, void *data);
|
||||
void pitem_free(pitem *item);
|
||||
|
||||
pqueue pqueue_new(void);
|
||||
@@ -84,7 +86,7 @@ void pqueue_free(pqueue pq);
|
||||
pitem *pqueue_insert(pqueue pq, pitem *item);
|
||||
pitem *pqueue_peek(pqueue pq);
|
||||
pitem *pqueue_pop(pqueue pq);
|
||||
pitem *pqueue_find(pqueue pq, BN_ULLONG priority);
|
||||
pitem *pqueue_find(pqueue pq, PQ_64BIT priority);
|
||||
pitem *pqueue_iterator(pqueue pq);
|
||||
pitem *pqueue_next(piterator *iter);
|
||||
|
||||
|
Reference in New Issue
Block a user