Subject: bin/9030: Xlocale.h #define's setlocale
To: None <gnats-bugs@gnats.netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
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
>Last-Modified:
>Originator: Hubert Feyrer
>Organization:
--
NetBSD - Better for your uptime than Viagra
>Release: 1.4.1
>Environment:
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
>Description:
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.
>How-To-Repeat:
Try to compile the "hotkey" program from the toshutils
(URL: http://www.ne426pd.in2home.co.uk/toshutils-991217.tar.gz),
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
>Fix:
Short term:
* #undef setlocale in the application, after pulling in
<X11/Xlocale.h>
Long term: unsure.
* remove that define?
* Add _Xsetlocale function to libX11?
>Audit-Trail:
>Unformatted: