Some fixes to compile with SS12
** file os/os0file.c : missing #include "trx0trx.h"
** file buf/buf0buf.c: same
** file buf/buf0rea.c: missing #include "srv0srv.h"
** file sql/sql_class.h:
#ifdef __cplusplus
__BEGIN_DECLS
#endif
extern ulonglong frequency;
#ifdef __cplusplus
__END_DECLS
#endif
Don't know why it doesn't like it... (GCC3 also was unhappy here)
Replaced by:
extern ulonglong frequency;
(seems it never used in C++)
** file sql/ha_innodb.cc:
line 6736: missing (char *) cast before strchr()
p = (char *)strchr( ...
** missing strsep() in Solaris (this function is not POSIX)
Added into sql/sql_show.cc:
char * strsep (char **stringp, const char *delim)
{
char *start = *stringp;
char *ptr;
if (start == NULL) return NULL;
/* Optimize the case of no delimiters. */
if (delim[0] == '\0')
{
*stringp = NULL;
return start;
}
/* Optimize the case of one delimiter. */
if (delim[1] == '\0') ptr = strchr (start, delim[0]);
else
/* The general case. */
ptr = strpbrk (start, delim);
if (ptr == NULL)
{
*stringp = NULL;
return start;
}
*ptr = '\0';
*stringp = ptr + 1;
return start;
}