From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dhruva Newsgroups: gmane.emacs.devel Subject: Re: Build failure on M$ (using MSVC): Patch enclosed Date: Wed, 21 May 2008 08:43:35 +0530 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211339639 23226 80.91.229.12 (21 May 2008 03:13:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2008 03:13:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 21 05:14:35 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jyemf-0001tV-0y for ged-emacs-devel@m.gmane.org; Wed, 21 May 2008 05:14:33 +0200 Original-Received: from localhost ([127.0.0.1]:54905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jyelu-0000kp-HD for ged-emacs-devel@m.gmane.org; Tue, 20 May 2008 23:13:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jyelp-0000hA-P6 for emacs-devel@gnu.org; Tue, 20 May 2008 23:13:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jyelm-0000f7-Ha for emacs-devel@gnu.org; Tue, 20 May 2008 23:13:41 -0400 Original-Received: from [199.232.76.173] (port=48049 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jyelm-0000eq-Ca for emacs-devel@gnu.org; Tue, 20 May 2008 23:13:38 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.191]:28597) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jyell-0002RH-UD for emacs-devel@gnu.org; Tue, 20 May 2008 23:13:38 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so1756474tia.10 for ; Tue, 20 May 2008 20:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=FTUBcPQzChajJiIwjoRL9mJs4Dp5G+6348Erndw4kcM=; b=f6K225jTeTg34kmuTsyRR/Z5/L1JHqbtCoNU55J1Opy1ZOn8ZAQ67qpgQ+kW8+RlD+x0ozhjUNkFFHrWYks4DUYkv7EAD555PXkeD5Zg68g+NhcWN0KbNzSer3xkBJO7xiruA31w9V2Ebci9TwQqF+uKAVcInzCHYfOKVMXJWPw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eRp01N+yEokXPTiuQcaZzzX7fjV66CDuS51/8lfJNBeBYdTDRcpnZ9/LDHkfZ6jetMHYPWFokzMj1c1OvSNS09LNAA71aNDYWXOuzqPbSmlOlxBqWICaJV3E99AFaBI+/gbjL6H0VjYyZGAXktWW48Vb4MdZ43NVC0bV8NsQYus= Original-Received: by 10.110.84.3 with SMTP id h3mr1181530tib.48.1211339615697; Tue, 20 May 2008 20:13:35 -0700 (PDT) Original-Received: by 10.110.93.15 with HTTP; Tue, 20 May 2008 20:13:35 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97468 Archived-At: 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 . */ #include #include #include +#ifdef _MSC_VER +#include +#else #include +#endif #include #ifdef HAVE_M17N_FLT #include 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 wrote: >> Date: Tue, 20 May 2008 10:28:58 +0530 >> From: dhruva >> >> +#ifdef WINDOWSNT >> +#include >> +#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!