Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
f70b2ef3
Commit
f70b2ef3
authored
Nov 05, 2017
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed cygwin support
parent
79e97fa1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
470 additions
and
470 deletions
+470
-470
example/Makefile.mingw
example/Makefile.mingw
+1
-1
include/spdlog/details/os.h
include/spdlog/details/os.h
+469
-469
No files found.
example/Makefile.mingw
View file @
f70b2ef3
CXX
?=
g++
CXX
?=
g++
CXXFLAGS
=
-D_WIN32_WINNT
=
0x600
-march
=
native
-Wall
-Wextra
-Wshadow
-pedantic
-std
=
c++11
-pthread
-Wl
,--no-as-needed
-I
../include
CXXFLAGS
=
-D_WIN32_WINNT
=
0x600
-march
=
native
-Wall
-Wextra
-Wshadow
-pedantic
-std
=
gnu++0x
-pthread
-Wl
,--no-as-needed
-I
../include
CXX_RELEASE_FLAGS
=
-O3
CXX_RELEASE_FLAGS
=
-O3
CXX_DEBUG_FLAGS
=
-g
CXX_DEBUG_FLAGS
=
-g
...
...
include/spdlog/details/os.h
View file @
f70b2ef3
...
@@ -221,7 +221,7 @@ inline size_t filesize(FILE *f)
...
@@ -221,7 +221,7 @@ inline size_t filesize(FILE *f)
{
{
if
(
f
==
nullptr
)
if
(
f
==
nullptr
)
throw
spdlog_ex
(
"Failed getting file size. fd is null"
);
throw
spdlog_ex
(
"Failed getting file size. fd is null"
);
#if
def _WIN32
#if
defined ( _WIN32) && !defined(__CYGWIN__)
int
fd
=
_fileno
(
f
);
int
fd
=
_fileno
(
f
);
#if _WIN64 //64 bits
#if _WIN64 //64 bits
struct
_stat64
st
;
struct
_stat64
st
;
...
@@ -236,12 +236,12 @@ inline size_t filesize(FILE *f)
...
@@ -236,12 +236,12 @@ inline size_t filesize(FILE *f)
#else // unix
#else // unix
int
fd
=
fileno
(
f
);
int
fd
=
fileno
(
f
);
//64 bits(but not in osx
, where fstat64 is deprecated)
//64 bits(but not in osx
or cygwin, where fstat64 is deprecated)
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
&& !defined(__CYGWIN__)
struct
stat64
st
;
struct
stat64
st
;
if
(
fstat64
(
fd
,
&
st
)
==
0
)
if
(
fstat64
(
fd
,
&
st
)
==
0
)
return
static_cast
<
size_t
>
(
st
.
st_size
);
return
static_cast
<
size_t
>
(
st
.
st_size
);
#else // unix 32 bits or
osx
#else // unix 32 bits or
cygwin
struct
stat
st
;
struct
stat
st
;
if
(
fstat
(
fd
,
&
st
)
==
0
)
if
(
fstat
(
fd
,
&
st
)
==
0
)
return
static_cast
<
size_t
>
(
st
.
st_size
);
return
static_cast
<
size_t
>
(
st
.
st_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment