* Resolving conflicts between gnulib and nt/inc headers
@ 2013-03-30 17:29 Eli Zaretskii
2013-03-30 19:00 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2013-03-30 17:29 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
In my work on building the w32 Emacs by running the Posix configury, I
hit a problem with headers produced in lib/ which conflict with the
headers we have in nt/inc/ and with the MinGW system headers.
In the current Windows build scripts, most of the lib/*.in.h templates
are not edited into the corresponding *.h files, so these problems
never arise. But when using the Posix build procedure, lib/Makefile
is produced such that most of these headers are generated
unconditionally (so I cannot control that from the configure script).
Here's a partial list of those headers:
inttypes.h
sys/stat.h
time.h
signal.h
stdio.h
For now, I'm forced to use a very dirty trick: define some macro that
forces gnulib headers to just #include_next the same header either
from nt/inc or from the syste, include directory. E.g., to bypass
gnulib's time.h, I define _GL_TIME_H (yuck!). But I certainly hope
there is a cleaner way, or perhaps gnulib maintainers could add a
cleaner way if there isn't one already. E.g., how can I prevent
certain headers from being produced from their *.in.h templates?
Any suggestions are welcome. TIA.
P.S. Progress report: (1) the configure script runs and produces a
correct src/config.h; (2) the programs in lib-src compile and link OK;
(3) C sources in src/ compile with a few warnings and one error.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Resolving conflicts between gnulib and nt/inc headers
2013-03-30 17:29 Resolving conflicts between gnulib and nt/inc headers Eli Zaretskii
@ 2013-03-30 19:00 ` Paul Eggert
2013-03-30 21:21 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2013-03-30 19:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On 03/30/13 10:29, Eli Zaretskii wrote:
> how can I prevent
> certain headers from being produced from their *.in.h templates?
One possibility would be to edit lib/Makefile.am
to replace this line:
include gnulib.mk
with something like this:
if WINDOWSNT
include ../nt/gnulib.mk
else
include gnulib.mk
endif
and to add something like this to configure.ac:
AM_CONDITIONAL([WINDOWSNT], [test that we're running under MS-Windows])
You can then put into the MS-Windows gnulib.mk
whatever you like.
Ideally the Emacs and Gnulib substitutes should be
merged, of course, but that's a bigger project.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Resolving conflicts between gnulib and nt/inc headers
2013-03-30 19:00 ` Paul Eggert
@ 2013-03-30 21:21 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2013-03-30 21:21 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
> Date: Sat, 30 Mar 2013 12:00:11 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: emacs-devel@gnu.org
>
> One possibility would be to edit lib/Makefile.am
> to replace this line:
>
> include gnulib.mk
>
> with something like this:
>
> if WINDOWSNT
> include ../nt/gnulib.mk
> else
> include gnulib.mk
> endif
Thanks, this is indeed much cleaner. I will see to making this
happen.
> Ideally the Emacs and Gnulib substitutes should be
> merged, of course, but that's a bigger project.
Indeed. I actually considered that as an alternative, but the current
substitutes in Emacs are not easily extracted to separate files, and
some of them depend on non-trivial infrastructure that might not even
be appropriate for a general-purpose library.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-30 21:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-30 17:29 Resolving conflicts between gnulib and nt/inc headers Eli Zaretskii
2013-03-30 19:00 ` Paul Eggert
2013-03-30 21:21 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.