delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/14/16:47:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 14 Dec 2001 22:46:03 +0100
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: [Fwd: unistd.h for Cygwin]
Message-ID: <20011214224603.U740@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin AT cygwin DOT com>
References: <3C1A6E9F DOT C41AE273 AT t-online DOT de>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <3C1A6E9F.C41AE273@t-online.de>; from 520066587150-0001@t-online.de on Fri, Dec 14, 2001 at 10:26:55PM +0100

On Fri, Dec 14, 2001 at 10:26:55PM +0100, Jerome BENOIT wrote:
> 
> 
> Jerome BENOIT wrote:
> > 
> > Bonjour:
> > 
> > I am rebuilding the tetex-beta package:
> > I have just encountered  an error message
> > which did not occur during the last built.
> > 
> > ../kpathsea/getopt.h:99: redefinition of `struct option'
> > 
> > The error comes out because the `/usr/include/getopt.h' is read before
> > by `/usr/include/unistd.h' which reads two headers:
> > 
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > /* unistd.h for Cygwin. */
> > 
> > #ifndef _UNISTD_H_
> > #define _UNISTD_H_
> > 
> > # include <sys/unistd.h>
> > # include <getopt.h>
> > 
> > #endif /* _UNISTD_H_ */
> > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > 
> > Is it a bug or a feature ?

A feature.  At least it's supposed to be one.  According to
SUSv2 you have to include unistd.h to include the declaration
of getopt() and friends:

http://www.opengroup.org/onlinepubs/007908799/xsh/getopt.html

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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