Subject: bin/9030: Xlocale.h #define's setlocale
To: None <>
From: Hubert Feyrer <>
List: netbsd-bugs
Date: 12/19/1999 17:00:58
>Number:         9030
>Category:       bin
>Synopsis:       Xlocale.h #define's setlocale
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 19 17:00:01 1999
>Originator:     Hubert Feyrer
NetBSD - Better for your uptime than Viagra
>Release:        1.4.1
System: NetBSD miyu 1.4.1 NetBSD 1.4.1 (MIYU) #0: Tue Dec 14 04:03:09 MET 1999 feyrer@miyu:/data/cvs/src-1.4/sys/arch/i386/compile/MIYU i386

	The <X11/Xlocale.h> header file has the following line in it:
	#define setlocale _Xsetlocale

	When trying to compile a program that uses this header file and
	the ANSI setlocale(3) function at the same time, a link time
	error occurs. 

	"grep -l _Xsetlocale /usr/X11R6/lib/lib*" didn't find a 
	_Xsetlocale function, and reading the the setlocale(3) manpage
	didn't give any hints.

	Try to compile the "hotkey" program from the toshutils
	get linker errors:

	cc -s -o hotkey hotkey.o hci.o sci.o -L/usr/X11R6/lib -lX11
	hotkey.o: Undefined symbol `__Xsetlocale' referenced from text segment

	Short term:
	 * #undef setlocale in the application, after pulling in

	Long term: unsure.
	 * remove that define?
	 * Add _Xsetlocale function to libX11?