public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Re: isalnum not declared CODE
@ 2004-06-17  9:47 Nikolai Nezlobin
  2004-06-17 12:03 ` Eljay Love-Jensen
  2004-06-21 13:45 ` Claudio Bley
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolai Nezlobin @ 2004-06-17  9:47 UTC (permalink / raw)
  To: bley; +Cc: Eljay Love-Jensen, gcc-help, llewelly

Claudio,

I tried Cygwin and GCC 3.4.0 and received the same isalnum error.  Below are
the lines related either to ctype.h or isalnum that I found in main.ii in
Cygwin (extern int isalnum (int) throw () was absent).


Eljay,

My Linux filesystem is case sensitive, Cygwin is not.  Did you try make?
Did not it give you the 'isalnum' error? Tweaking is not a good solution for
me, because the code is rather complicated.  I suspect that my problem is
related to the problem discussed in the thread (I did not participate in it)

http://os2ports.com/pipermail/ux2bs/Week-of-Mon-20030825/001090.html

# 1 "/usr/include/ctype.h" 1 3 4
extern "C" {
int __attribute__((__cdecl__)) isalnum (int __c);
}

# 50 "/usr/include/c++/3.3.1/cctype" 2 3
# 66 "/usr/include/c++/3.3.1/cctype" 3
namespace std
{
using ::isalnum;
}

# 49 "/usr/include/c++/3.3.1/bits/localefwd.h" 2 3
namespace std
{
class locale;
template<typename _CharT>
inline bool
isalnum(_CharT, const locale&);

# 1892 "/usr/include/c++/3.3.1/bits/locale_facets.h" 2 3

template<typename _CharT>
inline bool
isalnum(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }

Sincerely,

Nikolai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: isalnum not declared CODE
  2004-06-17  9:47 Re: isalnum not declared CODE Nikolai Nezlobin
@ 2004-06-17 12:03 ` Eljay Love-Jensen
  2004-06-21 13:45 ` Claudio Bley
  1 sibling, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2004-06-17 12:03 UTC (permalink / raw)
  To: Nikolai Nezlobin; +Cc: gcc-help, llewelly

Hi Nikolai,

 >My Linux filesystem is case sensitive, Cygwin is not.

Just checking.

It is possible to have a case insensitive file system with Linux.  Weird, 
but possible.

 >Did you try make?

Yes, I did the compile using make.

 >Did not it give you the 'isalnum' error?

No, it gave me a bunch of other errors because my file structure is not 
identical to yours.  Hence, I had to tweak the makefile you provided to 
refer to locations on my machine.

 >Tweaking is not a good solution for me, because the code is rather 
complicated.

It will be a hard problem to fix if you don't want to make changes.

I had to make some tweaks to get your toy application to compile.  In part 
because your example was incomplete and not compilable.  In part because my 
environment is different from yours, and your make file has hardcoded some 
environmentals.

 >I suspect that my problem is related to the problem discussed in the 
thread (I did not participate in it)

Could very well be.  But since your main.ii indicates that the isalnum is 
present, that doesn't seem likely.

 >Below are the lines related either to ctype.h or isalnum that I found in 
main.ii in Cygwin (extern int isalnum (int) throw () was absent).

Interesting.  That /usr/include/ctype.h has the isalnum that should be 
referenced in /usr/include/c++/3.3.1/cctype header.

The /usr/include/c++/3.3.1/bits/locale_facets.h isalnum has the signature 
(char,locale), not (int), and resides in the std:: namespace.

Side note:  in your agstring.h file, you have...
#define _String_h 1
...that's a reserved identifier.

Try this...

------ foo.cpp ------
extern "C" {
int __attribute__((__cdecl__)) isalnum (int __c);
}

namespace std
{
using ::isalnum;
}

int foo(int ch)
{
return isalnum(ch);
}
------------------

No #include directives.

g++ -c foo.cpp

Does that compile?

--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: isalnum not declared CODE
  2004-06-17  9:47 Re: isalnum not declared CODE Nikolai Nezlobin
  2004-06-17 12:03 ` Eljay Love-Jensen
@ 2004-06-21 13:45 ` Claudio Bley
  1 sibling, 0 replies; 3+ messages in thread
From: Claudio Bley @ 2004-06-21 13:45 UTC (permalink / raw)
  To: gcc-help

On Thu, Jun 17, 2004 at 04:46:43AM -0500, Nikolai Nezlobin wrote:
> Claudio,
> 
> I tried Cygwin and GCC 3.4.0 and received the same isalnum error.  Below are
> the lines related either to ctype.h or isalnum that I found in main.ii in
> Cygwin (extern int isalnum (int) throw () was absent).

> # 1 "/usr/include/ctype.h" 1 3 4
> extern "C" {
> int __attribute__((__cdecl__)) isalnum (int __c);
> }
> 
> # 50 "/usr/include/c++/3.3.1/cctype" 2 3
> # 66 "/usr/include/c++/3.3.1/cctype" 3
> namespace std
> {
> using ::isalnum;
> }
> 
> # 49 "/usr/include/c++/3.3.1/bits/localefwd.h" 2 3
> namespace std
> {
> class locale;
> template<typename _CharT>
> inline bool
> isalnum(_CharT, const locale&);
> 
> # 1892 "/usr/include/c++/3.3.1/bits/locale_facets.h" 2 3
> 
> template<typename _CharT>
> inline bool
> isalnum(_CharT __c, const locale& __loc)
> { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }

Hi Nikolai,

as Eljay already said, this so far looks all nice and dandy. If you haven't
solved the problem yourself yet, can you just mail me the (gzipped/bzip2ed) 
main.ii file so I can have a look at it. Or better upload it to some
web server -- so that all the people interested in helping can have a stab at
it -- and post the address here.

Regards.
-- 
claudio

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-21 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17  9:47 Re: isalnum not declared CODE Nikolai Nezlobin
2004-06-17 12:03 ` Eljay Love-Jensen
2004-06-21 13:45 ` Claudio Bley

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).