Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions SimpleGlob.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ enum SG_Error {
// on Windows we want to use MBCS aware string functions and mimic the
// Unix glob functionality. On Unix we just use glob.
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# define _MBCS
# include <mbstring.h>
# include <stdint.h>
# define sg_strchr ::_mbschr
# define sg_strrchr ::_mbsrchr
# define sg_strlen ::_mbslen
Expand Down Expand Up @@ -301,7 +305,9 @@ enum SG_FileType {
# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif

#define SG_PATH_CHAR '\\'
#ifndef SG_PATH_CHAR
# define SG_PATH_CHAR '\\'
#endif

/*! @brief Windows glob implementation. */
template<class SOCHAR>
Expand Down Expand Up @@ -381,7 +387,9 @@ struct SimpleGlobBase

#else // !_WIN32

#define SG_PATH_CHAR '/'
#ifndef SG_PATH_CHAR
# define SG_PATH_CHAR '/'
#endif

/*! @brief Unix glob implementation. */
template<class SOCHAR>
Expand Down