From 0012013017feb6064b6e767b30cd3f499ec960a8 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Thu, 3 May 2001 23:42:31 +0000 Subject: [PATCH] * socket.c: define uint32_t if netdb.h doesn't. thanks to Dale P. Smith. --- libguile/ChangeLog | 5 +++++ libguile/socket.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index db6ebcbb5..a21b2562f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2001-05-04 Gary Houston + + * socket.c: define uint32_t if netdb.h doesn't. thanks to + Dale P. Smith. + 2001-05-02 Marius Vollmer * rw.c: Include "modules.h" and "strports.h". diff --git a/libguile/socket.c b/libguile/socket.c index 88270373a..4e60d16f6 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -76,6 +76,16 @@ + strlen ((ptr)->sun_path)) #endif +#if !defined (HAVE_UINT32_T) +#if SIZEOF_INT == 4 +typedef unsigned int uint32_t; +#elif SIZEOF_LONG == 4 +typedef unsigned long uint32_t; +#else +#error can not define uint32_t +#endif +#endif + /* we are not currently using socklen_t. it's not defined on all systems, so would need to be checked by configure. in the meantime, plain int is the best alternative. */