Opened 7 years ago

Closed 5 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:
Has a Patch: no Platform: All

Change History (14)

comment:1 Changed 7 years ago by korli

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

comment:2 follow-up: Changed 7 years ago by 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?

comment:3 Changed 7 years ago by scottmc

  • Cc haiku@… added

comment:4 in reply to: ↑ 2 Changed 7 years ago by kaliber

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 Changed 6 years ago by scottmc

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

comment:6 Changed 6 years ago by richienyhus

  • Cc richienyhus@… added

comment:7 Changed 6 years ago by zooey

  • 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 Changed 6 years ago by scottmc

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 Changed 6 years ago by scottmc

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 Changed 6 years ago by zooey

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 Changed 6 years ago by kaliber

  • Component changed from - General to System/POSIX

comment:12 Changed 6 years ago by axeld

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

comment:13 Changed 5 years ago by kaliber

It seems that this bug has been fixed.

comment:14 Changed 5 years ago by zooey

  • Resolution set to fixed
  • Status changed from new to closed

Yes, fixed in hrev37725.

Note: See TracTickets for help on using tickets.