Displaying 13 results from an estimated 13 matches for "createfile_utf8".
2016 Feb 09
2
Compilation failure using mingw-w64 and gcc-5.3.0
...ch I have placed at the end of this email. They are eased
by adding this to decode.c:
#if _WIN32
#include <windows.h>
#include <shlobj.h>
#endif
...among the headers.
Then, this error results when attempting to link flac.exe:
decode.o:decode.c:(.text+0x4fe1): undefined reference to `CreateFile_utf8'
decode.o:decode.c:(.text+0x50fb): undefined reference to `CreateFile_utf8'
../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x156):
undefined reference to `CreateFile_utf8'
../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x188):
undefined reference to `...
2016 Feb 08
2
Compilation failure using mingw-w64 and gcc-5.3.0
...ct __stat64 *buffer);
^
../../include/share/win_utf8_io.h:54:43: warning: its scope is only this
definition or declaration, which is probably not what you want
../../include/share/win_utf8_io.h:59:1: error: unknown type name 'HANDLE'
HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD
dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES
lpSecurityAttributes, DWORD dwCreati
^
../../include/share/win_utf8_io.h:59:15: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'CreateFile_utf8'...
2016 Feb 10
0
[PATCH] Compilation failure...
...d
> by adding this to decode.c:
>
> #if _WIN32
> #include <windows.h>
> #include <shlobj.h>
> #endif
>
> ...among the headers.
>
> Then, this error results when attempting to link flac.exe:
>
> decode.o:decode.c:(.text+0x4fe1): undefined reference to `CreateFile_utf8'
> decode.o:decode.c:(.text+0x50fb): undefined reference to `CreateFile_utf8'
> ../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x156):
> undefined reference to `CreateFile_utf8'
> ../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x188):
>...
2013 Apr 20
1
One tiny Windows Unicode patch
....h>
int get_utf8_argv(int *argc, char ***argv);
@@ -25,6 +25,7 @@ int chmod_utf8(const char *filename, int pmode);
int utime_utf8(const char *filename, struct utimbuf *times);
int unlink_utf8(const char *filename);
int rename_utf8(const char *oldname, const char *newname);
+HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/share/grabbag/file.c b/src/share/grabbag...
2014 Sep 26
4
Patch to add buffering to decoding too
...ecoderSession_process(DecoderSession *d)
/* write the WAVE/AIFF headers if necessary */
if(!d->analysis_mode && !d->test_only && d->format != FORMAT_RAW) {
+#ifdef _WIN32
+ if(strcmp(outfilename, "-") && d->total_samples > 0) {
+ HANDLE fh = CreateFile_utf8(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;
+ size.QuadPart = d->total_samples * d->channels * ((d...
2016 Jan 09
3
Lets do a 1.3.2 release
lvqcl wrote:
>>> Win_utf8 stuff should not be included in libflac since it's only to be
>>> used by the flac.exe frontend. It is not needed by other programs nor
>>> would they benefit from it without doing the extra work of converting
>>> their ansi filenames and functions to utf-8.
>>>
>>>> Version 2 of my patch attached, which fixes
2014 Sep 27
0
Patch to add buffering to decoding too
..., FLAC__bool is_ogg, FLAC__
void DecoderSession_destroy(DecoderSession *d, FLAC__bool error_occurred)
{
if(0 != d->fout && d->fout != stdout) {
+#ifdef _WIN32
+ 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);
+ if(fh != INVALID_HANDLE_VALUE) {
+ if(GetFileType(fh) == FILE_TYPE_DISK) {
+ LARGE_INTEGER size;
+ size.QuadPart = written_size;
+ if(SetFilePo...
2016 Jan 09
0
Lets do a 1.3.2 release
...s share/win_utf8_io.h (if _WIN32 is defined),
> and is included into many libFLAC source files. As a result, some libFLAC
> source files unnecessarily include share/win_utf8_io.h, windows.h, etc.
It looks like win_utf8_io.h only includes windows.h in order to have
the proper types to declare CreateFile_utf8, which is used in
src/flac/decode.c and src/share/grabbag/file.c. I suppose those two
files could #define FLAC__INCLUDE_WINAPI and win_utf8_io.h could guard
the include and CreateFile_utf8 declaration with it, if we wanted to
avoid windows.h. If we wanted to avoid share/win_utf8_io.h completely,
we...
2018 Aug 18
1
[PATCH] move CreateFile() function from libFLAC
This patch renames flac_internal_CreateFile_utf8() function to
grabbag__CreateFile_utf8() and
moves it from /src/libFLAC/windows_unicode_filenames.c into
src/share/grabbag/file.c
This function is not used by libFLAC anyway.
After this, it should be possible to compile libFLAC as UWP.
In the old code there were 3 different #if conditionals arou...
2014 Sep 26
0
Patch to add buffering to decoding too
...ecoderSession_process(DecoderSession *d)
/* write the WAVE/AIFF headers if necessary */
if(!d->analysis_mode && !d->test_only && d->format != FORMAT_RAW) {
+#ifdef _WIN32
+ if(strcmp(outfilename, "-") && d->total_samples > 0) {
+ HANDLE fh = CreateFile_utf8(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, pos;
+
+ size.QuadPart = d->total_samples * d->channel...
2016 Jan 09
2
About libFLAC -> win_utf8_io dependency
...sible for
flac.exe to use undocumented functions from shared libFLAC library,
why not. They won't be officially available to 3rd-party apps,
only to flac/metaflac/etc.
And BTW, flac built with MSYS/MinGW-w64 (with --enable-shared option)
*DOES EXACTLY THIS*: libFLAC-8.dll exports chmod_utf8, CreateFile_utf8 at 28,
fopen_utf8, win_get_console_width, and so on, and flac.exe imports them
from libFLAC-8.dll.
2014 Sep 26
3
Patch to add buffering to decoding too
Can you please wrap the setvbuf in _WIN32 IFDEFs too? Currently
memory usage of FLAC decoding is about 1MB, so this patch is
increasing memory usage tenfold, also for platforms that do not
need this. It is a non-problem on my system anyway.
Op 26-09-14 om 10:36 schreef Janne Hyv?rinen:
> I made some changes to the previous patch. I don't know why I
> originally didn't put the
2014 Sep 25
2
Patch to add buffering to decoding too
Decoding flac files is also prone to producing fragmented files. NTFS
has the ability to completely avoid fragmentation if it is told the file
size before hand, but that would require using special Windows-only
functions. Increasing the write buffer from the default 512 bytes to 10
MB already reduces the problem tremendously.
-------------- next part --------------
diff --git