Alexandre Julliard : vkd3d-shader: Define S_ISREG if necessary for the Windows build.

Alexandre Julliard julliard at winehq.org
Tue Feb 8 16:11:29 CST 2022


Module: vkd3d
Branch: master
Commit: fd5d6cd454ed1d99b8288a5dc66ebfe87c51381c
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=fd5d6cd454ed1d99b8288a5dc66ebfe87c51381c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Feb  8 15:09:29 2022 +0100

vkd3d-shader: Define S_ISREG if necessary for the Windows build.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>

---

 libs/vkd3d-shader/preproc.y | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index ac6f647..3f02ac0 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -48,6 +48,10 @@ int preproc_yylex(PREPROC_YYSTYPE *yylval_param, PREPROC_YYLTYPE *yylloc_param,
 
 #define YYLLOC_DEFAULT(cur, rhs, n) (cur) = YYRHSLOC(rhs, !!n)
 
+#ifndef S_ISREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
 static void preproc_error(struct preproc_ctx *ctx, const struct vkd3d_shader_location *loc,
         enum vkd3d_shader_error error, const char *format, ...)
 {




More information about the wine-cvs mailing list