simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Cygwin build


From: Theodore A. Roth
Subject: Re: [Simulavr-devel] Cygwin build
Date: Wed, 16 Apr 2003 22:26:45 -0700 (PDT)

On Wed, 16 Apr 2003, E. Weddington wrote:

:)Ted,
:)
:)I've been trying to bootstrap and build simulavr under Cygwin.
:)
:)In files:
:)src/disp/disp.c
:)src/disp-vcd/disp.c
:)
:)The include,
:)#include "gnu_getopt.h"
:)ends up being redundant because of cygwin's unistd.h.
:)
:)But the problem seems more from cygwin.
:)
:)Cygwin's unistd.h:
:)-------------------------------
:)/* unistd.h for Cygwin. */
:)
:)#ifndef _UNISTD_H_
:)#define _UNISTD_H_
:)
:)# include <sys/unistd.h>
:)# define __UNISTD_GETOPT__
:)# include <getopt.h>
:)# undef __UNISTD_GETOPT__
:)
:)#endif /* _UNISTD_H_ */
:)---------------------------
:)
:)Of course, getopt.h and gnu_getopt.h clash.
:)
:)
:)And it gets worse, in cygwin's <sys/unistd.h> there are these lines:
:)
:)#ifdef __CYGWIN__
:)# include <getopt.h>
:)#else
:)extern char *optarg;                  /* getopt(3) external variables */
:)extern int optind, opterr, optopt;
:)int    getopt(int, char * const [], const char *);
:)extern int optreset;                  /* getopt(3) external variable */
:)#endif
:)
:)So getopt.h gets included anyway when building in cygwin and you 
:)include unistd.h.

Did you try wrapping the gnu_getopt includes with
  #if !defined(CYGWIN)
  ...
  #endif
or something like that?

:)So will this mean more autoconf work to resolve this?

I'm not sure.

:)If it does, then it would also be helpful to update the project to 
:)use the latest auto tools, a la what you did with avrdude. As is I 
:)can't use the bootstrap script in the latest cygwin. In my build 
:)script I just pull out the stuff from the bootstrap after the version 
:)checking and execute it albeit with some warnings but it seems to 
:)proceed normally. The version checking in bootstrap causes it to die 
:)on cygwin.

It's on my todo list, but not high priority right now.

Why does simulavr's bootstrap fail and avr-libc's reconf succeed? They are 
nearly identical except for the use of autoheader? Let me guess... the 
always a pain in the ass, autoheader.

Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]