Troubles with Termcap-1.3

Mumit Khan khan@xraylith.wisc.edu
Thu Feb 4 09:02:00 GMT 1999


On Thu, 4 Feb 1999, Chris wrote:

> I need Termcap so I get it and I'm trying to build it on Windows Nt with
> Cygwin
> I made the changes in Makefile(add -D_STRICT_ANSI), but I got a parse
> error :
> gcc -c  -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 
> -DTERMCAP_FILE=\"/etc/termcap\" -I. -I. -g tparam.c
> In file included from tparam.c:29:
> C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\include\string.h:54:
> parse error before `('
> C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\include\string.h:54:
> warning: conflicting types for built-in function `memcpy'
> C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\include\string.h:54:
> parse error before `const'
> make: *** [tparam.o] Error 1
> What am I doing wrong ?

But you didn't define _STRICT_ANSI in the right place! Look at the compile 
line above and you don't see -D_STRICT_ANSI anywhere.

Look for the 

  DEFS = -Dfoo....

line in the Makefile and add the -D_STRICT_ANSI there.
  
  DEFS = -D_STRICT_ANSI -Dfoo....

and recompile.

The other solution is simply ifdef out 3 lines around the top of
tparam.c which redefines bcopy in terms of memcpy in your sources and
recompile.

btw, thanks for adding the compile lines above. No guesswork needed. 

Regards,
Mumit

ps: you may want to update the cygwin mailing list address from the old
one.




More information about the Cygwin mailing list