summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in3
-rw-r--r--libguile/ChangeLog23
-rw-r--r--libguile/filesys.c2
-rw-r--r--libguile/numbers.c4
-rw-r--r--libguile/posix.c2
-rw-r--r--libguile/stime.c6
-rw-r--r--libguile/strings.c7
-rw-r--r--libguile/threads.c10
-rw-r--r--srfi/ChangeLog5
-rw-r--r--srfi/srfi-1.c28
-rw-r--r--srfi/srfi-1.h2
12 files changed, 69 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f4f5433f..ac1232c1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-03 Stefan Jahn <stefan@lkcc.org>
+
+ * configure.in (isinf): Let configure find the isinf() function
+ on MinGW32 systems.
+
2004-08-27 Kevin Ryde <user42@zip.com.au>
* configure.in (AC_CHECK_MEMBERS): Add struct sockaddr.sin_len and
diff --git a/configure.in b/configure.in
index 0c7568e8f..d42bb51db 100644
--- a/configure.in
+++ b/configure.in
@@ -894,6 +894,9 @@ int main () { return (isinf(0.0) != 0); }],
AC_MSG_CHECKING([for isnan])
AC_LINK_IFELSE(
[#include <math.h>
+#ifdef __MINGW32__
+#define isnan _isnan
+#endif
int main () { return (isnan(0.0) != 0); }],
[AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_ISNAN, 1,
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 007fd8e2b..5e2bc9a63 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,26 @@
+2004-09-03 Stefan Jahn <stefan@lkcc.org>
+
+ * threads.c (scm_threads_mark_stacks): Fixed local variable
+ definitions.
+
+ * strings.c (scm_i_substring_copy, s_scm_string_append): Fixed
+ local variable definitions.
+
+ * stime.c (_POSIX_C_SOURCE): Do not define this item on
+ MinGW32 because it conflicts with its pthread headers.
+ (s_scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
+ (s_scm_strftime): Using scm_from_locale_string() instead of
+ scm_makfrom0str().
+
+ * posix.c (s_scm_putenv): Fixed typo in the !HAVE_UNSETENV
+ part.
+
+ * numbers.c (scm_init_numbers): Removed check_sanity() call
+ inside GUILE_DEBUG. The function has been removed somewhen...
+
+ * filesys.c (_POSIX_C_SOURCE): Do not define this item on
+ MinGW32 because it conflicts with its pthread headers.
+
2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* strings.c (SCM_STRINGP): Accept all strings.
diff --git a/libguile/filesys.c b/libguile/filesys.c
index af3ddc514..78a9dff8a 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -18,7 +18,9 @@
#define _GNU_SOURCE /* ask glibc for everything */
+#ifndef __MINGW32__
#define _POSIX_C_SOURCE 199506L /* for readdir_r elsewhere */
+#endif
#if HAVE_CONFIG_H
# include <config.h>
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 14acd2ab7..19ccedaa2 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -5848,10 +5848,6 @@ scm_init_numbers ()
scm_dblprec[10-2] = (DBL_DIG > 20) ? 20 : DBL_DIG;
#endif
-#ifdef GUILE_DEBUG
- check_sanity ();
-#endif
-
exactly_one_half = scm_permanent_object (scm_divide (SCM_I_MAKINUM (1),
SCM_I_MAKINUM (2)));
#include "libguile/numbers.x"
diff --git a/libguile/posix.c b/libguile/posix.c
index e725e8452..d9cfb529c 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1268,7 +1268,7 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
/* On e.g. Win32 hosts putenv() called with 'name=' removes the
environment variable 'name'. */
int e;
- ptr = scm_malloc (len + 2);
+ char *ptr = scm_malloc (len + 2);
strcpy (ptr, c_str);
strcpy (ptr+len, "=");
rv = putenv (ptr);
diff --git a/libguile/stime.c b/libguile/stime.c
index b850dc2b1..cf24e6668 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -19,7 +19,9 @@
#define _GNU_SOURCE /* ask glibc for everything, in particular strptime */
+#ifndef __MINGW32__
#define _POSIX_C_SOURCE 199506L /* for gmtime_r prototype */
+#endif
#if HAVE_CONFIG_H
# include <config.h>
@@ -509,7 +511,9 @@ SCM_DEFINE (scm_mktime, "mktime", 1, 1, 0,
scm_frame_begin (0);
bdtime2c (sbd_time, &lt, SCM_ARG1, FUNC_NAME);
+#if HAVE_STRUCT_TM_TM_ZONE
scm_frame_free ((char *)lt.tm_zone);
+#endif
SCM_DEFER_INTS;
oldenv = setzone (zone, SCM_ARG2, FUNC_NAME);
@@ -642,7 +646,7 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0,
some OSs, e.g., Solaris. */
SCM zone =
scm_string_append (scm_cons (velts[10],
- scm_cons (scm_makfrom0str ("0"),
+ scm_cons (scm_from_locale_string ("0"),
SCM_EOL)));
have_zone = 1;
diff --git a/libguile/strings.c b/libguile/strings.c
index 9c1057833..cac77b101 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -215,10 +215,10 @@ SCM
scm_i_substring_copy (SCM str, size_t start, size_t end)
{
size_t len = end - start;
- SCM buf;
+ SCM buf, my_buf;
size_t str_start;
get_str_buf_start (&str, &buf, &str_start);
- SCM my_buf = make_stringbuf (len);
+ my_buf = make_stringbuf (len);
memcpy (STRINGBUF_CHARS (my_buf),
STRINGBUF_CHARS (buf) + str_start + start, len);
scm_remember_upto_here_1 (buf);
@@ -732,9 +732,10 @@ SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1,
res = scm_i_make_string (i, &data);
for (l = args; !SCM_NULLP (l); l = SCM_CDR (l))
{
+ size_t len;
s = SCM_CAR (l);
SCM_VALIDATE_STRING (SCM_ARGn, s);
- size_t len = scm_i_string_length (s);
+ len = scm_i_string_length (s);
memcpy (data, scm_i_string_chars (s), len);
data += len;
scm_remember_upto_here_1 (s);
diff --git a/libguile/threads.c b/libguile/threads.c
index d32156eb2..3bb39f10c 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -954,13 +954,15 @@ scm_threads_mark_stacks (void)
abort ();
}
+ {
#if SCM_STACK_GROWS_UP
- long stack_len = t->top - t->base;
- scm_mark_locations (t->base, stack_len);
+ long stack_len = t->top - t->base;
+ scm_mark_locations (t->base, stack_len);
#else
- long stack_len = t->base - t->top;
- scm_mark_locations (t->top, stack_len);
+ long stack_len = t->base - t->top;
+ scm_mark_locations (t->top, stack_len);
#endif
+ }
scm_mark_locations ((SCM_STACKITEM *) t->regs,
((size_t) sizeof(t->regs)
/ sizeof (SCM_STACKITEM)));
diff --git a/srfi/ChangeLog b/srfi/ChangeLog
index ec8a6debe..5a6cc845c 100644
--- a/srfi/ChangeLog
+++ b/srfi/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-03 Stefan Jahn <stefan@lkcc.org>
+
+ * srfi-1.c, srfi-1.h: Renamed any 'lst1' into 'list1' because
+ lst1 is a #define on Win32 systems.
+
2004-08-26 Kevin Ryde <user42@zip.com.au>
* srfi-31.scm (rec): Add missing `error' to else clause.
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c
index c194f66b5..f7c7a18b9 100644
--- a/srfi/srfi-1.c
+++ b/srfi/srfi-1.c
@@ -72,13 +72,13 @@ SCM_REGISTER_PROC (s_srfi1_concatenate_x, "concatenate!", 1, 0, 0, scm_append_x)
SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
- (SCM pred, SCM lst1, SCM rest),
+ (SCM pred, SCM list1, SCM rest),
"Return a count of the number of times @var{pred} returns true\n"
"when called on elements from the given lists.\n"
"\n"
"@var{pred} is called with @var{N} parameters @code{(@var{pred}\n"
"@var{elem1} @dots{} @var{elemN})}, each element being from the\n"
- "corresponding @var{lst1} @dots{} @var{lstN}. The first call is\n"
+ "corresponding @var{list1} @dots{} @var{lstN}. The first call is\n"
"with the first element of each list, the second with the second\n"
"element from each, and so on.\n"
"\n"
@@ -98,37 +98,37 @@ SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
pred_tramp = scm_trampoline_1 (pred);
SCM_ASSERT (pred_tramp, pred, SCM_ARG1, FUNC_NAME);
- for ( ; SCM_CONSP (lst1); lst1 = SCM_CDR (lst1))
- count += scm_is_true (pred_tramp (pred, SCM_CAR (lst1)));
+ for ( ; SCM_CONSP (list1); list1 = SCM_CDR (list1))
+ count += scm_is_true (pred_tramp (pred, SCM_CAR (list1)));
end_lst1:
- SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (lst1), lst1, SCM_ARG2, FUNC_NAME,
+ SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (list1), list1, SCM_ARG2, FUNC_NAME,
"list");
}
else if (SCM_CONSP (rest) && SCM_NULLP (SCM_CDR (rest)))
{
/* two lists */
scm_t_trampoline_2 pred_tramp;
- SCM lst2;
+ SCM list2;
pred_tramp = scm_trampoline_2 (pred);
SCM_ASSERT (pred_tramp, pred, SCM_ARG1, FUNC_NAME);
- lst2 = SCM_CAR (rest);
+ list2 = SCM_CAR (rest);
for (;;)
{
- if (! SCM_CONSP (lst1))
+ if (! SCM_CONSP (list1))
goto end_lst1;
- if (! SCM_CONSP (lst2))
+ if (! SCM_CONSP (list2))
{
- SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (lst2), lst2, SCM_ARG3,
+ SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (list2), list2, SCM_ARG3,
FUNC_NAME, "list");
break;
}
count += scm_is_true (pred_tramp
- (pred, SCM_CAR (lst1), SCM_CAR (lst2)));
- lst1 = SCM_CDR (lst1);
- lst2 = SCM_CDR (lst2);
+ (pred, SCM_CAR (list1), SCM_CAR (list2)));
+ list1 = SCM_CDR (list1);
+ list2 = SCM_CDR (list2);
}
}
else
@@ -138,7 +138,7 @@ SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
int argnum;
/* lstlst is a list of the list arguments */
- lstlst = scm_cons (lst1, rest);
+ lstlst = scm_cons (list1, rest);
/* args is the argument list to pass to pred, same length as lstlst,
re-used for each call */
diff --git a/srfi/srfi-1.h b/srfi/srfi-1.h
index e53fd4e63..a851a4bab 100644
--- a/srfi/srfi-1.h
+++ b/srfi/srfi-1.h
@@ -32,7 +32,7 @@
# define SCM_SRFI1_API extern
#endif
-SCM_SRFI1_API SCM scm_srfi1_count (SCM pred, SCM lst1, SCM rest);
+SCM_SRFI1_API SCM scm_srfi1_count (SCM pred, SCM list1, SCM rest);
SCM_SRFI1_API SCM scm_srfi1_delete (SCM x, SCM lst, SCM pred);
SCM_SRFI1_API SCM scm_srfi1_delete_x (SCM x, SCM lst, SCM pred);
SCM_SRFI1_API SCM scm_srfi1_delete_duplicates (SCM lst, SCM pred);