D8255: #include <strings.h> for strcasecmp in versit parser

A. Wilcox noreply at phabricator.kde.org
Thu Oct 12 03:18:56 BST 2017


awilcox created this revision.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: KDE PIM.

REVISION SUMMARY
  The POSIX definition for strcasecmp <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html> states that it is in the <strings.h> include file, not <string.h>.  This causes the following build error on the musl libc:
  
  >   /usr/src/packages/user/kcalcore/src/kcalcore-17.08.1/src/versit/vcc.y: In functin 'enterAttr':
  
  /usr/src/packages/user/kcalcore/src/kcalcore-17.08.1/src/versit/vcc.y:485:9: error: implicit definition of function 'strcasecmp' [-Werror=implicit-function-definition]```
  
  This patch fixes this error (and a few others later on in the file).

TEST PLAN
  Built and tested on glibc and musl Linux systems; since <strings.h> is a POSIX standard, it is assumed that other Unix-based systems (such as BSD and Solaris) provide it as well.

REPOSITORY
  R172 KCalendar Core

REVISION DETAIL
  https://phabricator.kde.org/D8255

AFFECTED FILES
  src/versit/vcc.y

To: awilcox
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20171012/086a918a/attachment.html>


More information about the kde-pim mailing list