patch-2.1.132 linux/scripts/mkdep.c

Next file: linux/CREDITS
Previous file: linux/scripts/checkhelp.pl
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/scripts/mkdep.c linux/scripts/mkdep.c
@@ -226,8 +226,8 @@
  */
 #define MAX2(a,b) ((a)>(b)?(a):(b))
 #define MIN2(a,b) ((a)<(b)?(a):(b))
-#define MAX5(a,b,c,d,e) (MAX2(a,MAX2(b,MAX2(c,MAX2(d,e)))))
-#define MIN5(a,b,c,d,e) (MIN2(a,MIN2(b,MIN2(c,MIN2(d,e)))))
+#define MAX6(a,b,c,d,e,f) (MAX2(a,MAX2(b,MAX2(c,MAX2(d,MAX2(e,f))))))
+#define MIN6(a,b,c,d,e,f) (MIN2(a,MIN2(b,MIN2(c,MIN2(d,MIN2(e,f))))))
 
 
 
@@ -241,11 +241,12 @@
  *    m|#\s*include\s*<(.*?>"|
  *    m|#\s*(?define|undef)\s*CONFIG_(\w*)|
  *    m|(?!\w)CONFIG_|
+ *    m|__SMP__|
  *
  * About 98% of the CPU time is spent here, and most of that is in
  * the 'start' paragraph.  Because the current characters are
  * in a register, the start loop usually eats 4 or 8 characters
- * per memory read.  The MAX5 and MIN5 tests dispose of most
+ * per memory read.  The MAX6 and MIN6 tests dispose of most
  * input characters with 1 or 2 comparisons.
  */
 void state_machine(const char * map)
@@ -258,13 +259,14 @@
 start:
 	GETNEXT
 __start:
-	if (current > MAX5('/','\'','"','#','C')) goto start;
-	if (current < MIN5('/','\'','"','#','C')) goto start;
+	if (current > MAX6('/','\'','"','#','C','_')) goto start;
+	if (current < MIN6('/','\'','"','#','C','_')) goto start;
 	CASE('/',  slash);
 	CASE('\'', squote);
 	CASE('"',  dquote);
 	CASE('#',  pound);
 	CASE('C',  cee);
+	CASE('_',  underscore);
 	goto start;
 
 /* / */
@@ -398,6 +400,18 @@
 		goto cee_CONFIG_word;
 	use_config(map_dot, next - map_dot - 1);
 	goto __start;
+
+/* __SMP__ */
+underscore:
+	GETNEXT NOTCASE('_', __start);
+	GETNEXT NOTCASE('S', __start);
+	GETNEXT NOTCASE('M', __start);
+	GETNEXT NOTCASE('P', __start);
+	GETNEXT NOTCASE('_', __start);
+	GETNEXT NOTCASE('_', __start);
+	use_config("SMP", 3);
+	goto __start;
+
     }
 }
 


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov