Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Date: Wed, 03 Nov 1999 14:25:36 -0500
From: John Fralinger <fralinjh@ei.dupont.com>
Subject: Re: sys_errlist
To: Mumit Khan <khan@thor.xraylith.wisc.edu>
Cc: cygwin@sourceware.cygnus.com
Message-Id: <00e701bf2631$34f297b0$9a5c37c0@ei.dupont.com>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
Content-type: text/plain;	charset="iso-8859-1"
Content-transfer-encoding: 7bit
X-Priority: 3
X-MSMail-priority: Normal
References: <199911031852.MAA20052@mercury.xraylith.wisc.edu>

Mumit,
   Thanks for your quick response.
   Your test code below does indeed work.

I am still confused about when to use an "_" and when not to.

I do not have any problems implementing Mr. Siddiqi's suggestion
but I would like to understand what's going on.

   Thanks again...


----- Original Message -----
From: Mumit Khan <khan@nanotech.wisc.edu>
To: John Fralinger <fralinjh@ei.dupont.com>
Cc: <cygwin@sourceware.cygnus.com>
Sent: Wednesday, November 03, 1999 1:52 PM
Subject: Re: sys_errlist


> John Fralinger <fralinjh@ei.dupont.com> writes:
> > I get undefined reference to `sys_errlist` when compiling and linking
with
> > Cygwin 1.0 CD.  Same source and Makfiles have no problem on B20.1.
> >
> > What am I doing wrong?
> >
>
> Make sure you don't declare sys_errlist in your code, and instead include
> <errno.h> to get the extern declaration. This is a change since b20.1,
> which used a static version of sys_errlist, and in CD 1.0/dev snapshots,
> it's imported from the DLL.
>
> Try the following *untested* (I don't have 1.0 CD nor dev snapshots
> installed to test), and see if this works:
>
>   #include <errno.h>
>   #include <stdio.h>
>
>   int
>   main ()
>   {
>     int i;
>     for (i = 0; i < _sys_nerr; i++)
>       {
> printf ("%-3d: %s\n", i, _sys_errlist[i]);
>       }
>     return 0;
>   }
>
> Regards,
> Mumit
>
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

