Commit 93a3177f authored by Linus Torvalds's avatar Linus Torvalds

Add some fascist code to trap __FUNCTION__ pasting, fix up

some more pasters..
parent aad4ad15
...@@ -52,7 +52,7 @@ static int expand_files(struct files_struct *files, int nr) ...@@ -52,7 +52,7 @@ static int expand_files(struct files_struct *files, int nr)
{ {
int err, expand = 0; int err, expand = 0;
#ifdef FDSET_DEBUG #ifdef FDSET_DEBUG
printk (KERN_ERR __FUNCTION__ " %d: nr = %d\n", current->pid, nr); printk (KERN_ERR "%s %d: nr = %d\n", __FUNCTION__, current->pid, nr);
#endif #endif
if (nr >= files->max_fdset) { if (nr >= files->max_fdset) {
...@@ -69,7 +69,7 @@ static int expand_files(struct files_struct *files, int nr) ...@@ -69,7 +69,7 @@ static int expand_files(struct files_struct *files, int nr)
out: out:
#ifdef FDSET_DEBUG #ifdef FDSET_DEBUG
if (err) if (err)
printk (KERN_ERR __FUNCTION__ " %d: return %d\n", current->pid, err); printk (KERN_ERR "%s %d: return %d\n", __FUNCTION__, current->pid, err);
#endif #endif
return err; return err;
} }
......
...@@ -191,4 +191,10 @@ struct sysinfo { ...@@ -191,4 +191,10 @@ struct sysinfo {
}; };
#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
/* Trap pasters of __FUNCTION__ at compile-time */
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
#define __FUNCTION__ (__func__)
#endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment