Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#INCLUDE problem in libcob/call.c #53

Open
yutaro-sakamoto opened this issue Jun 3, 2022 · 1 comment
Open

#INCLUDE problem in libcob/call.c #53

yutaro-sakamoto opened this issue Jun 3, 2022 · 1 comment

Comments

@yutaro-sakamoto
Copy link

yutaro-sakamoto commented Jun 3, 2022

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.

@GitMensch
Copy link

The fix is to rename strings.h or get rid of it.

With 0871d14#diff-d908034303ac15afc0713b636b65d88b02a66ef39deefdea4a79a08a269d3611 you've backported the changelog "get rid of it", you likely either want to do it (placing it in common.h) or remove that ChangeLog entry when working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants