Opened 16 years ago

Closed 14 years ago

#2327 closed enhancement (fixed)

Please add langinfo.h as a public header

Reported by: kaliber Owned by: nobody
Priority: normal Milestone: R1
Component: System/POSIX Version:
Keywords: Cc: haiku@…, richienyhus@…
Blocked By: Blocking:
Platform: All

Description (last modified by zooey)

Change History (14)

comment:1 by korli, 16 years ago

Including this header would mean we support locales, which we don't atm.

comment:2 by scottmc, 16 years ago

This is needed for link-grammar, which is one of the dependencies of AbiWord. Kaliber, what did you run into so far that this is holding up?

comment:3 by scottmc, 16 years ago

Cc: haiku@… added

in reply to:  2 comment:4 by kaliber, 16 years ago

Replying to scottmc:

This is needed for link-grammar, which is one of the dependencies of AbiWord. Kaliber, what did you run into so far that this is holding up?

I cannot remember. Man or groff require that header.

comment:5 by scottmc, 15 years ago

Appears that python can use this as well. Python regression test "test_locale" cannot import name RADIXCHAR

comment:6 by richienyhus, 15 years ago

Cc: richienyhus@… added

comment:7 by zooey, 15 years ago

Description: modified (diff)

Since hrev30545 there now is a langinfo.h public header (that has come in with the locale kit), but I have no idea whether this is enough to solve the problems mentioned.

comment:8 by scottmc, 15 years ago

With hrev30665 configuring python-2.6.2, checking for langinfo.h fails, here's the config.log for it:

configure:6142: checking langinfo.h usability
configure:6159: gcc -c -g -O2  conftest.c >&5
In file included from /boot/home/Python-2.6.2-haiku-test/conftest.c:65:
/boot/common/include/langinfo.h:4: LocaleStrings.h: No such file or directory

Seems we need LocaleStrings.h to exist, perhaps it can be stubbed in for now?

comment:9 by scottmc, 15 years ago

I just tried to comment out the #include line for LocalStrings.h and it then allowed configure to find and use langinfo.h but then it fails during make:

gcc -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o Python/pythonrun.o Python/pythonrun.c
/boot/home/Python-2.6.2-haiku-test/Python/pythonrun.c: In function `Py_InitializeEx':
/boot/home/Python-2.6.2-haiku-test/Python/pythonrun.c:275: `B_CODESET' undeclared (first use in this function)
/boot/home/Python-2.6.2-haiku-test/Python/pythonrun.c:275: (Each undeclared identifier is reported only once
/boot/home/Python-2.6.2-haiku-test/Python/pythonrun.c:275: for each function it appears in.)
make: *** [Python/pythonrun.o] Error 1
~/Python-2.6.2-haiku-test> 

Line 275 refers to CODESET which gets set (I assume) to B_CODESET, but B_CODESET is undeclared

comment:10 by zooey, 15 years ago

LocaleStrings.h is part of the locale kit, so it does exist, but the required search path has not been added to BEINCLUDES yet.

If you are really keen to proceed, you could add /boot/develop/headers/be/locale to BEINCLUDES manually and see where that gets you. You would then probably have to link resulting binaries against liblocale.so, too.

But all those solutions are of temporary nature, since the locale kit awaits better integration - for instance it is not yet clear if it shall be part of libbe or maybe even libroot.

comment:11 by kaliber, 15 years ago

Component: - GeneralSystem/POSIX

comment:12 by axeld, 14 years ago

Owner: changed from axeld to nobody
Version: R1/pre-alpha1

comment:13 by kaliber, 14 years ago

It seems that this bug has been fixed.

comment:14 by zooey, 14 years ago

Resolution: fixed
Status: newclosed

Yes, fixed in hrev37725.

Note: See TracTickets for help on using tickets.