unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [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

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).