Subject: [bug#65357] [PATCH] gnu: scilab: Fix compilation error.

From: Andreas Enge <[email-masked]>
Date: Wed, 30 Aug 2023 11:47:34 +0200

Hello,

Am Fri, Aug 18, 2023 at 08:23:25PM +0200 schrieb Andreas Enge:
> ../../modules/string/includes/os_string.h:107:25: error: ‘strcasecmp’ was not declared in this scope; did you mean ‘wcscasecmp’?
>   107 | #define stricmp         strcasecmp
>       |                         ^~~~~~~~~~
> src/cpp/funcmanager.cpp:134:9: note: in expansion of macro ‘stricmp’
>   134 |     if (stricmp("utf-8", encoding) == 0)
>       |         ^~~~~~~
> The file looks unchanged in the latest git commit of scilab, and I have not
> seen a corresponding patch in the Debian package, so I have given up.

"man strcasecmp" has this to say:
NOTES
       The  strcasecmp()  and  strncasecmp() functions first appeared in 4.4BSD, where they were declared in
       <string.h>.  Thus, for reasons of historical compatibility, the glibc <string.h> header file also de‐
       clares  these  functions, if the _DEFAULT_SOURCE (or, in glibc 2.19 and earlier, _BSD_SOURCE) feature
       test macro is defined.

So it might be enough to just add "#define _DEFAULT_SOURCE" somewhere.

Andreas