public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: ltoa, itoa, ultoa in gcc
@ 2003-09-12 17:33 lrtaylor
  2003-09-12 18:00 ` Aaron Case
  0 siblings, 1 reply; 5+ messages in thread
From: lrtaylor @ 2003-09-12 17:33 UTC (permalink / raw)
  To: aaron.case, gcc-help

This isn't necessarily going to answer your question, but whether or not they are supported has nothing to do with GCC.  These are functions that would be in the C library, which is a system library rather than a compiler library.  So, whether or not they are supported will depend on whether or not your C library supports them.  And whether or not there are good alternatives will also depend on your C library.  What platform are you trying to build on?

Thanks,
Lyle Taylor

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 11:30 AM
To: gcc-help@gcc.gnu.org
Subject: ltoa, itoa, ultoa in gcc

Hello,

I am porting code from Microsoft C v5.1 that is not exactly ANSI standard.
I thought that ltoa, itoa, and ultoa were standard but I see now that they
are NOT ANSI standard.

Do have to write these functions myself or is there something supported by
GCC that will suffice??

Thanks in Advance

Aaron Case

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

* RE: ltoa, itoa, ultoa in gcc
  2003-09-12 17:33 ltoa, itoa, ultoa in gcc lrtaylor
@ 2003-09-12 18:00 ` Aaron Case
  0 siblings, 0 replies; 5+ messages in thread
From: Aaron Case @ 2003-09-12 18:00 UTC (permalink / raw)
  To: lrtaylor; +Cc: gcc-help

Lyle,

I am building an eCos application wtih Cygwin.

It porting code from MS embedded C 5.1 to arm-elf-gcc using eCos.  I added
everything but the kitchen sink to the C library for eCos but these
functions are not present. I was under the impression that this library was
a reflection of glibc 2.2.3(or whatever was most current when the arm-elf
version was released).

I do see your point, but I have checked and double checked that the
stdlib(where these functions should be??) are added to the library. So I
suppose this is a question for the glibc help list or any other direction
will be appreciated.

Thanks
Aaron

-----Original Message-----
From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
Sent: Friday, September 12, 2003 1:34 PM
To: aaron.case@dynazign.com; gcc-help@gcc.gnu.org
Subject: RE: ltoa, itoa, ultoa in gcc


This isn't necessarily going to answer your question, but whether or not
they are supported has nothing to do with GCC.  These are functions that
would be in the C library, which is a system library rather than a compiler
library.  So, whether or not they are supported will depend on whether or
not your C library supports them.  And whether or not there are good
alternatives will also depend on your C library.  What platform are you
trying to build on?

Thanks,
Lyle Taylor

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 11:30 AM
To: gcc-help@gcc.gnu.org
Subject: ltoa, itoa, ultoa in gcc

Hello,

I am porting code from Microsoft C v5.1 that is not exactly ANSI standard.
I thought that ltoa, itoa, and ultoa were standard but I see now that they
are NOT ANSI standard.

Do have to write these functions myself or is there something supported by
GCC that will suffice??

Thanks in Advance

Aaron Case

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

* RE: ltoa, itoa, ultoa in gcc
@ 2003-09-12 18:08 lrtaylor
  0 siblings, 0 replies; 5+ messages in thread
From: lrtaylor @ 2003-09-12 18:08 UTC (permalink / raw)
  To: aaron.case; +Cc: gcc-help

Hmm...  I've already deleted your first message where you posted the error, so I can't refer back to it.  However, it seems to me that you were getting a compile-time warning about a function not being declared.  Is that right?  If that's the case, and you're programming in C, and you're sure that the functions are defined in the C library, you _may_ be able to compile you program anyway.  C doesn't require that you declare all of your functions before using them, so long at the default function signature (int func()) doesn't cause the compiler to see errors where there really aren't any.

On the other hand, if you're sure the function is defined in the library, are you sure that it is declared in the correct headers?  If so, are you sure your picking up the right set of system headers, and not another set (e.g., the Windows C library headers)?  You can see where GCC is getting the headers by adding "-v" to the command line.

Thanks,
Lyle Taylor
IS Applications

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 12:01 PM
To: lrtaylor
Cc: gcc-help@gcc.gnu.org
Subject: RE: ltoa, itoa, ultoa in gcc

Lyle,

I am building an eCos application wtih Cygwin.

It porting code from MS embedded C 5.1 to arm-elf-gcc using eCos.  I added
everything but the kitchen sink to the C library for eCos but these
functions are not present. I was under the impression that this library was
a reflection of glibc 2.2.3(or whatever was most current when the arm-elf
version was released).

I do see your point, but I have checked and double checked that the
stdlib(where these functions should be??) are added to the library. So I
suppose this is a question for the glibc help list or any other direction
will be appreciated.

Thanks
Aaron

-----Original Message-----
From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
Sent: Friday, September 12, 2003 1:34 PM
To: aaron.case@dynazign.com; gcc-help@gcc.gnu.org
Subject: RE: ltoa, itoa, ultoa in gcc


This isn't necessarily going to answer your question, but whether or not
they are supported has nothing to do with GCC.  These are functions that
would be in the C library, which is a system library rather than a compiler
library.  So, whether or not they are supported will depend on whether or
not your C library supports them.  And whether or not there are good
alternatives will also depend on your C library.  What platform are you
trying to build on?

Thanks,
Lyle Taylor

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 11:30 AM
To: gcc-help@gcc.gnu.org
Subject: ltoa, itoa, ultoa in gcc

Hello,

I am porting code from Microsoft C v5.1 that is not exactly ANSI standard.
I thought that ltoa, itoa, and ultoa were standard but I see now that they
are NOT ANSI standard.

Do have to write these functions myself or is there something supported by
GCC that will suffice??

Thanks in Advance

Aaron Case

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

* RE: ltoa, itoa, ultoa in gcc
  2003-09-12 17:30 Aaron Case
@ 2003-09-12 18:06 ` Rupert Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Rupert Wood @ 2003-09-12 18:06 UTC (permalink / raw)
  To: 'Aaron Case'; +Cc: gcc-help

Aaron Case wrote: 

> Do have to write these functions myself or is there something
> supported by GCC that will suffice??

(Fairly obviously) If you're using a common radix such as 10 or 16 then you
can get away with

    char buffer[16];
    snprintf(buffer, 16, "%ld", l);

or similar.

If you're not, and don't want to start from scratch, then get hold of MS's
runtime source from your install CD and have a look how they implemented it
:-)

Rup.

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

* ltoa, itoa, ultoa in gcc
@ 2003-09-12 17:30 Aaron Case
  2003-09-12 18:06 ` Rupert Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Case @ 2003-09-12 17:30 UTC (permalink / raw)
  To: gcc-help

Hello,

I am porting code from Microsoft C v5.1 that is not exactly ANSI standard.
I thought that ltoa, itoa, and ultoa were standard but I see now that they
are NOT ANSI standard.

Do have to write these functions myself or is there something supported by
GCC that will suffice??

Thanks in Advance

Aaron Case

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

end of thread, other threads:[~2003-09-12 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-12 17:33 ltoa, itoa, ultoa in gcc lrtaylor
2003-09-12 18:00 ` Aaron Case
  -- strict thread matches above, loose matches on Subject: below --
2003-09-12 18:08 lrtaylor
2003-09-12 17:30 Aaron Case
2003-09-12 18:06 ` Rupert Wood

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