getopt function

Kai Ruottu karuottu@mbnet.fi
Wed Aug 30 21:25:00 GMT 2006


Dima Sorkin wrote :
> 1) A question on libc function:
> int getopt(int argc, char * const argv[],
>                  const char *optstring);
> The fact that it declares "char * const argv[]" and not
> "const char * const argv[]" means that it changes argv ?

http://www.gnu.org/software/libc/manual/html_node/Getopt.html#Getopt

> 2) Is libc containing POSIX functions shipped
> with gcc,

No

> or it is a completely different project ?

Yes and No... The GNU C library is working only with Linux.  Not ported for
Solaris2, AIX, HP-UX, SVR4,... Most platforms provide their own C libraries
and these are proprietary or custom (sources maybe available) ones.




More information about the Gcc-help mailing list