Declare UTF-8 encoding for changelog
[platform/upstream/flac.git] / src / test_libs_common / file_utils_flac.c
index 0de9e9c..892e2bd 100644 (file)
@@ -1,5 +1,6 @@
 /* test_libFLAC - Unit tester for libFLAC
- * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009  Josh Coalson
+ * Copyright (C) 2002-2009  Josh Coalson
+ * Copyright (C) 2011-2013  Xiph.Org Foundation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -81,7 +82,7 @@ FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_f
        FLAC__ASSERT(streaminfo->type == FLAC__METADATA_TYPE_STREAMINFO);
        FLAC__ASSERT((streaminfo->is_last && num_metadata == 0) || (!streaminfo->is_last && num_metadata > 0));
 
-       if(0 == (encoder_client_data.file = fopen(output_filename, "wb")))
+       if(0 == (encoder_client_data.file = flac_fopen(output_filename, "wb")))
                return false;
 
        encoder = FLAC__stream_encoder_new();
@@ -142,15 +143,9 @@ FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_f
        FLAC__stream_encoder_delete(encoder);
 
        if(0 != output_filesize) {
-#if defined _MSC_VER || defined __MINGW32__
-               struct _stat64 filestats;
+               struct flac_stat_s filestats;
 
-               if(_stat64(output_filename, &filestats) != 0)
-#else
-               struct stat filestats;
-
-               if(stat(output_filename, &filestats) != 0)
-#endif
+               if(flac_stat(output_filename, &filestats) != 0)
                        return false;
                else
                        *output_filesize = filestats.st_size;