From d7b5499013188ddc78f2b770cce78543b3b7c48c Mon Sep 17 00:00:00 2001 From: venaas Date: Thu, 5 Feb 2009 10:09:14 +0000 Subject: timeout for connect git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@467 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- list.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'list.h') diff --git a/list.h b/list.h index 777ed78..4607317 100644 --- a/list.h +++ b/list.h @@ -1,11 +1,17 @@ /* - * Copyright (C) 2006-2008 Stig Venaas + * Copyright (C) 2006-2009 Stig Venaas * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. */ +#ifdef SYS_SOLARIS9 +#include +#else +#include +#endif + struct list_node { struct list_node *next; void *data; @@ -13,6 +19,7 @@ struct list_node { struct list { struct list_node *first, *last; + uint32_t count; }; /* allocates and initialises list structure; returns NULL if malloc fails */ @@ -35,3 +42,6 @@ struct list_node *list_first(struct list *list); /* returns the next node after the argument */ struct list_node *list_next(struct list_node *node); + +/* returns number of nodes */ +uint32_t list_count(struct list *list); -- cgit v1.1