emacs-devel
[Top][All Lists]
Advanced

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

Re: Build failure on M$ (using MSVC): Patch enclosed


From: dhruva
Subject: Re: Build failure on M$ (using MSVC): Patch enclosed
Date: Tue, 20 May 2008 17:31:31 +0530

The complete patch for fixing the build on MSVC and the infinite loop
in files.el:

diff --git a/lisp/files.el b/lisp/files.el
index ee5efe4..48b992b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3120,8 +3120,9 @@ If the file is in a registered project, a cons from
 `project-directory-alist' is returned.
 Otherwise this returns nil."
   (let ((dir (file-name-directory file))
+       (prev "")
        (result nil))
-    (while (and (not (string= dir "/"))
+    (while (and (not (string= dir prev))
                (not result))
       (cond
        ((setq result (assoc dir project-directory-alist))
@@ -3130,6 +3131,7 @@ Otherwise this returns nil."
        ((file-exists-p (expand-file-name ".dir-settings.el" dir))
        (setq result (expand-file-name ".dir-settings.el" dir)))
        (t
+       (setq prev dir)
        (setq dir (file-name-directory (directory-file-name dir))))))
     result))

diff --git a/src/font.c b/src/font.c
index 4f75615..4081ef8 100644
--- a/src/font.c
+++ b/src/font.c
@@ -22,7 +22,14 @@ along with GNU Emacs.  If not, see
<http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
+#if defined(WINDOWSNT) && !defined(__GNUC__)
+#include <string.h>
+#ifndef strcasecmp
+#define strcasecmp(a,b) stricmp(a,b)
+#endif
+#else
 #include <strings.h>
+#endif
 #include <ctype.h>
 #ifdef HAVE_M17N_FLT
 #include <m17n-flt.h>
diff --git a/src/fontset.c b/src/fontset.c
index 82e5b4e..60e14e0 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -66,6 +66,12 @@ along with GNU Emacs.  If not, see
<http://www.gnu.org/licenses/>.  */
 #define xassert(X)     (void) 0
 #endif /* not FONTSET_DEBUG */

+#if defined(WINDOWSNT) && !defined(__GNUC__)
+#ifndef strcasecmp
+#define strcasecmp(a,b) stricmp(a,b)
+#endif
+#endif
+
 EXFUN (Fclear_face_cache, 1);

 /* FONTSET


-dk

-- 
Contents reflect my personal views only!




reply via email to

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