#include <string.h>
#ifdef _MSC_VER
-#define strcasecmp _stricmp
+#define strcasecmp(_String1, _String2) _stricmp(_String1, _String2)
+#define strncasecmp(_String1, _String2, _MaxCount) _strnicmp(_String1, _String2, _MaxCount)
#endif
#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
{
/* Skip leading underscore and remove trailing decoration */
pcName++;
- nNameLength = pcAt - pcName;
+ nNameLength = (int)(pcAt - pcName);
}
/* Print the undecorated function name */
if (pcDot)
{
/* First print the dll name, followed by a dot */
- nNameLength = pcDot - pcName;
+ nNameLength = (int)(pcDot - pcName);
fprintf(fileDest, "%.*s.", nNameLength, pcName);
/* Now the actual function name */
{
size_t nFileSize;
char *pszSource, *pszDefFileName = NULL, *pszStubFileName = NULL, *pszLibStubName = NULL;
+ const char* pszVersionOption = "--version=0x";
char achDllName[40];
FILE *file;
int result = 0, i;
{
pszDllName = argv[i] + 3;
}
- else if (strcasecmp(argv[i], "--version=0x") == 0)
+ else if (strncasecmp(argv[i], pszVersionOption, strlen(pszVersionOption)) == 0)
{
- guOsVersion = strtoul(argv[i] + sizeof("--version=0x"), NULL, 16);
+ guOsVersion = strtoul(argv[i] + strlen(pszVersionOption), NULL, 16);
}
else if (strcasecmp(argv[i], "--implib") == 0)
{