emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCHES] 21.3.50 for Cygwin: patch 5


From: Joe Buehler
Subject: Re: [PATCHES] 21.3.50 for Cygwin: patch 5
Date: Fri, 03 Jan 2003 11:19:15 -0500
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2.1) Gecko/20021130

Eli Zaretskii wrote:

+#ifdef _P
+#undef _P
+#endif
 #ifndef _P
 # ifdef __STDC__
 #  define _P(a) a

Why isn't the original #ifndef guard enough to solve the problem on Cygwin? Could you please show how does the original code fail, and explain why?

The problem is that _P is defined in the cygwin header files in a manner
that is incompatible with its usage above.  It is one of a set of macros
used in code that classifies characters as white space, printable, etc.:

ctype.h:#define _P      020
ctype.h:#define ispunct(c)      ((_ctype_+1)[(unsigned)(c)]&_P)
ctype.h:#define isprint(c)      ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B))
ctype.h:#define isgraph(c)      ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N))

The above usage in pop.c does not seem correct to me -- aren't symbols
beginning with _ supposed to be reserved for the compilation system, to avoid
conflicts such as this one?

--- src/mem-limits.h    19 Aug 2002 17:45:50 -0000      1.31
+++ src/mem-limits.h    6 Dec 2002 16:35:33 -0000
@@ -46,6 +46,10 @@
 #define BSD4_2
 #endif

+#ifdef CYGWIN
+#define BSD4_2
+#endif


Can't this be done in src/s/cygwin.h?

Setgid on a directory does not cause group inheritance under cygwin,
so the code in dired.c for BSD4_2 is incorrect in that case.  The ifdef
could be moved to dired.c.  I don't like the idea of defining it in
cygwin.h, however, since BSD4_2 has nothing to do with cygwin...
--
Joe Buehler





reply via email to

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