public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@actcom.co.il>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@zip.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [patch] __func__ -> __FUNCTION__
Date: Tue, 13 Aug 2002 11:19:46 +0300	[thread overview]
Message-ID: <20020813081946.GC2192@alhambra.actcom.co.il> (raw)
In-Reply-To: <3D58C0FB.1020503@zytor.com>

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

On Tue, Aug 13, 2002 at 01:19:07AM -0700, H. Peter Anvin wrote:
> 
> But it won't work on a compiler that actually *supports* __func__...
> 
> I think that is gcc 3.1 or higher, but I'm not the authority...

Again, works for me.

http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html (search for
__func__) would seem to imply that you are correct, though. Perhaphs
someone more knowledgable about gcc could shed some light?  

mulix@tea:~/tmp$ cat foo.c
#include <stdio.h>

#if DEF_FUNC
#ifndef __func__
#define __func__ __FUNCTION__
#endif /* !defined __func__ */
#endif /* DEF_FUNC */ 

int main()
{
	printf("%s\n", __func__); 
	return 0; 
}
mulix@tea:~/tmp$ gcc3 -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure --enable-threads
--enable-languages=c,c++
Thread model: posix
gcc version 3.1
mulix@tea:~/tmp$ gcc3 foo.c -DDEF_FUNC=1 -o foo
mulix@tea:~/tmp$ ./foo
main
mulix@tea:~/tmp$ gcc3 foo.c -DDEF_FUNC=0 -o foo
mulix@tea:~/tmp$ ./foo
main
mulix@tea:~/tmp$ 

> >ObCompleteyUnrelatedQuestions: where can I find klibc? 
> 
> ftp://ftp.kernel.org/pub/linux/libs/klibc/

Much obliged. 
-- 
"Hmm.. Cache shrink failed - time to kill something?
 Mhwahahhaha! This is the part I really like. Giggle."
					 -- linux/mm/vmscan.c
http://vipe.technion.ac.il/~mulix/	http://syscalltrack.sf.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2002-08-13  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-13  6:17 [patch] __func__ -> __FUNCTION__ Andrew Morton
2002-08-13  6:49 ` H. Peter Anvin
2002-08-13  8:13   ` Andrew Morton
2002-08-13  7:59     ` Muli Ben-Yehuda
2002-08-13  8:09       ` H. Peter Anvin
2002-08-13  8:10         ` Muli Ben-Yehuda
2002-08-13  8:19           ` H. Peter Anvin
2002-08-13  8:19             ` Muli Ben-Yehuda [this message]
2002-08-14 21:16     ` Maksim (Max) Krasnyanskiy
2002-08-13  8:20 ` Christoph Hellwig
2002-08-13  8:49   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020813081946.GC2192@alhambra.actcom.co.il \
    --to=mulix@actcom.co.il \
    --cc=akpm@zip.com.au \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox