public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* getopt function
@ 2006-08-30 20:39 Dima Sorkin
  2006-08-30 21:25 ` Kai Ruottu
  0 siblings, 1 reply; 2+ messages in thread
From: Dima Sorkin @ 2006-08-30 20:39 UTC (permalink / raw)
  To: gcc-help

Hi.
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 ?

2) Is libc containing POSIX functions shipped
with gcc, or it is a completely different project ?

Regards and thank you
 Dima.

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

* Re: getopt function
  2006-08-30 20:39 getopt function Dima Sorkin
@ 2006-08-30 21:25 ` Kai Ruottu
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Ruottu @ 2006-08-30 21:25 UTC (permalink / raw)
  To: Dima Sorkin; +Cc: gcc-help

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.


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

end of thread, other threads:[~2006-08-30 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-30 20:39 getopt function Dima Sorkin
2006-08-30 21:25 ` Kai Ruottu

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