我在我的 locale.h 中看到了这个:
/* These are the possibilities for the first argument to setlocale.
The code assumes that the lowest LC_* symbol has the value zero. */
#define LC_CTYPE __LC_CTYPE
#define LC_NUMERIC __LC_NUMERIC
#define LC_TIME __LC_TIME
#define LC_COLLATE __LC_COLLATE
#define LC_MONETARY __LC_MONETARY
#define LC_MESSAGES __LC_MESSAGES
#define LC_ALL __LC_ALL
#define LC_PAPER __LC_PAPER
#define LC_NAME __LC_NAME
#define LC_ADDRESS __LC_ADDRESS
#define LC_TELEPHONE __LC_TELEPHONE
#define LC_MEASUREMENT __LC_MEASUREMENT
#define LC_IDENTIFICATION __LC_IDENTIFICATION
和 bits/locale.h 包含:
enum
{
__LC_CTYPE = 0,
__LC_NUMERIC = 1,
__LC_TIME = 2,
__LC_COLLATE = 3,
__LC_MONETARY = 4,
__LC_MESSAGES = 5,
__LC_ALL = 6,
__LC_PAPER = 7,
__LC_NAME = 8,
__LC_ADDRESS = 9,
__LC_TELEPHONE = 10,
__LC_MEASUREMENT = 11,
__LC_IDENTIFICATION = 12
};
您可以只编译一个打印它们的 C 程序。这就是 Groveller 所做的。