summaryrefslogtreecommitdiff
path: root/libguile/numbers.c
diff options
context:
space:
mode:
authorStefan Jahn <stefan@lkcc.org>2001-11-21 07:59:53 +0000
committerStefan Jahn <stefan@lkcc.org>2001-11-21 07:59:53 +0000
commit6063dc1ddd76d0d4bc74f86faae9462d855ceff5 (patch)
tree41e38b5acebf6f3068a6149e6a4c5935dc727d09 /libguile/numbers.c
parent351982f656ad8b0e9754b368fb89e751ad226500 (diff)
downloadguile-6063dc1ddd76d0d4bc74f86faae9462d855ceff5.tar.gz
2001-11-21 Stefan Jahn <stefan@lkcc.org>
* win32-socket.c (getservent, setservent, endservent, getprotoent, setprotoent, endprotoent): New functions. Appropriate replacements for M$-Windows. * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced these definitions for GUILE_DEBUG. * net_db.c: Include "win32-socket.h" if compiling with a native M$-Windows compiler. Include some pieces of code (protoent and servent interface) protected by HAVE_* macros when using a native M$-Windows compiler.
Diffstat (limited to 'libguile/numbers.c')
-rw-r--r--libguile/numbers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 154974d24..4afc1578b 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -4390,6 +4390,17 @@ scm_i_big2dbl (SCM b)
#ifdef GUILE_DEBUG
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t) (-1))
+#endif
+#ifndef PTRDIFF_MIN
+#define PTRDIFF_MIN \
+ ((ptrdiff_t) ((ptrdiff_t) 1 << (sizeof (ptrdiff_t) * 8 - 1)))
+#endif
+#ifndef PTRDIFF_MAX
+#define PTRDIFF_MAX (~ PTRDIFF_MIN)
+#endif
+
#define CHECK(type, v) \
do { \
if ((v) != scm_num2##type (scm_##type##2num (v), 1, "check_sanity")) \