Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLautis Sun <lautis0503@gmail.com>2016-07-07 15:30:05 +0300
committerLautis Sun <lautis0503@gmail.com>2016-07-07 15:30:05 +0300
commit7f3b2f7706cda06b531f02edb048efefcd518d92 (patch)
tree7ea206c93de477fcac4468c5ec17c1bf6694e0ff
parent58843e34ad6e3dd16282db63b490f472e4c84a3a (diff)
Make sure that _UNICODE & UNICODE are both defined.
-rw-r--r--samples/list_to_file.c1
-rw-r--r--tinydir.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/samples/list_to_file.c b/samples/list_to_file.c
index 618dbe8..cb57092 100644
--- a/samples/list_to_file.c
+++ b/samples/list_to_file.c
@@ -2,6 +2,7 @@
#ifndef TINYDIR_H
#define _UNICODE
+#define UNICODE
#include "tinydir.h"
#endif
diff --git a/tinydir.h b/tinydir.h
index 2baa672..c193fa9 100644
--- a/tinydir.h
+++ b/tinydir.h
@@ -32,6 +32,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif
+#if ((defined _UNICODE) & !(defined UNICODE))
+#define UNICODE
+#endif
+
+#if ((defined UNICODE) & !(defined _UNICODE))
+#define _UNICODE
+#endif
+
#include <errno.h>
#include <stdlib.h>
#include <string.h>