Build failure on Linux - strnicmp undefined

muller@cerbere.u-strasbg.fr muller@cerbere.u-strasbg.fr
Sat Dec 2 05:51:00 GMT 2000


At 15:03 01/12/00 -0500, Fernando Nasser wrote:
>Thanks folks.  This works.
>I will check it in momentarily.
>
>
>* p-exp.y: Define strncasecmp as strnicmp for MSVC.
>  (yylex): Use strncasecmp, not strnicmp.

  Thanks for checking it in. I only realized this after committing it
when I tried to compile it also on a Linux machine.

  However, I also found strnicmp in 
src/gdb/nlm/gdserve.c
so I wasn't sure that I should do the change.

On the other side you can find in src/gdb/ser-e7kpc.c

that strncasecmp is replaced by strnicmp by a macro  for MSVC
but several other files using strncasecmp do not have this macro
defined. Unless this is automatically created by the configure execution,
in which case the defines inside the c source files 
would be unnecessary.

  Concerning the date of the ChangeLog entry, it was the date of the
patch RFA on gdb-patches list. As it was only delayed for
formatting reasons I thought that I should better not modify
the date.
  I recieved no comment about strnicmp use when I submitted the RFA.

  One other strange fact is that the linux build failure was only on
link time, is this normal ?
Shouldn't the compiler complain about undefined function ?
(maybe I didn't see a warning as I didn't look at the compilation progress
on the linux box).

  I apologize deeply for the troubles I created, but
couldn't realize before the strnicmp was not a standard 
function.
  Is there a way to avoid doing such errors again in the future ?


  

  



More information about the Gdb-patches mailing list