This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix assert.h on darwin (before 8.0)

On Nov 6, 2004, at 6:46 PM, Joseph S. Myers wrote:

On Sat, 6 Nov 2004, Andrew Pinski wrote:

Darwin (before 8) has a very messed up assert.h and uses __eprintf
which is very wrong.  This patch fixes that by adding an assert.h
which does not use __eprintf at all.

Your assert.h doesn't seem to print either the text of the asserted
expression or the name of the current function in the message, though C99 requires both.

Looks like most asserts don't include the current function either but what the hack, if doing an assert.h, better to do it right. Also fixed in this version of the patch is making sure that we don't match darwin10 which should have a fixed up assert.h already.

OK? Bootstrapped and tested on powerpc-darwin7.6.0.

This is now also known as PR 18383.

Andrew Pinski


	* config.gcc (*-*-darwin*): Add t-darwin-pre8 for pre
	darwin 8 targets.  Also fix matching for post darwin 7
	targets for the header file darwin7.h
	* config/t-darwin-pre8: New file. Add assert.h to the	EXTRA_HEADERS.
	* config/darwin-assert.h: New file. Assert.h for darwin.

Attachment: fixPR18383.diff.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]