util: Remove include of windows.h in memstream.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
bool
|
||||
u_memstream_open(struct u_memstream *mem, char **bufp, size_t *sizep)
|
||||
{
|
||||
|
||||
@@ -30,8 +30,13 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX _MAX_PATH /* Equivalent to MAX_PATH from minwindef.h */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -44,7 +49,7 @@ struct u_memstream
|
||||
#ifdef _WIN32
|
||||
char **bufp;
|
||||
size_t *sizep;
|
||||
char temp[MAX_PATH];
|
||||
char temp[PATH_MAX];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user