Re: isalnum not declared

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

 



Please see my comments below.

| "Nikolai Nezlobin" <nezlobin@xxxxxxxxxxx> writes:
|
| > Eljay,
| >
| > 'isalnum' is not my function, it is the part of namespace std and the
GNU
| > project, right?
|
| isalnum is not necessarily part of the GNU project. GCC expects the
|     standard C library to be provided by the target platform. cygwin,
|     mingw (both windows platforms), MacOS X, [free|net|open]bsd, aix,
|     solaris, hpux, and many others provide C libraries which have
|     nothing to do with the GNU project, and are not under the control
|     of GCC, or any GNU people.
|
| Only on linux and hurd are functions such as isalnum part of a GNU
|     project (and in those cases, they are part of the glibc project,
|     not the GCC project).

I meant that 'isalnum' and cctype are not home-made (Eljay seemed to think
this way).  They were downloaded when I installed Linux.  If I write
#include <bits/locale_facets.h> in cctype then an error occurs in some file
included from locale_facets.h, but the compiler goes through using::isalnum
in cctype.  I would not consider changing cctype as a good solution unless
the changes came from someone associated with the gnu / glibc project.

|
| > Compiler says that isalnum is not declared in the following line in
cctype:
| >
| > namespace std
| > {
| >   using ::isalnum;
| >   ...
| > }
| >
| > I think this is very embarrassing.
|
| 'embarrassing' ? It is unfortunate that you have encountered a
|     problem, and more unfortunate still that no-one has yet solved your
|     problem, but I can't see anything 'embarrassing' about it - it
|     isn't as if somebody was caught lying about uranium sales or some
|     such.

If you wish, I will not use the word "embarrassing" anymore. I needed it to
attract attention to the error message that I received.  I do not understand
how 'isalnum' can be undeclared in cctype. I will try to reduce the code to
the minimum.

|
| > Doesn't cctype refer to all the
| > necessary files, including the one that defines isalnum?
|
| ?
|
| #include<cctype>
|
| int main()
|   {
|     return std::isalnum('[');
|   }
|
| compiles and runs correctly with g++ 2.95.3, 3.2.2, 3.3.3, and 3.4
|     on i686-freebsd5.2 and i386-slackware-linux .
|
| If you were using any other linux distro, I would guess you had not
|     installed the [g]libc-devel package, since most other linux
|     distros do not include headers in the ordinary glibc package. But
|     looking at a slackware 9.0 box (where I cannot reproduce the problem
|     you report) I see that the package glibc-2.3.1-i386-3 contains the
|     standard C header files.

Maybe. The error message is that 'isalnum' is not declared, not that some
file was not found though.

|
|


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux