In oh_error.h, the poison pragma is used to prevent the use of the sprintf(). However, sprintf() is used in the system headers of some versions of Solaris. On these versions of Solaris, compile errors similar to the following occur:
...
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../utils -I../utils -I../marshal -I../ssl -I/opt/sfw/include -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -Wpointer-arith -Wformat=2 -Wformat-security -Wformat-nonliteral -Wcast-qual -Wcast-align -Wshadow -Wredundant-decls -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-value -Werror -D_GNU_SOURCE -D_REENTRANT -fexceptions -MT oh_client.lo -MD -MP -MF .deps/oh_client.Tpo -c oh_client.cpp -fPIC -DPIC -o .libs/oh_client.o
In file included from /usr/include/sys/stream.h:28,
from /usr/include/netinet/in.h:66,
from /usr/include/sys/socket.h:45,
from ../marshal/strmsock.h:23,
from oh_client_session.h:21,
from oh_client.cpp:32:
/usr/include/sys/strft.h:112:4: attempt to use poisoned "sprintf"
/usr/include/sys/strft.h:114:4: attempt to use poisoned "sprintf"
gmake[1]: *** [oh_client.lo] Error 1
I have attached a patch, oh_error.h.patch, that removes the poison pragma when compiling on Solaris.
Remove a poison pragma in oh_error.h when compiling on Solaris
Committed revision 7010.