From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel,gmane.comp.lib.gnulib.bugs Subject: Re: syncing Emacs from sources maintained elsewhere Date: Wed, 19 Jan 2011 02:38:59 -0800 Organization: UCLA Computer Science Department Message-ID: <4D36BF43.3050007@cs.ucla.edu> References: <4D2BA939.5090903@cs.ucla.edu> <4D34A88F.4080400@cs.ucla.edu> <4D35D842.5030003@cs.ucla.edu> <4D367F0B.3040808@cs.ucla.edu> <4D368D16.7020702@swipnet.se> <25y66hjmiu.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295433566 31145 80.91.229.12 (19 Jan 2011 10:39:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2011 10:39:26 +0000 (UTC) Cc: bug-gnulib , 7856@debbugs.gnu.org, 7859@debbugs.gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 19 11:39:22 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PfVRi-0007FV-8R for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2011 11:39:22 +0100 Original-Received: from localhost ([127.0.0.1]:45187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfVRh-0003AO-FL for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2011 05:39:21 -0500 Original-Received: from [140.186.70.92] (port=39618 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfVRT-00039N-EH for emacs-devel@gnu.org; Wed, 19 Jan 2011 05:39:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfVRS-0007Bn-1Q for emacs-devel@gnu.org; Wed, 19 Jan 2011 05:39:07 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:48681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfVRP-0007Ae-2c; Wed, 19 Jan 2011 05:39:03 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8370939E80F0; Wed, 19 Jan 2011 02:39:00 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13ugBoX3rTyu; Wed, 19 Jan 2011 02:39:00 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D4DBD39E80E1; Wed, 19 Jan 2011 02:38:59 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 In-Reply-To: <25y66hjmiu.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134731 gmane.comp.lib.gnulib.bugs:24802 Archived-At: I got a copy of preprocessed sources from bryan d. o'connor. Here's what seems to be the problem: * has "#define __GETOPT_PREFIX rpl_" as expected. * unexmacosx.c includes the Gnulib . * The Gnulib includes the system unistd.h, which declares the getopt-related names itself (without including anything) and then finishes. * The Gnulib then includes the Gnulib . * The Gnulib includes the system getopt.h. * The system getopt.h includes the Gnulib . * This inner Gnulib does nothing, and finishes. * The system getopt.h declares 'struct option' and other stuff, and finishes. * The Gnulib then does this: #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ # include # include # include # 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 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.