> From: Bruno Haible <br...@clisp.org>
> Cc: Paul Eggert <egg...@cs.ucla.edu>, Collin Funk <collin.fu...@gmail.com>, 
> bug-gnulib@gnu.org
> Date: Thu, 06 Jun 2024 09:47:30 +0200
> 
> 1) 
> > On Windows 9X
> > Emacs loads the UNICOWS.DLL shared library at startup to be able to
> > use some functions ...
> 
> Can the source code call the functions of UNICOWS.DLL directly, or
> do these functions all need to be call via pointers obtained via
> GetProcAddress()?

In general, they can be called directly, since we load UNICOWS.DLL
early at startup, and refuse to run on Windows 9X if it is not
available.  But there are a couple of exceptions (nothing is ever
simple with this backward-compatibility business), as you can see if
you search the Emacs sources for "unicows" (case-insensitively).

> 2)
> > As an example, this discussion mentions _wsetlocale, which according
> > to my records is not in UNICOWS.DLL
> 
> Do you have a list of symbols that are safe to call? We have a database
> of available symbols per platform in
> https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=tree;f=platforms/various-symlists
> and it would be useful to add Windows9X+unicows there.

I use this list:

  
http://svn.apache.org/repos/asf/openoffice/trunk/main/sal/systools/win32/uwinapi/unicows.dxp

It has never failed me till now.  I also have this DLL on my machine,
so I can easily verify stuff using 'pexports' and the likes.  The
problem here is that some implementations there are stubs that always
fail...

> Similarly, what about the runtime library symbols (MSVCRT.DLL)?
> According to our database, _wsetlocale is contained in libmsvcrt, see
> https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=platforms/various-symlists/mingw/libmsvcrt
> If Emacs is using an older version of MSVCRT.DLL than the one I had,
> we would need the list of symbols from that DLL (more precisely, from
> its .lib file) too.

AFAIK, all versions of MSVCRT.DLL since Windows NT have _wsetlocale.
Windows 9X in general don't have any _w* "wide" functions, and need to
use UNICOWS.DLL to do so.

I also have MSVCRT.DLL from Windows 98 and from XP, and I verified
with 'pexports' that it does have _wsetlocale (although whether it
works or is a stub I cannot say -- but I would expect it to work,
since the MS documentation doesn't say anything about it being limited
for some Windows versions).

> 3) Do you have a list of header files that are available in this environment?
> I.e. does unicows come with a set of header files of its own, or is it merely
> the set of header files from mingw, which we have in our database here:
> https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=platforms/various-includes/mingw.list
> ?

UNICOWS.DLL does not come with header files AFAIK, it comes with the
DLL and the corresponding .lib file.  See

  
https://web.archive.org/web/20040202204105/http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx

> 4) Is the condition for Emacs-specific code still 'defined emacs', or has it
> changed over the years?

That is still the condition we use, yes.

Reply via email to