diff options
author | lvqcl <lvqcl.mail@gmail.com> | 2018-08-18 13:59:51 +0300 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2018-08-19 15:12:26 +1000 |
commit | 9fa2b5edbab76ad0cc849810759b1641fdee39c9 (patch) | |
tree | f6e4bd6504d1a42bbdfb80eac638b716e3a89bc4 /src/flac/decode.c | |
parent | a8e9857e389b2f5fb73a0148bb8238a2d8ada090 (diff) | |
download | flac-9fa2b5edbab76ad0cc849810759b1641fdee39c9.tar.gz |
move CreateFile function outside of libFLAC
Diffstat (limited to 'src/flac/decode.c')
-rw-r--r-- | src/flac/decode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flac/decode.c b/src/flac/decode.c index de7773ec..a1c34721 100644 --- a/src/flac/decode.c +++ b/src/flac/decode.c @@ -263,11 +263,11 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__ void DecoderSession_destroy(DecoderSession *d, FLAC__bool error_occurred) { if(0 != d->fout && d->fout != stdout) { -#ifdef _WIN32 +#if defined _WIN32 && !defined __CYGWIN__ if(!error_occurred) { FLAC__off_t written_size = ftello(d->fout); if(written_size > 0) { - HANDLE fh = CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE fh = grabbag__CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(fh != INVALID_HANDLE_VALUE) { if(GetFileType(fh) == FILE_TYPE_DISK) { LARGE_INTEGER size; @@ -381,9 +381,9 @@ FLAC__bool DecoderSession_process(DecoderSession *d) } } -#ifdef _WIN32 +#if defined _WIN32 && !defined __CYGWIN__ if(!d->analysis_mode && !d->test_only && d->total_samples > 0 && d->fout != stdout) { - HANDLE fh = CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE fh = grabbag__CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(fh != INVALID_HANDLE_VALUE) { if (GetFileType(fh) == FILE_TYPE_DISK) { LARGE_INTEGER size; |