All time favorite: strcasecmp
Andreas Buening <[email protected]> Mon, 06 Jan 2003 17:54:42 +0100
| Newsgroups | gmane.comp.ide.emx.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello! There are two functions strcasecmp() and strncasecmp() that are used by a lot of different software applications in the Unix world. They're equivalent to stricmp() and strnicmp(), they're (to my knowledge) not standardized but supported by a lot of Unix systems, they're popular, they're trivial and they prevent a lot of software packages from successful compilation. They caused long discussions about how to handle this issue which ranges from -Dstrcasecmp=stricmp to #ifdef __EMX__ statements or personally modified header files, one solution is uglier than the other one. To get rid of this problem I suggest the following. Please, add the following lines to string.h: int strcasecmp (__const__ char *, __const__ char *); int strncasecmp (__const__ char *, __const__ char *, size_t); And finally, add two entry points of this name to the emx libraries. This might not even imply that the emx*.dll files have to be changed, adding a "forward" declaration like EXPORTS strcasecmp = stricmp to the module definition file so that only the import libraries are affected. Do you think anything like this can make it into the next emx release? Bye, Andreas -- One OS to rule them all, One OS to find them, One OS to bring them all and in the darkness bind them In the Land of Mordor where the Shadows lie.