Paul,
What version of GCC are you using to compile the code ?
My suggestion is to do this:
Index: include/ha_prototypes.h
===================================================================
--- include/ha_prototypes.h (revision 5039)
+++ include/ha_prototypes.h (working copy)
@@ -193,7 +193,10 @@ innobase_strcasecmp(
/**********************************************************************
Returns true if the thread is executing a SELECT statement. */
-
+#ifdef __cplusplus
+extern "C"
+#endif
+UNIV_INTERN
ibool
thd_is_select(
/*==========*/
Though adding UNIV_INTERN to ha_prototypes.h should work too.
Regards,
-sunny
Paul McCullagh wrote:
Hi All,
I get the following compile error:
g++ -DHAVE_CONFIG_H -I. -I. -Wall -Wextra -Werror -Wno-cast-align
-pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor
-Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long
-Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -Wno-shadow
-I./plugin/innobase/include -DBUILD_DRIZZLE -MT
plugin/innobase/handler/plugin_libinnobase_plugin_la-ha_innodb.lo -MD
-MP -MF
plugin/innobase/handler/.deps/plugin_libinnobase_plugin_la-ha_innodb.Tpo
-c plugin/innobase/handler/ha_innodb.cc -fPIC -DPIC -o
plugin/innobase/handler/.libs/plugin_libinnobase_plugin_la-ha_innodb.o
cc1plus: warnings being treated as errors
plugin/innobase/handler/ha_innodb.cc: In function 'ulint
thd_is_select(const void*)':
plugin/innobase/handler/ha_innodb.cc:610: warning: 'ulint
thd_is_select(const void*)': visibility attribute ignored because it
./plugin/innobase/include/ha_prototypes.h:191: warning: conflicts with
previous declaration here
Because of the difference between the prototype:
/**********************************************************************
Returns true if the thread is executing a SELECT statement. */
ibool
thd_is_select(
/*==========*/
/* out: true if thd is executing SELECT */
const void* thd); /* in: thread handle (THD*) */
and the definition:
/**********************************************************************
Returns true if the thread is executing a SELECT statement. */
extern "C" UNIV_INTERN
ibool
thd_is_select(
/*==========*/
/* out: true if thd is executing SELECT */
const void* session) /* in: thread handle (Session*) */
{
return(session_sql_command((const Session*) session) == SQLCOM_SELECT);
}
Should I add UNIV_INTERN to the prototype, or remove "extern "C"
UNIV_INTERN" from the function definition?
--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp