[Libvir] Patch: include <locale.h> for setlocale
Very trivial, but useful for me because I'm trying to debug the remote stuff without -O, and without -O it turns out that libvirt doesn't compile. Rich. --------------------------------------- Index: proxy/libvirt_proxy.c =================================================================== RCS file: /data/cvs/libvirt/proxy/libvirt_proxy.c,v retrieving revision 1.12 diff -u -r1.12 libvirt_proxy.c --- proxy/libvirt_proxy.c 23 Jan 2007 14:39:45 -0000 1.12 +++ proxy/libvirt_proxy.c 28 Feb 2007 16:08:05 -0000 @@ -17,6 +17,7 @@ #include <sys/poll.h> #include <sys/socket.h> #include <sys/un.h> +#include <locale.h> #include "internal.h" #include "proxy_internal.h" #include "xen_internal.h" --------------------------------------- -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)
On Wed, Feb 28, 2007 at 04:14:30PM +0000, Richard W.M. Jones wrote:
Very trivial, but useful for me because I'm trying to debug the remote stuff without -O, and without -O it turns out that libvirt doesn't compile.
Wow, very wierd - it appears that there is some GLibC magic at work here. If you have optmization turned on, then the libintl.h file will automatically pull in locale.h, hence why we've not seen this bug before. Incidentally this reminds me that the handling of CFLAGS in configure.ac is fubar - we're hardcoding the compiler flags including optimization level. So in the RPM builds we're forcing it to -O instead of honouring the $RPM_BUILD_OPTS which would normally turned on -O2, as well as the fortify source related security checks. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
Daniel P. Berrange wrote:
Incidentally this reminds me that the handling of CFLAGS in configure.ac is fubar - we're hardcoding the compiler flags including optimization level. So in the RPM builds we're forcing it to -O instead of honouring the $RPM_BUILD_OPTS which would normally turned on -O2, as well as the fortify source related security checks.
Yes it's totally wrong. At the moment if the user tries to override the CFLAGS on the configure command line, the user's preferences are ignored. The way to do this properly is to set AM_CFLAGS in all of the Makefile.am files. See: http://olympus.het.brown.edu/cgi-bin/info2www?(automake-1.9)Flag+Variables+O... (or http://tinyurl.com/32ev2k) Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)
participants (2)
-
Daniel P. Berrange -
Richard W.M. Jones