diff dw.h @ 2451:44b77654c406

Add DW_DIR_SEPARATOR for easy access to the separator characters. There is something similar in dwcompat.h but I don't want to require including dwcompat.h on Unix, in case dwcompat isn't built.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 10 Apr 2021 20:11:43 +0000
parents 0286ac44d347
children aa420e366b2b
line wrap: on
line diff
--- a/dw.h	Sat Apr 10 20:09:58 2021 +0000
+++ b/dw.h	Sat Apr 10 20:11:43 2021 +0000
@@ -347,8 +347,8 @@
 #include <pthread.h>
 #include <dlfcn.h>
 
-/* Unfortunately using we can't import Cocoa.h
- * or UIKit.h from C code, so we have to instead
+/* Unfortunately we can't import Cocoa.h or
+ * UIKit.h from C code, so we have to instead
  * use opaque types and use the values from
  * the headers here directly without using the
  * symbolic names.
@@ -1359,8 +1359,11 @@
 typedef CTIME *PCTIME;
 #endif
 
-#if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__)
+/* Define a few things missing on OS/2 and Windows */
+#if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || \
+    (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__)
 typedef unsigned long DWTID;
+#define DW_DIR_SEPARATOR '\\'
 #endif
 
 /* Some dark mode constants for supported platforms */
@@ -1577,6 +1580,10 @@
 #define DW_FCF_COMPOSITED        0
 #endif
 
+#ifndef DW_DIR_SEPARATOR
+#define DW_DIR_SEPARATOR '/'
+#endif
+
 #ifndef API
 #define API
 #endif