bugmake - Bugs: bug #19656, strcmpi does not exist on my...

 
 

bug #19656: strcmpi does not exist on my system, better use strcasecmp instead

Submitter:  Colin Finck <colinfinck>
Submitted:  Sat 21 Apr 2007 05:17:38 PM UTC
   
 
Severity:  3 - Normal Item Group:  Build/Install
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  3.82 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 09 May 2007 02:04:14 AM UTC, comment #4: 

Fixed this by converting all uses of case-insensitive string comparisons to use POSIX strcasecmp(), and either aliasing strcasecmp to OS-specific versions like strcmpi/stricmp, or else using our own version (for things like VMS).

Paul D. Smith <psmith>
Group administrator
Tue 01 May 2007 04:23:40 AM UTC, comment #3: 

True; I suppose it was never anticipated that anyone would build with --enable-case-insensitive-file-system on a POSIX system (because POSIX systems don't HAVE case-insensitive file systems).

Nevertheless, the flag is generic and not tied to Windows, etc. so this should be fixed.

That code (hash.{c,h}) was actually taken from the GNU id-utils source so we should check and see if there have been enhancements.

Paul D. Smith <psmith>
Group administrator
Sat 21 Apr 2007 08:45:52 PM UTC, comment #2: 

Yes, you're right, the problem does not occur if I only run the "configure" script without any parameters.

But when I add the parameter "--enable-case-insensitive-file-system", it does not build.
Here is the error message:

------------------------------------------------
gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/local/include\" -DHAVE_CONFIG_H -I.     -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast -g -O2 -MT hash.o -MD -MP -MF .deps/hash.Tpo -c -o hash.o hash.c
mv -f .deps/hash.Tpo .deps/hash.Po
gcc -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast -g -O2   -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o implicit.o job.o main.o misc.o read.o remake.o remote-stub.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o   -lrt
dir.o: In function `dir_contents_file_exists_p':
/home/colin/Desktop/Downloads/make-cvs/make/dir.c:712: undefined reference to `strcmpi'
dir.o: In function `dirfile_hash_cmp':
/home/colin/Desktop/Downloads/make-cvs/make/dir.c:404: undefined reference to `strcmpi'
dir.o: In function `directory_hash_cmp':
/home/colin/Desktop/Downloads/make-cvs/make/dir.c:361: undefined reference to `strcmpi'
file.o: In function `file_hash_cmp':
/home/colin/Desktop/Downloads/make-cvs/make/file.c:58: undefined reference to `strcmpi'
strcache.o: In function `str_hash_cmp':
/home/colin/Desktop/Downloads/make-cvs/make/strcache.c:118: undefined reference to `strcmpi'
------------------------------------------------

Colin Finck <colinfinck>
Sat 21 Apr 2007 06:13:23 PM UTC, comment #1: 

Can you please provide the error messages you received?  As far as I know GNU make sources don't use strcmpi() except when compiling for non-POSIX systems.

Paul D. Smith <psmith>
Group administrator
Sat 21 Apr 2007 05:17:38 PM UTC, original submission:  

If I try to compile the latest CVS revision of "make", the compiler complains about a missing strcmpi function.
Now I added a macro, which replaces all strcmpi's with strcasecmp. Then "make" compiles correctly.

I attached a patch file, which contains the macro I use.

My Operating System is Ubuntu 7.04.

Colin Finck <colinfinck>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by colinfinck (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-28 psmith Fixed Release4.0 3.82
    2007-05-09 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0
    2007-04-21 colinfinck Attached File- Added make-strcmpi-strcasecmp.patch, #12544
        Carbon-Copy- Added colinfinck

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code