[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syncing Emacs from sources maintained elsewhere
From: |
Paul Eggert |
Subject: |
Re: syncing Emacs from sources maintained elsewhere |
Date: |
Wed, 19 Jan 2011 02:38:59 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
I got a copy of preprocessed sources from bryan d. o'connor.
Here's what seems to be the problem:
* <config.h> has "#define __GETOPT_PREFIX rpl_" as expected.
* unexmacosx.c includes the Gnulib <unistd.h>.
* The Gnulib <unistd.h> includes the system unistd.h, which declares
the getopt-related names itself (without including anything) and then
finishes.
* The Gnulib <unistd.h> then includes the Gnulib <getopt.h>.
* The Gnulib <getopt.h> includes the system getopt.h.
* The system getopt.h includes the Gnulib <unistd.h>.
* This inner Gnulib <unistd.h> does nothing, and finishes.
* The system getopt.h declares 'struct option' and other stuff, and finishes.
* The Gnulib <getopt.h> then does this:
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if address@hidden@
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
# endif
# undef __need_getopt
...
# undef option
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
...
# define option __GETOPT_ID (option)
...
#endif
* This should "#define option rpl_option", but apparently it doesn't.
* Presumably __GETOPT_PREFIX is defined, but __need_getopt is also defined,
so the entire #if is skipped.
* And when Gnulib <getopt.h> declares a 'struct option', this clashes
with the 'struct option' declared in the system getopt.h.
If my analysis is right, we need to figure out why __need_getopt is
defined. Can you send the output of the following?
cd emacs
grep -r __need_getopt . /usr/include
PS. This all seems to be a case where we should be using Gnulib's
identifier replacement mechanism, but I don't understand it that
well and if memory serves it doesn't work with struct tags anyway.
- Re: syncing Emacs from sources maintained elsewhere, Paul Eggert, 2011/01/17
- Re: syncing Emacs from sources maintained elsewhere, Stefan Monnier, 2011/01/17
- Message not available
- Message not available
- Message not available
- Message not available
- Re: syncing Emacs from sources maintained elsewhere, Paul Eggert, 2011/01/19
- Message not available
- Message not available
- Re: syncing Emacs from sources maintained elsewhere,
Paul Eggert <=
- Re: syncing Emacs from sources maintained elsewhere, Eric Blake, 2011/01/19
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Jan Djärv, 2011/01/20
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Paul Eggert, 2011/01/19
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Eli Zaretskii, 2011/01/19
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Jan Djärv, 2011/01/20
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Paul Eggert, 2011/01/20
- Re: bug#7859: syncing Emacs from sources maintained elsewhere, Jan D., 2011/01/20
- Message not available