Add support for long paths in Windows 10+

This commit is contained in:
Nikolaj Schlej 2023-06-19 18:01:25 -07:00
parent 031bd4f734
commit b6cdc9f484
14 changed files with 108 additions and 51 deletions

View file

@ -13,8 +13,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef USTRING_H
#define USTRING_H
#include "basetypes.h"
#if defined (QT_CORE_LIB)
// Use Qt class, if Qt is available
#include <QString>
@ -27,6 +25,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define UString CBString
#endif // QT_CORE_LIB
#if defined(__clang__) || defined(__GNUC__)
#define ATTRIBUTE_FORMAT_(t,f,a) __attribute__((format(t, f, a)))
#else
#define ATTRIBUTE_FORMAT_(t,f,a)
#endif
UString usprintf(const char* fmt, ...) ATTRIBUTE_FORMAT_(printf, 1, 2);
UString urepeated(char c, int len);
UString uFromUcs2(const char* str, size_t max_len = 0);