X-Spam-Check-By: sourceware.org Date: Tue, 17 Jan 2006 06:31:05 +0100 From: Peter Ekberg To: cygwin AT cygwin DOT com Subject: Re: ATT: gcc maintainer (was Re: cpp does not honor the -undef option.) Message-ID: <20060117053105.GA25800@sellafield.lysator.liu.se> References: <20060109095759 DOT GB24524 AT sellafield DOT lysator DOT liu DOT se> <20060116111311 DOT GC10265 AT sellafield DOT lysator DOT liu DOT se> <2e59e6970601162049n68146063r278dc2e21b5aeadd AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e59e6970601162049n68146063r278dc2e21b5aeadd@mail.gmail.com> User-Agent: Mutt/1.5.10i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mon, Jan 16, 2006 at 10:49:38PM -0600, * * wrote: > On 1/16/06, Peter Ekberg wrote: > > On Mon, Jan 09, 2006 at 10:58:00AM +0100, Peter Ekberg wrote: > > > Hello! > > > > > > I recently tried to build a package that was using cpp for other > > > purposes than preprocessing C files. Its configure script was > > > looking for a way to not have cpp predefine anything, and it > > > specifically tried the -undef option, but failed. From reading the > > > docs, I couldn't figure out why. Here's a quote from "info cpp": > > > > > > '-undef' > > > Do not predefine any system-specific or GCC-specific macros. The > > > standard predefined macros remain defined. *Note Standard > > > Predefined Macros::. > > Apparently some macros must remain defined. What macros specifically > did you notice still defined that you would consider "system-specific" > (i.e. __cygwin__ or __CYGWIN__ or CYGWIN) or "gcc-specific"? Well, "cpp -undef -mD < /dev/null" gives me this list: #define __unix 1 #define __STDC_HOSTED__ 1 #define __unix__ 1 #define unix 1 #define __CYGWIN__ 1 #define __CYGWIN32__ 1 I would consider all but __STDC_HOSTED__ system/gcc-specific. Which should be apparent if you read the "*Note Standard Predefined Macros" in the above quote, as that's the only define listed in the note. In my specific case, the configure script is looking for a way to not have "unix" defined. FWIW, the provided patch fixes all of the above, so that the output from the above command is: #define __STDC_HOSTED__ 1 It seems I'm not the only one with this problem, even though cpp now seems to be in better shape in this regard: http://www.cygwin.com/ml/cygwin/2002-05/msg01613.html Cheers, Peter -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/