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: Wed, 21 May 2008 08:43:35 +0530

diff --git a/lisp/files.el b/lisp/files.el
index ee5efe4..bb8a021 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))
-       (result nil))
-    (while (and (not (string= dir "/"))
+        (result nil)
+        (prevdir nil))
+    (while (and (not (string= dir prevdir))
                (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 prevdir dir)
        (setq dir (file-name-directory (directory-file-name dir))))))
     result))

diff --git a/src/font.c b/src/font.c
index 69d1906..f7f9e33 100644
--- a/src/font.c
+++ b/src/font.c
@@ -22,7 +22,11 @@ along with GNU Emacs.  If not, see
<http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef _MSC_VER
+#include <string.h>
+#else
 #include <strings.h>
+#endif
 #include <ctype.h>
 #ifdef HAVE_M17N_FLT
 #include <m17n-flt.h>
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index 3e043c8..54311d1 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -510,6 +510,11 @@ extern void _DebPrint (const char *fmt, ...);
 #define DebPrint(stuff)
 #endif

+#ifdef _MSC_VER
+#ifndef strcasecmp
+#define strcasecmp(a,b) stricmp(a,b)
+#endif
+#endif

 /* ============================================================ */



On Tue, May 20, 2008 at 11:42 PM, Eli Zaretskii <address@hidden> wrote:
>> Date: Tue, 20 May 2008 10:28:58 +0530
>> From: dhruva <address@hidden>
>>
>> +#ifdef WINDOWSNT
>> +#include <string.h>
>> +#ifndef strcasecmp
>> +#define strcasecmp(a,b) stricmp(a,b)
>> +#endif
>
> Thanks, but please put the strcasecmp define in src/s/ms-w32.h.
> There's no need to infect general files with OS-specific stuff.
> As a bonus, you will need only one such #define that will take care of
> all the uses of strcasecmp.
>

done.

-dky

-- 
Contents reflect my personal views only!




reply via email to

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