#815 closed defect (wontfix)
ALL: CVS build issues
Reported by: | SF/inguin | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Port: Linux |
Version: | Keywords: | ||
Cc: | Game: |
Description
The recent update of ScummVM's Makefile broke the compile process on my system (Linux 2.2.25, gcc 2.95.3):
1. strcasecmp() is not an ANSI C function, so compiling scumm/bundle.cpp with "-ansi" fails:
scumm/bundle.cpp:365: `strcasecmp' undeclared (first use this function)
2. My compiler does not know the newly inserted -Wno-unused-parameter.
Ticket imported from: #743652. Ticket imported from: bugs/815.
Change History (5)
comment:1 by , 22 years ago
Owner: | set to |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:2 by , 22 years ago
comment:3 by , 22 years ago
To 1): According to my manual page strcasecmp is _not_ part of POSIX. It's only "conforming to BSD 4.3" and thus it's not part of the ANSI C standard. The -ansi flag changes not only the compiler syntax but also the contents of the standard header files (string.h in this case). I tried it on three different Linux systems (gcc 2.95.3, gcc 2.95.4 and egcs 2.91.66, I don't have access to a gcc3 system at the moment) and on none of these did string.h declare strcasecmp if compiled with -ansi. And according to a german (sorry) usenet article I found (<38575EF8.53D0FDE3@gmx.at>) this is how it's supposed to be.
To 2): Sure, that's what I did, I just removed the option. Just wanted to mention it.
comment:4 by , 22 years ago
http://www.opengroup.org/onlinepubs/007904975/functions/ strcasecmp.html
We have at least ont team member on Linux (olki) using GCC 3.x, it compiles fine for him... One can argue about the benefits of "-ansi", though, we could remove it from the default warnings list again... in the meantime (as you already know, of course), you can just remvoe it manually. :-)
comment:5 by , 6 years ago
Component: | --Unset-- → Port: Linux |
---|
To 1): strcasecmp is part of POSIX. GCC 3.x doesn't complain about it's usage with -ansi (and quite frankly, it is silly for a compiler to complain about it being used when in strict ansi mode - after all, one can define any functions one likes even in strict ansi mode). Anyway, you could either modify scummsys.h to use some other function to #define scumm_stricmp; or remove the -ansi from your Makefile; or upgrade to a better compiler (e.g. GCC 3.x)
To 2): You can remove it from your Makefile then, or get a better compiler (e.g. GCC 3.x)