Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: "Gerrit P. Haase" <gp@familiehaase.de>
Organization: Esse keine toten Tiere
To: Ted Fong <tfong@724.com>
Date: Thu, 20 Sep 2001 23:50:51 +0200
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: Compile error with rsync-2.4.6 and latest Cygwin
Reply-to: gp@familiehaase.de
CC: cygwin@cygwin.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@t-dialin.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/

