bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch] Some fixes for the MinGW port


From: Cesar Strauss
Subject: [Patch] Some fixes for the MinGW port
Date: Wed, 03 Jan 2007 07:49:00 -0200
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

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

* libguile:
2007-01-01  Cesar Strauss  <address@hidden>

        * 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  <address@hidden>

        * 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  <address@hidden>

        * 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]