On derna, the --std=c99 option seems to cause the mingw32 build to completely fail because _MAX_FNAME and _splitpath() become missing and they are needed in sdld.c
Is the only reason for --std=c99 to fix the problem with a duplicate definition of strndup()? If so, we could update configure.in to check for an existing system definition and bracket the local definition with #ifndef HAVE_STRNDUP rather than change the dialect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On derna, the --std=c99 option seems to cause the mingw32 build to completely fail because _MAX_FNAME and _splitpath() become missing and they are needed in sdld.c
Is the only reason for --std=c99 to fix the problem with a duplicate definition of strndup()? If so, we could update configure.in to check for an existing system definition and bracket the local definition with #ifndef HAVE_STRNDUP rather than change the dialect.
Fixed in SDCC 3.4.1 #9119.
Oops, I think I closed this too early. The latest solution breaks the MSVC build because it has no sdccconf.h.
Fixed in #9153.