delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/20/18:12:08

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
To: Ted Fong <tfong AT 724 DOT com>
Date: Thu, 20 Sep 2001 23:50:51 +0200
MIME-Version: 1.0
Subject: Re: Compile error with rsync-2.4.6 and latest Cygwin
Reply-to: gp AT familiehaase DOT de
CC: cygwin AT cygwin DOT com
Message-ID: <3BAA80DB.26081.349BEA3F@localhost>
In-reply-to: <A56824065683D411A7D600D0B73C4C10023353F3@inftormail01.724.com>
X-mailer: Pegasus Mail for Win32 (v3.12cDE)
X-Hops: 1
X-Sender: 320081107336-0001 AT t-dialin DOT net

Ted Fong schrieb am 2001-09-20, 16:02:

>Hello,
>
>My environment is NT 4.0 with the version of Cygwin downloaded 2001Sep20
>(see cygcheck output below).  Install of Cygwin was "default" - no changes
>to environment settings.
>
>Receiving this error when compiling rsync-2.4.6:
>
>$ make
>gcc -I. -I. -O -c lib/getopt.c -o lib/getopt.o
>lib/getopt.c: In function `getopt_long':
>lib/getopt.c:672: argument `argv' doesn't match prototype
>/usr/include/getopt.h:56: prototype declaration
>lib/getopt.c:672: argument `options' doesn't match prototype
>/usr/include/getopt.h:56: prototype declaration
>lib/getopt.c:672: argument `long_options' doesn't match prototype
>/usr/include/getopt.h:56: prototype declaration
>make: *** [lib/getopt.o] Error 1

/usr/include/getopt.h should not be included if you don't have 
the cygwin getopt_long version patched.

I got another error, because lib/getopt.h gets included and then
/usr/include/getopt/h gets included by unistd.h.

I have my unistd.h patched because it is causing trouble since lots 
of packages contains their own getopt.c / getopt.h like rsync, too.

Now Have you logged the output of configure?
There should be included this line: 
 checking for working getopt_long... no

Now if that is the case, lib/getopt.h gets included.

Here is how i patched /usr/include/unistd.h to get around 
this problem:

/* unistd.h for Cygwin. */

#ifndef _UNISTD_H_
#define _UNISTD_H_

# include <sys/unistd.h>
#if !defined(__GETOPT_H__) && !defined(_GETOPT_H)
# include <getopt.h>
#endif

#endif /* _UNISTD_H_ */


Ciao,

Gerrit


-- 
=^..^=

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