From: Paul Eggert <eggert@cs.ucla.edu>
To: emacs-devel@gnu.org
Cc: bug-gnulib <bug-gnulib@gnu.org>,
7856@debbugs.gnu.org, 7859@debbugs.gnu.org
Subject: bug#7856: syncing Emacs from sources maintained elsewhere
Date: Wed, 19 Jan 2011 02:38:59 -0800 [thread overview]
Message-ID: <4D36BF43.3050007__5682.28888228095$1295434496$gmane$org@cs.ucla.edu> (raw)
In-Reply-To: <25y66hjmiu.fsf@fencepost.gnu.org>
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 !@HAVE_GETOPT_H@
# 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.
next prev parent reply other threads:[~2011-01-19 10:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4D2BA939.5090903@cs.ucla.edu>
[not found] ` <4D34A88F.4080400@cs.ucla.edu>
[not found] ` <vz1aaiyjzcq.fsf@gmail.com>
[not found] ` <E1PfDM1-0003kg-V2@fencepost.gnu.org>
[not found] ` <4D35D842.5030003@cs.ucla.edu>
[not found] ` <cksjwp7kq7.fsf@fencepost.gnu.org>
2011-01-19 6:04 ` bug#7856: syncing Emacs from sources maintained elsewhere Paul Eggert
2011-01-19 6:04 ` bug#7859: " Paul Eggert
[not found] ` <4D367F0B.3040808@cs.ucla.edu>
[not found] ` <4D368D16.7020702@swipnet.se>
[not found] ` <25y66hjmiu.fsf@fencepost.gnu.org>
2011-01-19 10:38 ` Paul Eggert [this message]
2011-01-19 10:38 ` Paul Eggert
[not found] ` <4D36BF43.3050007@cs.ucla.edu>
2011-01-19 15:54 ` bug#7856: " Jan Djärv
2011-01-19 15:54 ` Jan Djärv
[not found] ` <4D370928.1040601@swipnet.se>
2011-01-19 23:44 ` Paul Eggert
2011-01-19 23:44 ` bug#7856: " Paul Eggert
[not found] ` <4D377768.8070504@cs.ucla.edu>
2011-01-20 0:21 ` Eli Zaretskii
2011-01-20 6:45 ` bug#7856: " Jan Djärv
2011-01-20 6:45 ` Jan Djärv
[not found] ` <4D37D9FD.3050805@swipnet.se>
2011-01-20 7:51 ` Paul Eggert
2011-01-20 7:51 ` bug#7856: " Paul Eggert
[not found] ` <4D37E970.2060803@cs.ucla.edu>
2011-01-20 11:26 ` Jan D.
2011-01-20 11:26 ` Jan D.
2011-01-20 0:27 ` Eric Blake
2011-01-20 0:27 ` bug#7856: " Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='4D36BF43.3050007__5682.28888228095$1295434496$gmane$org@cs.ucla.edu' \
--to=eggert@cs.ucla.edu \
--cc=7856@debbugs.gnu.org \
--cc=7859@debbugs.gnu.org \
--cc=bug-gnulib@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).