X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCutil.c;h=da0223f6f6b67c36715ac3f119ed2a4fefffd4d0;hb=90bdb43b342189fcb94a398855d43f3f47f96738;hp=32c7bf74d4f2af67886c93850f24825ed1ab7257;hpb=386cee8465119215de67a9e2c767818d4a923578;p=fw%2Fsdcc diff --git a/src/SDCCutil.c b/src/SDCCutil.c index 32c7bf74..da0223f6 100644 --- a/src/SDCCutil.c +++ b/src/SDCCutil.c @@ -22,6 +22,8 @@ what you give them. Help stamp out software-hoarding! -------------------------------------------------------------------------*/ +#include + #ifdef _WIN32 #include #include @@ -136,7 +138,7 @@ getBinPath(const char *prel) return path; } /* not enough info in prel; do it with module name */ - else if (0 != GetModuleFileName(NULL, path, sizeof path) != 0 && + else if (0 != GetModuleFileName(NULL, path, sizeof path) && NULL != (p = strrchr(path, DIR_SEPARATOR_CHAR))) { *p = '\0'; return path; @@ -296,8 +298,6 @@ const char *getBuildNumber(void) return (SDCC_BUILD_NUMBER); } - - #if defined(HAVE_VSNPRINTF) || defined(HAVE_VSPRINTF) size_t SDCCsnprintf(char *dst, size_t n, const char *fmt, ...) {