public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9275: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20?
@ 2003-01-11 15:26 china
0 siblings, 0 replies; 2+ messages in thread
From: china @ 2003-01-11 15:26 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/9275: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20?
@ 2003-02-13 0:09 danglin
0 siblings, 0 replies; 2+ messages in thread
From: danglin @ 2003-02-13 0:09 UTC (permalink / raw)
To: china, danglin, gcc-bugs, gcc-prs, nobody
Synopsis: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20?
Responsible-Changed-From-To: unassigned->danglin
Responsible-Changed-By: danglin
Responsible-Changed-When: Thu Feb 13 00:09:01 2003
Responsible-Changed-Why:
Fixed.
State-Changed-From-To: open->closed
State-Changed-By: danglin
State-Changed-When: Thu Feb 13 00:09:01 2003
State-Changed-Why:
Fixed 3.2, 3.3 and trunk.
<http://gcc.gnu.org/ml/gcc-patches/2003-02/msg00779.html>
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9275
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-13 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-11 15:26 c++/9275: Should _SB_CTYPE_MACROS be defined on HP-UX 10.20? china
2003-02-13 0:09 danglin
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).