delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/17/04:40:52

X-Spam-Check-By: sourceware.org
Message-ID: <45D6CD8D.5CBBD888@dessent.net>
Date: Sat, 17 Feb 2007 01:40:29 -0800
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: man pages for functions and includes
References: <loom DOT 20070216T000957-780 AT post DOT gmane DOT org>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Matthew Pemrich wrote:

> Heck, it's easier to apologize than ask permission, so sorry in advance if this
> is in the wrong newsgroup.

This is a mailing list, not a newsgroup.

> You can see what I'm looking for.  I've installed gcc and mingw for C packages
> on my computer, but I am having trouble doing manual lookups for header files
> like string.h, or functions like srandom.  Man is installed.  I use it
> occasionally to look up command line arguments for gcc.

This list has nothing to do with MinGW.  That's another project.  If you
are really talking about MinGW then you want to ignore the rest of this
email, since MinGW targets the Microsoft runtime and Win32 APIs, not
POSIX, and everything you want in terms of those is online at MSDN.

> I'm a beginning developer, and a newbie linux user.  GUI is easy, and moving
> away from DOS was something I dreaded when I was first introduced to NT-based
> Operating Systems, so I'm really stuck here.
> 
> Do those manual pages appear in any packages, or is there a way I can install
> them... ahem... manually?

Have you not installed the cygwin-doc package?  It contains man pages
and 'info' pages for the parts of Cygwin that are implemented through
newlib.  Type "info libc" or "info libm".  But again this only covers
the newlib parts, which are things like I/O and math.  Other parts of
the api are implemented by Cygwin itself, and there are not man pages
for these.  These Cygwin-specific things are documented in html and PDF,
and are also included in the cygwin-doc package.  They are not
extensive, and often amount to just listing which functions are
supported, and some of this may be quite out of date.

Thus, the best thing you can do to learn the POSIX apis is to actually
just read... the POSIX spec:

http://www.opengroup.org/onlinepubs/009695399/mindex.html

The one you want for C programming is the System Interfaces volume,
which defines what all POSIX systems, Cygwin included, strive to
implement.  You can also read the man pages for other POSIX
implementations: for example, glibc has their docs online, FreeBSD has a
great manpage viewer online, and Solaris has very good documentation.

http://www.gnu.org/software/libc/manual/html_node/index.html
http://www.freebsd.org/cgi/man.cgi
http://docs.sun.com/app/docs/doc/816-5167/6mbb2jaeu?a=expand

All of these resources will tell you about a particular vender's
implementation of the POSIX API.  Now don't misunderstand, that doesn't
mean that you can take whatever you read about e.g. glibc and apply it
to Cygwin.  These are two very different implementations of the POSIX
api -- glibc for example includes a large number of extensions and
features outside the standard.  And Cygwin is not complete even in its
implementation of the basic POSIX api, although it is pretty close.  So
don't get the idea that you can use these above links as references to
Cygwin.  But what they are good for is to see how things are done on
these other platforms, because that is the whole idea of Cygwin, to
emulate as close as possible a POSIX api on Windows.  The answer to any
such question about Cygwin "how do I do <x>" should be "however it's
done on linux/POSIX".

If you want to see if a function is implemented or not, the easiest way
is to just try it.  Or you can look at the cygwin.din file, which is the
source file used to create cygwin.def, which in turn defines all the
symbols exported by the DLL.  You can view this in CVS:

http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/cygwin/cygwin.din?cvsroot=src

But do note that the CVS version might have changes that were made since
the last release, so have a look at the logs in case of confusion.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019