mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 12:28:31 +01:00
Another compile fix for echoprint on mingw.
This commit is contained in:
parent
bfa23cbd10
commit
bd5fe66fec
9
3rdparty/echoprint-codegen/src/File.h
vendored
9
3rdparty/echoprint-codegen/src/File.h
vendored
@ -7,9 +7,14 @@
|
|||||||
#ifndef FILE_H
|
#ifndef FILE_H
|
||||||
#define FILE_H
|
#define FILE_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
#include "win_unistd.h"
|
#include "win_unistd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#include <io.h> // For F_OK
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This makes file writing a bit easier (makes sure we don't forget to fclose, basically). Use it like this:
|
This makes file writing a bit easier (makes sure we don't forget to fclose, basically). Use it like this:
|
||||||
|
|
||||||
@ -31,7 +36,7 @@ public:
|
|||||||
static bool ends_with(const char* filename, const char* ending) {
|
static bool ends_with(const char* filename, const char* ending) {
|
||||||
int nFilename = strlen(filename);
|
int nFilename = strlen(filename);
|
||||||
int nEnding = strlen(ending);
|
int nEnding = strlen(ending);
|
||||||
|
|
||||||
bool same = false;
|
bool same = false;
|
||||||
if (nEnding <= nFilename) {
|
if (nEnding <= nFilename) {
|
||||||
const char* file_end = filename + strlen(filename) - strlen(ending);
|
const char* file_end = filename + strlen(filename) - strlen(ending);
|
||||||
|
Loading…
Reference in New Issue
Block a user