From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Tue, 3 May 2005 06:14:13 +0200 Message-ID: References: <17013.26868.207510.370151@farnswood.snap.net.nz> <17013.52411.51878.781739@farnswood.snap.net.nz> <17014.39042.74353.677362@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115146238 6085 80.91.229.2 (3 May 2005 18:50:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 May 2005 18:50:38 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 03 20:50:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DT2Sh-00005f-T8 for ged-emacs-devel@m.gmane.org; Tue, 03 May 2005 20:49:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DT2ZU-0002aJ-G7 for ged-emacs-devel@m.gmane.org; Tue, 03 May 2005 14:56:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSopn-0005GV-UD for emacs-devel@gnu.org; Tue, 03 May 2005 00:16:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSopl-0005EN-2O for emacs-devel@gnu.org; Tue, 03 May 2005 00:16:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSopk-0005Bv-O4 for emacs-devel@gnu.org; Tue, 03 May 2005 00:16:32 -0400 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DSosH-0002mS-6T for emacs-devel@gnu.org; Tue, 03 May 2005 00:19:10 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050503041428.DFJB9918.mxfep02.bredband.com@coolsville.localdomain>; Tue, 3 May 2005 06:14:28 +0200 In-Reply-To: <17014.39042.74353.677362@farnswood.snap.net.nz> Original-To: Nick Roberts X-Mailer: Apple Mail (2.619.2) 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:36621 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36621 >>> In that case, c-macro-preprocessor is set to "/lib/cpp -C" and >>> c-macro-expand >>> doesn't work on OSX? >> >> If c-macro-preprocessor is a recent variable I can't check because >> Emacs does not currently compile on Mac OSX 10.3. My (a bit old) CVS >> compile does not seem to have it. > > c-macro-expand and c-macro-preprocessor have been around for quite a > while. c-macro-expand is an interactive autoloaded Lisp function in > cmacexp.el > that can be invoked in C mode with C-c C-e or from the menu-bar. > Apparently > this file is not part of cc-mode so perhaps its not being maintained. > c-macro-expand seems quite useful so I'm kind of surprised that, as a C > specialist, you're don't use it/not familiar with it. I must have misspelled the name when looking for it. I've seen the macro expand region menu item in the C menu, but actually never had any use for it. > >> But c-macro-expand does not work: > > If we added the line below to c-macro-preprocessor would it work then > for Mac > OSX? Yes it would. Jan D. > Nick > > > (defcustom c-macro-preprocessor > ;; Cannot rely on standard directory on MS-DOS to find CPP. In > ;; fact, cannot rely on having cpp.exe, either, in latest GCC > ;; versions. > (cond ((eq system-type 'ms-dos) "gcc -E -C -o - -") > ;; Solaris has it in an unusual place. > ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" > system-configuration) > (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) > "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") > ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") > + ((eq system-type 'darwin) "cpp -C") > (t "/lib/cpp -C")) > "The preprocessor used by the cmacexp package. > > If you change this, be sure to preserve the `-C' (don't strip comments) > option, or to set an equivalent one." > :type 'string > :group 'c-macro)