mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r13476@catbus: nickm | 2007-06-17 14:04:41 -0400
Build with fewer compiler warnings on Sun. (This and previous Sun patches are thanks to the tremendously handy services of unix-center.net.) svn:r10644
This commit is contained in:
@@ -663,10 +663,10 @@ smartlist_uniq_digests(smartlist_t *sl)
|
||||
} prefix ## entry_t; \
|
||||
struct maptype { \
|
||||
HT_HEAD(prefix ## impl, prefix ## entry_t) head; \
|
||||
};
|
||||
}
|
||||
|
||||
DEFINE_MAP_STRUCTS(strmap_t, char *key, strmap_);
|
||||
DEFINE_MAP_STRUCTS(digestmap_t, char key[DIGEST_LEN], digestmap_);
|
||||
DEFINE_MAP_STRUCTS(strmap_t, char *key, strmap_)
|
||||
DEFINE_MAP_STRUCTS(digestmap_t, char key[DIGEST_LEN], digestmap_)
|
||||
|
||||
/** Helper: compare strmap_entry_t objects by key value. */
|
||||
static INLINE int
|
||||
@@ -698,14 +698,14 @@ digestmap_entry_hash(const digestmap_entry_t *a)
|
||||
}
|
||||
|
||||
HT_PROTOTYPE(strmap_impl, strmap_entry_t, node, strmap_entry_hash,
|
||||
strmap_entries_eq);
|
||||
strmap_entries_eq)
|
||||
HT_GENERATE(strmap_impl, strmap_entry_t, node, strmap_entry_hash,
|
||||
strmap_entries_eq, 0.6, malloc, realloc, free);
|
||||
strmap_entries_eq, 0.6, malloc, realloc, free)
|
||||
|
||||
HT_PROTOTYPE(digestmap_impl, digestmap_entry_t, node, digestmap_entry_hash,
|
||||
digestmap_entries_eq);
|
||||
digestmap_entries_eq)
|
||||
HT_GENERATE(digestmap_impl, digestmap_entry_t, node, digestmap_entry_hash,
|
||||
digestmap_entries_eq, 0.6, malloc, realloc, free);
|
||||
digestmap_entries_eq, 0.6, malloc, realloc, free)
|
||||
|
||||
/** Constructor to create a new empty map from strings to void*'s.
|
||||
*/
|
||||
|
||||
@@ -193,7 +193,7 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
|
||||
prefix##iter_t *prefix##iter_next_rmv(maptype *map, prefix##iter_t *iter); \
|
||||
void prefix##iter_get(prefix##iter_t *iter, keytype *keyp, void **valp); \
|
||||
int prefix##iter_done(prefix##iter_t *iter); \
|
||||
void prefix##assert_ok(const maptype *map);
|
||||
void prefix##assert_ok(const maptype *map)
|
||||
|
||||
/* Map from const char * to void *. Implemented with a hash table. */
|
||||
DECLARE_MAP_FNS(strmap_t, const char *, strmap_);
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/* Copyright 2007 Nick Mathewson */
|
||||
/* See LICENSE for licensing information */
|
||||
/* $Id$ */
|
||||
#if 1
|
||||
/* Tor dependencies */
|
||||
#include "orconfig.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user