I have this code:
(define-foreign-library libc
(:unix "libc.so.6"))
(use-foreign-library libc)
(defcfun "setlocale" :pointer (category :int) (locale :pointer))
and I want to do:
(with-foreign-string (locale "en_US.UTF-8")
(setlocale XXXX locale))
How can I find the integer values of the various LC_xxx constants so that I can pass them to the call above? Is there a better way of achieving this?
I see this in my locale.h:
and bits/locale.h contains:
You could just compile a C program that prints them.
This is what the groveller does.