AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070406114056.722eb6d3@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<larry.scheer@onstor.com>,<maxim.kozlovsky@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E02215707@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 6 Apr 2007 11:41:01 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Larry Scheer" <larry.scheer@onstor.com>
Cc: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
Subject: Re: how to find the source
Message-ID: <20070406114101.0262200e@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E02215707@onstor-exch02.onstor.net>
References: <20070406112416.32337b1b@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E02215707@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

getopt the shell command is part of util-linux, getopt() the function
is part of the C library

On Fri, 6 Apr 2007 11:26:13 -0700 "Larry Scheer"
<larry.scheer@onstor.com> wrote:

> getopt() is part of util-linux
> 
> apt-get source util-linux
> 
> -----Original Message-----
> From: Andy Sharp 
> Sent: Friday, April 06, 2007 11:24 AM
> To: Maxim Kozlovsky
> Cc: Larry Scheer
> Subject: Re: how to find the source
> 
> On Fri, 6 Apr 2007 11:15:26 -0700 "Maxim Kozlovsky"
> <maxim.kozlovsky@onstor.com> wrote:
> 
> > What is the general algorithm for getting the source of some linux
> > library function or utility? In the current case, I want to look at
> > the source for getopt(), how would I find out which package it
> > belongs to and what is the command to get the source for it?
> 
> Eventually, Larry will have the source for everything we use checked
> into the branch, but in the meantime you can use the apt-get source
> command:
> 
> getopt is standard C library, so you would get the source for glibc.
> i believe the command would be
> 
> apt-get source libc6
> 
> In general, you have to know what package/library that function is in,
> sometimes determinable from the man page, and get the source for that
> package with apt-get source command.
