public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: china@thewrittenword.com To: gcc-gnats@gcc.gnu.org Subject: c++/9275: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20? Date: Sat, 11 Jan 2003 15:26:00 -0000 [thread overview] Message-ID: <20030111152150.6535.qmail@sources.redhat.com> (raw) >Number: 9275 >Category: c++ >Synopsis: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20? >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Jan 11 07:26:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: china@thewrittenword.com >Release: 3.2.1 >Organization: >Environment: HP-UX 10.20 >Description: GCC 3.2.1 on HP-UX 10.20: $ cat test.c #include <deque> #include <ctype.h> int main (void) { char a; isspace(a); } $ g++ test.c test.c: In function `int main()': test.c:7: `_isspace' undeclared (first use this function) test.c:7: (Each undeclared identifier is reported only once for each function it appears in.) In <ctype.h>: # if defined(_SB_CTYPE_MACROS) && !defined(__lint) extern unsigned int *__SB_masks; ... # define isspace(__c) (__alnum = (__c), __alnum == -1 ? 0 \ : __SB_masks ? __SB_masks[__alnum] & _ISSPACE \ : _isspace(__alnum)) And, in /usr/local/include/c++/3.2.1/hppa2.0-hp-hpux10.20/bits/os_defines.h: // Use macro form of ctype functions to ensure __SB_masks is defined. #define _SB_CTYPE_MACROS 1 However, there is no prototype for _isspace hence the error above. HP-UX 11.x solves this with the following in <ctype.h>: extern int _isspace(int); So, how do we solve this on 10.20? >How-To-Repeat: $ cat test.c #include <deque> #include <ctype.h> int main (void) { char a; isspace(a); } $ g++ test.c test.c: In function `int main()': test.c:7: `_isspace' undeclared (first use this function) test.c:7: (Each undeclared identifier is reported only once for each function it appears in.) >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-01-11 15:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-01-11 15:26 china [this message] 2003-02-13 0:09 danglin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030111152150.6535.qmail@sources.redhat.com \ --to=china@thewrittenword.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).