Bug 236347 - dev-libs/confuse: fix building with optimisations turned off
Bug#: 236347 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: matsuu@gentoo.org Reported By: flameeyes@gentoo.org
Component: Ebuilds
URL: 
Summary: dev-libs/confuse: fix building with optimisations turned off
Keywords:  
Status Whiteboard: 
Opened: 2008-09-01 12:05 0000
Description:   Opened: 2008-09-01 12:05 0000
The attached patch makes confuse build when optimisations are turned off.
Without this it fails like this:

 i686-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I.
-I. -I.. -Wall -pipe -include
/var/tmp/portage/dev-libs/confuse-2.6-r1/temp/flagscheck.h -MT confuse.lo -MD
-MP -MF .deps/confuse.Tpo -c confuse.c  -fPIC -DPIC -o .libs/confuse.o
confuse.c: In function 'cfg_init':
confuse.c:1112: warning: implicit declaration of function 'setlocale'
confuse.c:1112: error: 'LC_MESSAGES' undeclared (first use in this function)
confuse.c:1112: error: (Each undeclared identifier is reported only once
confuse.c:1112: error: for each function it appears in.)
confuse.c:1113: error: 'LC_CTYPE' undeclared (first use in this function)

because locale.h is only ever included by libintl.h when optimisations are
turned off, and by side effect rather than rule, an explicit locale.h inclusion
is needed.

Thanks,
Diego

------- Comment #1 From Diego E. 'Flameeyes' Pettenò 2008-09-01 12:06:29 0000 -------
Created an attachment (id=164228) [details]
confuse-2.6-O0.patch

------- Comment #2 From MATSUU Takuto 2008-09-15 01:39:52 0000 -------
fixed in cvs.