bug-gnulib
[Top][All Lists]
Advanced

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

Re: gettimeofday.c windows version?


From: Eli Zaretskii
Subject: Re: gettimeofday.c windows version?
Date: Mon, 12 Dec 2022 22:37:07 +0200

> Date: Mon, 12 Dec 2022 11:44:43 -0800
> Cc: bug-gnulib@gnu.org, rogerdpack@gmail.com
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> On 12/12/22 06:40, Eli Zaretskii wrote:
> > A program's build could use certain cpp switches for some of its
> > sources, and other switches for the other sources.
> 
> It should be easy to arrange for Emacs to compile Gnulib source code 
> with whatever value of _WIN32_WINNT is appropriate for Gnulib, by 
> modifying emacs/lib/Makefile.in appropriately. For example, we could 
> leave gettimeofday.c alone add a line like this to Makefile.in:
> 
>     ALL_CFLAGS += -D_WIN32_WINNT=_WIN32_WINNT_WINXP
> 
> Would something like this address the issue you're thinking of?

In this case, yes.

> Currently Gnulib #defines _WIN32_WINNT in three source code files: 
> lib/ftruncate.c, lib/sethostname.c, and lib/stat-w32.c. Emacs doesn't 
> use any of these files, so they aren't a problem for Emacs. Still, from 
> what you say it might make sense for these three files to not #define 
> _WIN32_WINNT (not that I know what's going on there, as I don't use 
> MS-Windows).

The first two indeed want to use APIs that exist only on Windows 2K
and later, although less capable APIs exist on older versions and
could be used.  The last one does something similar to gettimeofday.c,
so it can be made to behave like you suggested above.



reply via email to

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