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

 
 

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

Submitted by:  Colin Finck <colinfinck>
Submitted on:  Sat 21 Apr 2007 05:17:38 PM UTC  
 
Severity: 3 - NormalItem Group: Build/Install
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: 3.82Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Jul 2010 06:18:40 AM UTCpsmithFixed Release4.0=>3.82
    Wed 09 May 2007 02:04:14 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Sat 21 Apr 2007 05:17:38 PM UTCcolinfinckAttached File-=>Added make-strcmpi-strcasecmp.patch, #12544
      Carbon-Copy-=>Added colinfinck

    Back to the top


    Powered by Savane 3.1-cleanup1