reassign 403081 libmysqlclient15-dev reassign 403082 libmysqlclient15-dev forcemerge 403081 403082 tags 403081 + patch thanks
/usr/include/mysql/m_ctype.h uses macros defined in /usr/include/mysql/my_global.h but does not include it. Including my_global.h in m_ctype.h leads to other problems. Copying the ATTRIBUTE_FORMAT* parts from my_global.h to m_ctype.h seems like the most simple fix. This solves the build problems for mysql-admin and mysql-query-browser. Patch attached. -- Regards, Andreas Henriksson
--- /usr/include/mysql/m_ctype.h.orig 2006-12-02 18:29:32.000000000 +0000 +++ /usr/include/mysql/m_ctype.h 2006-12-18 20:00:04.000000000 +0000 @@ -155,6 +155,43 @@ extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; +/* + Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers. + Some forms of __attribute__ are actually supported in earlier versions of + g++, but we just disable them all because we only use them to generate + compilation warnings. +*/ +#ifndef __attribute__ +# if !defined(__GNUC__) +# define __attribute__(A) +# elif GCC_VERSION < 2008 +# define __attribute__(A) +# elif defined(__cplusplus) && GCC_VERSION < 3004 +# define __attribute__(A) +# endif +#endif + +/* + __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4 + But that's already covered by the __attribute__ tests above, so this is + just a convenience macro. +*/ +#ifndef ATTRIBUTE_FORMAT +# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) +#endif + +/* + + __attribute__((format(...))) on a function pointer is not supported + until gcc 3.1 +*/ +#ifndef ATTRIBUTE_FORMAT_FPTR +# if (GCC_VERSION >= 3001) +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) +# else +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) +# endif /* GNUC >= 3.1 */ +#endif /* See strings/CHARSET_INFO.txt about information on this structure */ typedef struct my_charset_handler_st