Skip to content

Commit

Permalink
glob: replaced bstrdup by strdup
Browse files Browse the repository at this point in the history
- allowed the usage of strdup again by removing a compiler macro
  • Loading branch information
franku committed Apr 5, 2019
1 parent c802aba commit 8fc82e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions core/src/include/baconfig.h
Expand Up @@ -478,10 +478,6 @@ int msg_(const char* file, int line, POOLMEM*& pool_buf, const char* fmt, ...);
#include "lib/bsys.h"
#include "lib/scan.h"

/** Use our strdup with smartalloc */
#undef strdup
#define strdup(buf) BadCallOnStrdupUseBstrdup(buf)

/** Use our fgets which handles interrupts */
#undef fgets
#define fgets(x, y, z) bfgets((x), (y), (z))
Expand Down
2 changes: 1 addition & 1 deletion core/src/win32/compat/glob.cc
Expand Up @@ -102,7 +102,7 @@ GLOB_INLINE char* glob_strdup(const char* pattern)
if (*origin == GLOB_HARD_ESC) ++origin;
*copy++ = *origin;
} while (*origin++);
return bstrdup(buf);
return strdup(buf);
}

#else
Expand Down

0 comments on commit 8fc82e5

Please sign in to comment.