NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

standards/55577: locale_t not defined if _XOPEN_SOURCE is defined



>Number:         55577
>Category:       standards
>Synopsis:       locale_t not defined if _XOPEN_SOURCE is defined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 14 20:20:00 +0000 2020
>Originator:     coypu
>Release:        NetBSD 9.99.69
>Organization:
>Environment:
NetBSD planets 9.99.69 NetBSD 9.99.69 (GENERIC) #0: Tue Jul 21 19:50:57 IDT 2020  fly@planets:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
> cat test.c
#define _XOPEN_SOURCE 700
#include <locale.h>
#include <stdio.h>
int main() {
	printf("%d\n", sizeof(locale_t));
	return 0;
}

> gcc test.c 
test.c: In function ?main?:
test.c:5:24: error: ?locale_t? undeclared (first use in this function); did you mean ?localeconv??
  printf("%d\n", sizeof(locale_t));
                        ^~~~~~~~
                        localeconv
test.c:5:24: note: each undeclared identifier is reported only once for each function it appears in

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index