* [Patch] Some fixes for the MinGW port
@ 2007-01-03 9:49 Cesar Strauss
2007-01-03 21:18 ` Kevin Ryde
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Cesar Strauss @ 2007-01-03 9:49 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hi,
The attached patch addresses the following issues on MinGW, when
building the CVS HEAD version of guile:
- The SCM_API tag is missing on some exported symbols;
- The LC_MESSAGES macro and the SIGBUS signal are not available on MinGW.
- The colon, when used as a delimiter in a sed command, conflicts with
paths that include a drive letter (e.g. 'c:/mingw/bin').
Cesar
[-- Attachment #2: mingw.patch.txt --]
[-- Type: text/plain, Size: 5409 bytes --]
* libguile:
2007-01-01 Cesar Strauss <cstrauss@cea.inpe.br>
* deprecated.h, version.h.in: Export some more symbols using SCM_API
(necessary on mingw).
Not all platforms define the LC_MESSAGES macro (e.g. mingw):
* i18n.c (LC_MESSAGES_MASK)[!LC_MESSAGES]: Define to 0.
* locale-categories.h (MESSAGES): Define only when LC_MESSAGES is
defined.
* guile-config:
2007-01-01 Cesar Strauss <cstrauss@cea.inpe.br>
* Makefile.am (guile-config): Use the pipe symbol as the sed delimiter
for the 'bindir' substitution. The colon was already used in directory
names on mingw (e.g. 'c:/mingw').
* ice-9:
2007-01-01 Cesar Strauss <cstrauss@cea.inpe.br>
* boot-9.scm (top-repl): In the 'signals' list, only include the SIGBUS
entry if it was defined (which is not the case on mingw).
Index: libguile/deprecated.h
===================================================================
RCS file: /sources/guile/guile/guile-core/libguile/deprecated.h,v
retrieving revision 1.39
diff -u -r1.39 deprecated.h
--- libguile/deprecated.h 17 Apr 2006 00:05:39 -0000 1.39
+++ libguile/deprecated.h 1 Jan 2007 18:38:42 -0000
@@ -164,7 +164,7 @@
SCM (*fcn)(),
SCM *gf);
-extern SCM scm_create_hook (const char* name, int n_args);
+SCM_API SCM scm_create_hook (const char* name, int n_args);
#define SCM_LIST0 SCM_EOL
#define SCM_LIST1(e0) scm_cons ((e0), SCM_EOL)
Index: libguile/version.h.in
===================================================================
RCS file: /sources/guile/guile/guile-core/libguile/version.h.in,v
retrieving revision 1.7
diff -u -r1.7 version.h.in
--- libguile/version.h.in 17 Apr 2006 00:05:42 -0000 1.7
+++ libguile/version.h.in 1 Jan 2007 18:38:43 -0000
@@ -30,12 +30,12 @@
#define SCM_MINOR_VERSION @-GUILE_MINOR_VERSION-@
#define SCM_MICRO_VERSION @-GUILE_MICRO_VERSION-@
-extern SCM scm_major_version (void);
-extern SCM scm_minor_version (void);
-extern SCM scm_micro_version (void);
-extern SCM scm_effective_version (void);
-extern SCM scm_version (void);
-extern void scm_init_version (void);
+SCM_API SCM scm_major_version (void);
+SCM_API SCM scm_minor_version (void);
+SCM_API SCM scm_micro_version (void);
+SCM_API SCM scm_effective_version (void);
+SCM_API SCM scm_version (void);
+SCM_API void scm_init_version (void);
#endif /* SCM_VERSION_H */
Index: libguile/i18n.c
===================================================================
RCS file: /sources/guile/guile/guile-core/libguile/i18n.c,v
retrieving revision 1.6
diff -u -r1.6 i18n.c
--- libguile/i18n.c 18 Nov 2006 18:14:55 -0000 1.6
+++ libguile/i18n.c 1 Jan 2007 18:38:43 -0000
@@ -105,7 +105,11 @@
# define LC_CTYPE_MASK (1 << LC_CTYPE)
# define LC_COLLATE_MASK (1 << LC_COLLATE)
-# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
+# ifdef LC_MESSAGES /* undefined on mingw */
+# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
+# else
+# define LC_MESSAGES_MASK 0
+# endif
# define LC_MONETARY_MASK (1 << LC_MONETARY)
# define LC_NUMERIC_MASK (1 << LC_NUMERIC)
# define LC_TIME_MASK (1 << LC_TIME)
Index: libguile/locale-categories.h
===================================================================
RCS file: /sources/guile/guile/guile-core/libguile/locale-categories.h,v
retrieving revision 1.1
diff -u -r1.1 locale-categories.h
--- libguile/locale-categories.h 18 Nov 2006 18:18:23 -0000 1.1
+++ libguile/locale-categories.h 1 Jan 2007 18:38:43 -0000
@@ -21,7 +21,9 @@
/* The six standard categories, as defined in IEEE Std 1003.1-2001. */
SCM_DEFINE_LOCALE_CATEGORY (COLLATE)
SCM_DEFINE_LOCALE_CATEGORY (CTYPE)
+#ifdef LC_MESSAGES /* undefined on mingw */
SCM_DEFINE_LOCALE_CATEGORY (MESSAGES)
+#endif
SCM_DEFINE_LOCALE_CATEGORY (MONETARY)
SCM_DEFINE_LOCALE_CATEGORY (NUMERIC)
SCM_DEFINE_LOCALE_CATEGORY (TIME)
Index: guile-config/Makefile.am
===================================================================
RCS file: /sources/guile/guile/guile-core/guile-config/Makefile.am,v
retrieving revision 1.10
diff -u -r1.10 Makefile.am
--- guile-config/Makefile.am 16 Apr 2006 23:36:35 -0000 1.10
+++ guile-config/Makefile.am 31 Dec 2006 16:21:26 -0000
@@ -35,7 +35,7 @@
guile-config: guile-config.in ${top_builddir}/libguile/libpath.h
rm -f guile-config.tmp
sed < ${srcdir}/guile-config.in > guile-config.tmp \
- -e s:@-bindir-@:${bindir}: \
+ -e 's|@-bindir-@|${bindir}|' \
-e s:@-GUILE_VERSION-@:${GUILE_VERSION}:
chmod +x guile-config.tmp
mv guile-config.tmp guile-config
Index: ice-9/boot-9.scm
===================================================================
RCS file: /sources/guile/guile/guile-core/ice-9/boot-9.scm,v
retrieving revision 1.359
diff -u -r1.359 boot-9.scm
--- ice-9/boot-9.scm 13 Nov 2006 22:22:06 -0000 1.359
+++ ice-9/boot-9.scm 1 Jan 2007 18:38:37 -0000
@@ -3405,11 +3405,15 @@
(let ((old-handlers #f)
(signals (if (provided? 'posix)
- `((,SIGINT . "User interrupt")
- (,SIGFPE . "Arithmetic error")
- (,SIGBUS . "Bad memory access (bus error)")
- (,SIGSEGV
- . "Bad memory access (Segmentation violation)"))
+ (append
+ `((,SIGINT . "User interrupt"))
+ `((,SIGFPE . "Arithmetic error"))
+ `((,SIGSEGV
+ . "Bad memory access (Segmentation violation)"))
+ ;; SIGBUS is not present on mingw
+ (if (defined? 'SIGBUS)
+ `((,SIGBUS . "Bad memory access (bus error)"))
+ '()))
'())))
(dynamic-wind
[-- Attachment #3: Type: text/plain, Size: 137 bytes --]
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 9:49 [Patch] Some fixes for the MinGW port Cesar Strauss
@ 2007-01-03 21:18 ` Kevin Ryde
2007-01-04 2:28 ` Cesar Strauss
2007-01-05 9:05 ` Ludovic Courtès
2007-01-03 21:25 ` Kevin Ryde
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Kevin Ryde @ 2007-01-03 21:18 UTC (permalink / raw)
Cc: bug-guile
Cesar Strauss <cstrauss@cea.inpe.br> writes:
>
> The attached patch addresses the following issues on MinGW, when
> building the CVS HEAD version of guile:
Actually, portability things are being tackled first in the 1.8
branch, then merged into the head periodically. There's some mingw
pthread fixes there which haven't made it to the head yet for
instance, if you'd like to give them a try.
> -# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
> +# ifdef LC_MESSAGES /* undefined on mingw */
> +# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
> +# else
> +# define LC_MESSAGES_MASK 0
> +# endif
I'll leave that for Ludovic to contemplate, I think he said he'll
change it to use just the base LC bits, not an extra set of mask
values.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 21:18 ` Kevin Ryde
@ 2007-01-04 2:28 ` Cesar Strauss
2007-01-05 0:58 ` Cesar Strauss
2007-01-05 9:05 ` Ludovic Courtès
1 sibling, 1 reply; 11+ messages in thread
From: Cesar Strauss @ 2007-01-04 2:28 UTC (permalink / raw)
Kevin Ryde wrote:
>
> Actually, portability things are being tackled first in the 1.8
> branch, then merged into the head periodically.
I switched to the 1.8 branch. It fixes all the issues I raised, thanks!
However, the configure.ac on this branch required an upgrade of my
versions of autoconf/automake, which (I think) caused a couple more
issues. I will investigate this further.
> There's some mingw
> pthread fixes there which haven't made it to the head yet for
> instance, if you'd like to give them a try.
>
Certainly, sounds interesting.
>> -# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
>> +# ifdef LC_MESSAGES /* undefined on mingw */
>> +# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
>> +# else
>> +# define LC_MESSAGES_MASK 0
>> +# endif
>
> I'll leave that for Ludovic to contemplate, I think he said he'll
> change it to use just the base LC bits, not an extra set of mask
> values.
>
>
It is alright, the 1.8 branch doesn't have this issue (yet).
Thanks,
Cesar
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 21:18 ` Kevin Ryde
2007-01-04 2:28 ` Cesar Strauss
@ 2007-01-05 9:05 ` Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2007-01-05 9:05 UTC (permalink / raw)
Cc: bug-guile, Cesar Strauss
Hi,
And best wishes!
Kevin Ryde <user42@zip.com.au> writes:
> Cesar Strauss <cstrauss@cea.inpe.br> writes:
>> -# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
>> +# ifdef LC_MESSAGES /* undefined on mingw */
>> +# define LC_MESSAGES_MASK (1 << LC_MESSAGES)
>> +# else
>> +# define LC_MESSAGES_MASK 0
>> +# endif
>
> I'll leave that for Ludovic to contemplate, I think he said he'll
> change it to use just the base LC bits, not an extra set of mask
> values.
Yes, that is indeed going to change Real Soon Now.
Thanks,
Ludovic.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 9:49 [Patch] Some fixes for the MinGW port Cesar Strauss
2007-01-03 21:18 ` Kevin Ryde
@ 2007-01-03 21:25 ` Kevin Ryde
2007-01-04 2:48 ` Cesar Strauss
2007-01-03 21:47 ` Kevin Ryde
2007-01-04 20:44 ` Kevin Ryde
3 siblings, 1 reply; 11+ messages in thread
From: Kevin Ryde @ 2007-01-03 21:25 UTC (permalink / raw)
Cc: bug-guile
Cesar Strauss <cstrauss@cea.inpe.br> writes:
>
> - The colon, when used as a delimiter in a sed command, conflicts with
> paths that include a drive letter (e.g. 'c:/mingw/bin').
>
> - -e s:@-bindir-@:${bindir}: \
> + -e 's|@-bindir-@|${bindir}|' \
Thanks. Though I think the best advice concerning drive letters is
"don't do that" :-).
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 9:49 [Patch] Some fixes for the MinGW port Cesar Strauss
2007-01-03 21:18 ` Kevin Ryde
2007-01-03 21:25 ` Kevin Ryde
@ 2007-01-03 21:47 ` Kevin Ryde
2007-01-04 2:42 ` Cesar Strauss
2007-01-04 20:44 ` Kevin Ryde
3 siblings, 1 reply; 11+ messages in thread
From: Kevin Ryde @ 2007-01-03 21:47 UTC (permalink / raw)
Cc: bug-guile
Cesar Strauss <cstrauss@cea.inpe.br> writes:
>
> + ;; SIGBUS is not present on mingw
> + (if (defined? 'SIGBUS)
> + `((,SIGBUS . "Bad memory access (bus error)"))
> + '()))
Thanks, I made a similar change. I don't know why it's never shown up
before, maybe noone ever got to the repl on mingw before!
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 21:47 ` Kevin Ryde
@ 2007-01-04 2:42 ` Cesar Strauss
0 siblings, 0 replies; 11+ messages in thread
From: Cesar Strauss @ 2007-01-04 2:42 UTC (permalink / raw)
Kevin Ryde wrote:
> Cesar Strauss <cstrauss@cea.inpe.br> writes:
>> + ;; SIGBUS is not present on mingw
>> + (if (defined? 'SIGBUS)
>> + `((,SIGBUS . "Bad memory access (bus error)"))
>> + '()))
>
> Thanks, I made a similar change. I don't know why it's never shown up
> before, maybe noone ever got to the repl on mingw before!
>
>
Well, it hit me right away when I run the guile program itself, but it
didn't seem to trigger when running scripts or when embedded in other
programs.
Cesar
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Some fixes for the MinGW port
2007-01-03 9:49 [Patch] Some fixes for the MinGW port Cesar Strauss
` (2 preceding siblings ...)
2007-01-03 21:47 ` Kevin Ryde
@ 2007-01-04 20:44 ` Kevin Ryde
3 siblings, 0 replies; 11+ messages in thread
From: Kevin Ryde @ 2007-01-04 20:44 UTC (permalink / raw)
Cc: bug-guile
(Delayed by mail snafu ...)
Cesar Strauss <cstrauss@cea.inpe.br> writes:
>
> -extern SCM scm_create_hook (const char* name, int n_args);
> +SCM_API SCM scm_create_hook (const char* name, int n_args);
>
> -extern SCM scm_major_version (void);
> -extern SCM scm_minor_version (void);
> -extern SCM scm_micro_version (void);
> -extern SCM scm_effective_version (void);
> -extern SCM scm_version (void);
> -extern void scm_init_version (void);
> +SCM_API SCM scm_major_version (void);
> +SCM_API SCM scm_minor_version (void);
> +SCM_API SCM scm_micro_version (void);
> +SCM_API SCM scm_effective_version (void);
> +SCM_API SCM scm_version (void);
Thanks, I made that change.
> +SCM_API void scm_init_version (void);
Not sure if that's meant to be public, it's probably used only within
libguile.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-01-05 9:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-03 9:49 [Patch] Some fixes for the MinGW port Cesar Strauss
2007-01-03 21:18 ` Kevin Ryde
2007-01-04 2:28 ` Cesar Strauss
2007-01-05 0:58 ` Cesar Strauss
2007-01-05 9:05 ` Ludovic Courtès
2007-01-03 21:25 ` Kevin Ryde
2007-01-04 2:48 ` Cesar Strauss
2007-01-04 20:44 ` Kevin Ryde
2007-01-03 21:47 ` Kevin Ryde
2007-01-04 2:42 ` Cesar Strauss
2007-01-04 20:44 ` Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).