bugGNU Wget - Bugs: bug #44090, The function strcasestr is...

 
 

bug #44090: The function strcasestr is strictly non-standard and non-portable thus wget is broken

Submitted by:  None
Submitted on:  Sun 25 Jan 2015 11:24:24 PM UTC  
 
Category: Code ArchitectureSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: dclarkeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.16.1
Operating System: NoneReproducibility: Every Time
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: No

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 02 Mar 2015 04:52:17 PM UTC, comment #3:

Can we close this issue now? Is there something more that needs to be resolved?

Darshit Shah <darnir>
Project Administrator
Tue 10 Feb 2015 03:00:55 PM UTC, comment #2:

strcasecmp is not standard, right.
Wget takes this function from the gnulib code. That means we bring our own code with us. There is no general portability problem.

BTW, Wget compiles well on Solaris 10 (out of the box).

If you think that the gnulib submodule has a bug, please report to gnulib. Changes will automatically be pulled in not only from Wget but from almost all GNU projects.

Find the mailing list here:
https://lists.gnu.org/mailman/listinfo/bug-gnulib

Tim Ruehsen <rockdaboot>
Project Administrator
Fri 30 Jan 2015 11:44:01 PM UTC, comment #1:

there is no call to strcasestr, only one to c_strcasestr that is imported from gnulib thus should be portable.

Could you please tell us how it turns to be a problem with you?

What error are you seeing?

Giuseppe Scrivano <gscrivano>
Project Administrator
Sun 25 Jan 2015 11:24:24 PM UTC, original submission:

The function call char strcasestr(const char haystack, const char *needle); is strictly non-standard and therefore not portable and not to be supported in a number of operating systems. Not the least of which is a POSIX compliant SVR4 UNIX such as Solaris 10. The wget codebase has not compiled out of the box for a while now because of this and the sources require hackary to get a clean compile. The inclusion of strcasestr is a glibc extension and therefore results in non-portable broken code. This is being seen in orther projects such as PHP and while it seems clever it only results in bad code, broken software and non-portable results.

There must be a better more reasonable way to handle the search for a substring which lives entirely within strict C99.

It should be noted that the hackary of ifdef nest within lib/string.h.in does not work in a portable fashion. Thus :

#if @GNULIB_STRCASESTR@
# if @REPLACE_STRCASESTR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strcasestr rpl_strcasestr

Does not work across all systems as it should.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by darnir (Posted a comment)
  • -unavailable- added by rockdaboot (Posted a comment)
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

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

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Mar 2015 03:51:19 PM UTCdarnirOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1