NetBSD Problem Report #55577
From www@netbsd.org Fri Aug 14 20:15:03 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B40851A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Aug 2020 20:15:02 +0000 (UTC)
Message-Id: <20200814201501.A49611A9246@mollari.NetBSD.org>
Date: Fri, 14 Aug 2020 20:15:01 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: locale_t not defined if _XOPEN_SOURCE is defined
X-Send-Pr-Version: www-1.0
>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:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.