From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Tue, 3 May 2005 09:15:46 +1200 Message-ID: <17014.39042.74353.677362@farnswood.snap.net.nz> References: <17013.26868.207510.370151@farnswood.snap.net.nz> <17013.52411.51878.781739@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115087886 26595 80.91.229.2 (3 May 2005 02:38:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 May 2005 02:38:06 +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 04:38:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSnI2-0005uC-94 for ged-emacs-devel@m.gmane.org; Tue, 03 May 2005 04:37:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSnP2-0004uk-U5 for ged-emacs-devel@m.gmane.org; Mon, 02 May 2005 22:44:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSj19-0001fd-Ac for emacs-devel@gnu.org; Mon, 02 May 2005 18:03:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSj14-0001dz-Fg for emacs-devel@gnu.org; Mon, 02 May 2005 18:03:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSj0Y-00012e-4t for emacs-devel@gnu.org; Mon, 02 May 2005 18:03:18 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DSiki-0005SY-MK for emacs-devel@gnu.org; Mon, 02 May 2005 17:46:57 -0400 Original-Received: from farnswood.snap.net.nz (p84-tnt1.snap.net.nz [202.124.110.84]) by viper.snap.net.nz (Postfix) with ESMTP id 688304B0276; Tue, 3 May 2005 09:42:17 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id CC2F562A99; Mon, 2 May 2005 22:15:46 +0100 (BST) Original-To: "Jan D." In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.32 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:36609 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36609 > >> On my OSX (10.3.8) it is in /usr/bin/cpp. > > > > 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. > But c-macro-expand does not work: If we added the line below to c-macro-preprocessor would it work then for Mac OSX? 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)