summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlvqcl <lvqcl.mail@gmail.com>2018-08-18 13:59:51 +0300
committerErik de Castro Lopo <erikd@mega-nerd.com>2018-08-19 15:12:26 +1000
commit9fa2b5edbab76ad0cc849810759b1641fdee39c9 (patch)
treef6e4bd6504d1a42bbdfb80eac638b716e3a89bc4 /include
parenta8e9857e389b2f5fb73a0148bb8238a2d8ada090 (diff)
downloadflac-9fa2b5edbab76ad0cc849810759b1641fdee39c9.tar.gz
move CreateFile function outside of libFLAC
Diffstat (limited to 'include')
-rw-r--r--include/share/compat.h4
-rw-r--r--include/share/grabbag/file.h5
-rw-r--r--include/share/windows_unicode_filenames.h4
3 files changed, 5 insertions, 8 deletions
diff --git a/include/share/compat.h b/include/share/compat.h
index f425ca36..f3041655 100644
--- a/include/share/compat.h
+++ b/include/share/compat.h
@@ -175,10 +175,6 @@
#define flac_fstat fstat
#endif
-#ifndef WINAPI_FAMILY_PARTITION
-#define WINAPI_FAMILY_PARTITION(x) 0
-#endif
-
#ifdef ANDROID
#include <limits.h>
#endif
diff --git a/include/share/grabbag/file.h b/include/share/grabbag/file.h
index b3f41484..7bc851af 100644
--- a/include/share/grabbag/file.h
+++ b/include/share/grabbag/file.h
@@ -58,6 +58,11 @@ FLAC__bool grabbag__file_remove_file(const char *filename);
FILE *grabbag__file_get_binary_stdin(void);
FILE *grabbag__file_get_binary_stdout(void);
+#if defined _WIN32 && !defined __CYGWIN__
+#include <windows.h>
+HANDLE WINAPI grabbag__CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/include/share/windows_unicode_filenames.h b/include/share/windows_unicode_filenames.h
index 86820ca1..526b30d5 100644
--- a/include/share/windows_unicode_filenames.h
+++ b/include/share/windows_unicode_filenames.h
@@ -55,10 +55,6 @@ int flac_internal_utime_utf8(const char *filename, struct utimbuf *times);
int flac_internal_unlink_utf8(const char *filename);
int flac_internal_rename_utf8(const char *oldname, const char *newname);
-#include <windows.h>
-HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
-#define CreateFile_utf8 flac_internal_CreateFile_utf8
-
#ifdef __cplusplus
} /* extern "C" */
#endif