public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: AIX and tolower()
@ 2002-06-09 23:15 GCS
  2002-06-10  7:38 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: GCS @ 2002-06-09 23:15 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]

Hi David,

> GCS> Where is the code for tolower()?
> 	libstdc++ defines tolower methods for some classes of objects and
> AIX libc defines tolower().  Is tolower() declared correctly in the
> appropriate scope?
 I think it is correct. Details are coming:
the file begins with #include <ctype.h> which holds the definition for tolower
as 'extern int tolower(int)'. Later, the source has a 
#if defined AIX
#define abc() tolower()
#endif
etc.
Then it is used in a loop:
for(i=0;i<strlen(string);i++)
     string[i]=abc(string[i]);

Do you see any bad thing in the above usage?
Btw, the linker gets libstdc++ to link with. I could not force libc, as -lc and
-l/lib/libc.a gave me an error.
The latter said -l /lib/libc.a (notice the space separator even if I do not put
any between the two in the command line) could not be found. All I can
think of that ld does not follow symlinks; at least /lib/libc.a is a symlink
on my system, and I had a previous lib problem which was solved when
I have copied the lib from /usr/local/lib to /lib.
Would it be a solution if I do something like
#define tolower(c)          ((c)-('A'-'a')) ?
My AIX is 5.1, and gcc is 3.0.1.

Thanks in advance if you have any idea for this problem,
GCS

^ permalink raw reply	[flat|nested] 4+ messages in thread
* AIX and tolower()
@ 2002-06-01  7:08 GCS
  2002-06-09 16:24 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: GCS @ 2002-06-01  7:08 UTC (permalink / raw)
  To: gcc-help

Hi!

 I have gcc 3.0.1 on AIX 5.1. When I compile a program, the linking phase
gives:
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: ._Z7toloweri
Previously I had to copy libgcc.a from /usr/local/lib to /lib, otherwise it
was not found. Where is the code for tolower()?
Ofcourse -lgcc is used.

Thanks in advance,
GCS

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

end of thread, other threads:[~2002-06-10 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-09 23:15 AIX and tolower() GCS
2002-06-10  7:38 ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2002-06-01  7:08 GCS
2002-06-09 16:24 ` David Edelsohn

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