[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Wed Dec 29 08:47:34 CET 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/12/29 08:47:34

Modified files:
	cm3/m3-libs/m3core/src/: m3core.h 
	cm3/m3-libs/m3core/src/C/Common/: CstdlibC.c 

Log message:
	OpenBSD has this:
	
	/usr/include/sys/cdefs.h:#define        __malloc        __attribute__((__malloc__))
	
	which interferes with:
	
	M3PASTE(M3MODULE, __##name) in
	
	We end up with Cstdlib____attribute__((__malloc__)) where we want
	Cstdlib__malloc
	
	for now M3WRAP_NO_SWITCHING takes m3name and cname separate, i.e.,
	no more M3MODULE, no more pasting, but pass Cstdlib__malloc and malloc.
	
	Longer term, soon!, need to do this for the more heavily used macros.
	
	Another thing we could try is
	PASTE3(M3MODULE,_, _##name) in
	
	but this still runs the risk of single underscore:
	/usr/include/sys/cdefs.h:#define        _malloc        __attribute__((__malloc__))
	
	or somesuch.
	
	It seems impossible to get name evaluated and pasted-without-evaluation.
	So we will stop using pasting.
	Note that M3WRAP1_ will have to change also, to take foo and _foo and select one,
	since "stop using pasting" I'll interpret strenuously and not even do _#foo, likely.




More information about the M3commit mailing list