Where is the stdlib code in gcc?

I

IWAKI Hidekazu

Hi, I'm hidekazu.

I'm finding the stdlib source code, which is a include file in gcc-4.x
( and the other compilers).
http://gcc.igor.onlinedirect.bg/releases/gcc-4.4.2/

But, I can't find it (stdlib.c?). I'd like to see the `qsort`
algorithm, but I can't do it.
Could you tell me where it is?
As possible as you can, please specify the directory.

Thank you.
 
T

Tim Prince

qsort() will usually be provided by your C library, so the source is
in the library source, rather than the compiler source.
questions specific to gcc might be asked on the gcc-help mail list.
However, this question doesn't pertain directly to gcc, as gcc may be
configured with various library implementations, such as glibc.
 
I

IWAKI Hidekazu

questions specific to gcc might be asked on the gcc-help mail list.
However, this question doesn't pertain directly to gcc, as gcc may be
configured with various library implementations, such as glibc.

Thank you for answers.
Gcc is a major compiler example. I'd like to read a implement of
stdlib procedures.

OK. I'll research glibc. If I face any issues, I will question here
again.
Thank you!
 
N

Nick Keighley

Thank you for answers.
Gcc is a major compiler example. I'd like to read a implement of
stdlib procedures.

OK. I'll research glibc. If I face any issues, I will question here
again.
Thank you!

the bsd source is fairly accessible
 
S

Seebs

Hi, I'm hidekazu.
Hello.

I'm finding the stdlib source code, which is a include file in gcc-4.x
( and the other compilers).
http://gcc.igor.onlinedirect.bg/releases/gcc-4.4.2/

No, it isn't.
But, I can't find it (stdlib.c?).
No.

I'd like to see the `qsort`
algorithm, but I can't do it.
Okay.

Could you tell me where it is?

It's in the C library.
As possible as you can, please specify the directory.

/usr/src/usr.lib/libc

Or maybe somewhere else. But gcc is used with at least four C libraries that
I know of off the top of my head, and probably more, so you need to know which
library you're using, on which system... and that makes this a question about
your host system, not about C. So if you're on Linux, try a Linux group, if
you're on BSD, ask a BSD group, and so on.

-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top