simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] Cygwin build


From: E. Weddington
Subject: [Simulavr-devel] Cygwin build
Date: Wed, 16 Apr 2003 16:17:23 -0600

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.


So will this mean more autoconf work to resolve this?


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.

Eric




reply via email to

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