emacs-devel
[Top][All Lists]
Advanced

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

Re: empty-directory predicate, native implementation


From: Eli Zaretskii
Subject: Re: empty-directory predicate, native implementation
Date: Wed, 14 Oct 2020 17:08:36 +0300

> From: Arthur Miller <arthur.miller@live.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 13 Oct 2020 21:59:47 +0200
> 
> Can I ask two questions, just for my learning; you seem to handle
> ascii/unicode "manually"; in w32.c I have seen quite a few places where
> switch is done on if(w32_unicode_filenames); is it possible to somehow
> pass to configure script if Emacs should be compiled with wide or asci
> version of win api? 

The idea is not to decide this at configure and compile time, but at
runtime.  That way, the same Emacs binary can run both on systems that
support "wide" (a.k.a. "Unicode") APIs and on systems that don't.
Think about users who download the "official" binaries from the GNU
FTP site.

Besides, the compile-time "switch" to Unicode makes all TCHAR
variables be wchar_t under the hood, which means one cannot use
strlen, strcat, etc.  So this "feature" is a mixed blessing,
especially when the internal encoding is UTF-8.

> Second question: block_input; is there some general rule(s) what calls you
> enclose with block/unblock_input? I guess OS will anyway block the
> process after call to SYS_getdents so I didn't enclosed it; but I am not
> sure if that would be needed at all or not.

See the commentary in src/blockinput.h, I hope it answers the
question.



reply via email to

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