Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2003 09:30:21 -0800 (PST)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   bin/47949: gcc 3.2.1 / strcasecmp() weirdness
Message-ID:  <200302051730.h15HULPb043657@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/47949; it has been noted by GNATS.

From: Garrett Wollman <wollman@lcs.mit.edu>
To: Edwin Groothuis <edwin@mavetju.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: bin/47949: gcc 3.2.1 / strcasecmp() weirdness
Date: Wed, 5 Feb 2003 12:29:55 -0500 (EST)

 <<On Wed,  5 Feb 2003 22:17:34 +1100 (EST), Edwin Groothuis <edwin@mavetju.org> said:
 
 > I'm trying to compile security/clamav (ports/45686)
 > It fails with: 
 > zziplib/zzip-file.c: In function `zzip_file_open':
 > zziplib/zzip-file.c:116: `strcasecmp' undeclared (first use in this function)
 
 > 116:	cmp = (o_mode & ZZIP_CASEINSENSITIVE)? strcasecmp: strcmp;
 
 Which tells me that <strings.h> is not included -- a bug that I also
 ran into when I tried to compile this program.  I'm told by the author
 that it is fixed in the latest development sources.  (It's not as
 simple as just adding `#include <strings.h>', because the program
 comes with its own header also called "strings.h", and passes
 -I flags to the compiler that make it impossible to see the system
 version.)
 
 > I add this line before line 116:
 > 	if (strcasecmp("12","11")) printf("");
 
 > And it compiles without a problem.
 
 You have now implicitly declared the function, so the compiler now
 has a declaration in scope when compiling line 116.
 
 -GAWollman
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302051730.h15HULPb043657>