- 积分
- 132
- UID
- 13204
- 阅读权限
- 20
- 注册时间
- 2013-2-22
- 精华
- 在线时间
- 小时
- 最后登录
- 1970-1-1
- 职业
- 4
|
4#
楼主 |
发表于 2013-3-14 11:23:15
|
只看该作者
我在include/my_global.h 文件中添加了,如下代码:
/* Define some useful general macros */
-#if !defined(max)
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
+#if !defined(mysql_max)
+#define mysql_max(a, b) ((a) > (b) ? (a) : (b))
+#define mysql_min(a, b) ((a) < (b) ? (a) : (b))
+static __inline long min( long a, long b ) { return ( ( a < b ) ? a : b ); }
+static __inline long max( long a, long b ) { return ( ( a > b ) ? a : b ); }
#endif
再次编译, sudo make, 出现了如下错误:
In file included from strxmov.c:33:
../include/my_global.h:1528: error: expected identifier or ‘(’ before ‘long’
../include/my_global.h:1528: error: expected ‘)’ before ‘<’ token
../include/my_global.h:1529: error: expected identifier or ‘(’ before ‘long’
../include/my_global.h:1529: error: expected ‘)’ before ‘>’ token
请问如何解决??? |
|