Work around parameter differences for main in different SDK versions
authorIan Romanick <idr@us.ibm.com>
Fri, 25 Jan 2008 22:46:43 +0000 (14:46 -0800)
committerIan Romanick <idr@us.ibm.com>
Fri, 25 Jan 2008 22:47:20 +0000 (14:47 -0800)
src/mesa/pipe/cell/spu/spu_main.c

index 880f8de550ec819f8f506a29b1135ecea658839b..2b88c545766de47ab76870b14f303dc1ed43b902 100644 (file)
@@ -616,13 +616,21 @@ one_time_init(void)
 }
 
 
+/* In some versions of the SDK the SPE main takes 'unsigned long' as a
+ * parameter.  In others it takes 'unsigned long long'.  Use a define to
+ * select between the two.
+ */
+#ifdef SPU_MAIN_PARAM_LONG_LONG
+typedef unsigned long long main_param_t
+#else
+typedef unsigned long main_param_t
+#endif
+
 /**
  * SPE entrypoint.
- * Note: example programs declare params as 'unsigned long long' but
- * that doesn't work.
  */
 int
-main(unsigned long speid, unsigned long argp)
+main(main_param_t speid, main_param_t argp)
 {
    int tag = 0;