This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems compiling rsync with latest update


Christopher Faylor schrieb am 2001-09-18, 14:29:

>On Tue, Sep 18, 2001 at 11:21:45AM -0700, Kevin Takenaga wrote:
>>I'm getting the following output when I try to compile
>>rsync against the latest sources:
>>
>>bash-2.05$ make
>>gcc -I. -I. -O -c rsync.c -o rsync.o
>>In file included from /usr/include/unistd.h:7,
>>                 from rsync.h:87,
>>                 from rsync.c:23:
>>/usr/include/getopt.h:41: redefinition of `struct
>>option'
>>/usr/include/getopt.h:56: conflicting types for
>>`getopt_long'
>>lib/getopt.h:107: previous declaration of
>>`getopt_long'
>>make: *** [rsync.o] Error 1
>>
>>I noticed there was a change to the getopt.h in the
>>last cygwin update.
>
>The last update to getopt.h was in 2000/10/28.
>
>cgf

Hi Chris,

I have problems, too now.
It is because getopt.h gets included by unistd.h now.

That is a saved unistd.h (saved at date 2001-05-21):
========================
#ifndef _UNISTD_H_
#define _UNISTD_H_

# include <sys/unistd.h>

#endif /* _UNISTD_H_ */

Now it looks like this:
========================
/* unistd.h for Cygwin. */

#ifndef _UNISTD_H_
#define _UNISTD_H_

# include <sys/unistd.h>
# include <getopt.h>

#endif /* _UNISTD_H_ */

I found no ChangeLog entries which refer to a change
in <unistd.h>. Is it recorded somewhere else?
I don't want to get <getopt.h> included automatically if I include
 <unistd.h>.
If I need <getopt.h> I would like to include it separatly.

I think this change in <unistd.h> causes my problems.

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]