diff --git a/ChangeLog b/ChangeLog index e352390e..0f2efd76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-26 Nicolas François + + * lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool. + * lib/shadowio.h: Add protection against multiple inclusions. + 2008-05-26 Nicolas François * lib/sgroupio.c: Avoid assignments in comparisons. diff --git a/lib/shadowio.c b/lib/shadowio.c index fe6e7a56..bb59c20c 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c @@ -110,7 +110,7 @@ int spw_name (const char *filename) return commonio_setname (&shadow_db, filename); } -int spw_file_present (void) +bool spw_file_present (void) { return commonio_present (&shadow_db); } diff --git a/lib/shadowio.h b/lib/shadowio.h index 81267bbf..b10f51e0 100644 --- a/lib/shadowio.h +++ b/lib/shadowio.h @@ -30,8 +30,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* $Id$ */ +#ifndef _SHADOWIO_H +#define _SHADOWIO_H + +#include "defines.h" + extern int spw_close (void); -extern int spw_file_present (void); +extern bool spw_file_present (void); extern const struct spwd *spw_locate (const char *); extern int spw_lock (void); extern int spw_name (const char *); @@ -43,3 +49,4 @@ extern int spw_unlock (void); extern int spw_update (const struct spwd *); extern int spw_sort (void); +#endif