Skip to content

#INCLUDE problem in libcob/call.c #53

Open
@yutaro-sakamoto

Description

@yutaro-sakamoto

This is not a particularly important issue.
When building opensource-cobol, make command displays the following warning message.

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -finline-functions -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT libcob_la-call.lo -MD -MP -MF .deps/libcob_la-call.Tpo -c call.c  -fPIC -DPIC -o .libs/libcob_la-call.o
call.c: In function 'cob_init_call':
call.c:595:7: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
  595 |   if (strcasecmp (s, "LOWER") == 0) {
      | 

The function strcasecmp is defined in strings.h of C standard libraries.
Even if #include<strings.h> is added to libcob/call.c, the warning will not be resolved.
The cause of the above warning message is that #include <strings.h> refers to libcob/strings.h instead of strings.h of C standard libraries. (gcc finds libcob/strings.h first because of -I. option)
I think it is necessary to update Makefile.am in order to fix the problem.
Once I learn more about Automake and Autoconf, I will fix the warning message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions