This came up before and fizzled out but unfortunately
I believe its included where needed.
it is not:
$ uname -a
SunOS hipster 5.11 illumos-9ffcdb10b6 i86pc i386 i86pc
$ gcc --version
gcc (OpenIndiana 10.5.0-oi-0) 10.5.0
...
$ gmake 2>&1 | grep "implicit declaration"
file.c:199:10: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
file.c:249:16: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
file.c:249:16: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:266:28: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:271:31: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:283:9: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
file.c:283:9: warning: incompatible implicit declaration of built-in function 'strcpy'
file.c:288:27: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:291:16: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:358:12: warning: incompatible implicit declaration of built-in function 'strcpy'
file.c:529:52: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:532:52: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:536:74: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:537:74: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:538:74: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:539:74: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:540:74: warning: incompatible implicit declaration of built-in function 'strlen'
file.c:541:74: warning: incompatible implicit declaration of built-in function 'strlen'
...
Not including string.h in these files may happen to work on one platform or another because other headers happen to include it, but that shouldn't be relied on - if functions from a certain header are used, the header should be included.
This came up before and fizzled out but unfortunately
it is not:
Not including string.h in these files may happen to work on one platform or another because other headers happen to include it, but that shouldn't be relied on - if functions from a certain header are used, the header should be included.