Re: heads-up: systemtap-sdt-devel rebase in rawhide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 19, 2011 at 04:49:04PM -0500, Frank Ch. Eigler wrote:
> 
> tgl wrote:
> 
> > [...]  I think the only near-term fix is to turn off dtrace support
> > in mysql.  [...]
> 
> We'll do one better; we'll add a hack to sys/sdt.h to make mysql build
> and respin systemtap today or tomorrow.
> 
> > But the real issue here is that systemtap has got to be more chary of
> > what they expose into application namespace, or this same scenario is
> > going to be played out again and again.
> 
> I agree.  It's not a great situation, but local GCC/C++ experts have
> found no better way to type-analyze the parameters, to ensure their
> safe passage to the tool.  (Our testing shows <limits> is not
> offensive to other C++ apps we've seen.)

If you really want to avoid #include <limits> in sys/sdt.h, you can, e.g. by using

template<typename __sdt_T>
struct __sdt_type
{
  static const bool __sdt_signed = false;
};
  
#define __SDT_ALWAYS_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
#define __SDT_COND_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 0); };
__SDT_ALWAYS_SIGNED(signed char)
__SDT_ALWAYS_SIGNED(short)      
__SDT_ALWAYS_SIGNED(int)
__SDT_ALWAYS_SIGNED(long)
__SDT_ALWAYS_SIGNED(long long)
__SDT_COND_SIGNED(char)  
__SDT_COND_SIGNED(wchar_t)
#if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
__SDT_COND_SIGNED(char16_t)
__SDT_COND_SIGNED(char32_t)
#endif

	Jakub
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux