screen-users
[Top][All Lists]
Advanced

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

Re: incompatible execvpe, strlen, strcpy, strncpy in Cygwin 1.7 (0/1)


From: Sadrul Habib Chowdhury
Subject: Re: incompatible execvpe, strlen, strcpy, strncpy in Cygwin 1.7 (0/1)
Date: Wed, 13 Jan 2010 12:58:03 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

* Andrew Schulman had this to say on [13 Jan 2010, 10:55:20 -0500]:
> > (1) The build fails with
> > 
> > extern.h:149: error: conflicting types for 'execvpe'
> > 
> > Indeed Cygwin's /usr/include/unistd.h has
> > 
> > int _EXFUN(execvpe, (const char *__file, char * const __argv[], char *const
> > __envp[] ));
> > 
> > while extern.h has
> > 
> > extern void  execvpe __P((char *, char **, char **));
> > 
> > execvpe() is defined in window.c:1387, so screen has its own private
> > implementation, apparently now incompatible with Cygwin's.
> 
> I developed a patch (attached) to address this in Cygwin.  The patch isn't
> written generally at all; it just uses #ifdef __CYGWIN__ to remove the
> private implementation of execvpe().  There's probably an autoconf test
> that should be used for this instead, but I don't know autoconf well enough
> to do that.  If there is one, it should probably be incorporated upstream.

I'll look into this.

> > (2) 
> > 
> > Similarly, I get warnings about incompatible implicit declarations of
> > strlen, strcpy, and strncpy, e.g.
> > 
> > screen.c: In function 'main':
> > screen.c:473: warning: incompatible implicit declaration of built-in
> > function 'strcpy'
> > screen.c:642: warning: incompatible implicit declaration of built-in
> > function 'strlen'
> 
> Thanks to Joe Zbiciak who replied off-list with a suggestion about this.
> Again I ended up just adding an #ifdef __CYGWIN__ in os.h to force
> inclusion of string.h, which solved the problem.  As Joe says, the logic
> there for inclusion of string.h looks "pretty crufty", so I'm not sure that
> there's necessarily a better approach to solve this one, short of
> overhauling that whole section.

I believe this has been properly fixed in the development version
(http://git.savannah.gnu.org/gitweb/?p=screen.git)

Cheers,
Sadrul





reply via email to

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