Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
2a3f31f5
Commit
2a3f31f5
authored
Mar 06, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using g++ for compilation. Fixed C++ build.
parent
dcecfadb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Makefile
Makefile
+5
-4
mongoose.c
mongoose.c
+2
-1
No files found.
Makefile
View file @
2a3f31f5
...
...
@@ -22,10 +22,11 @@ all:
### UNIX build: linux, bsd, mac, rtems
##########################################################################
CFLAGS
=
-W
-Wall
-std
=
c99
-pedantic
-O2
$(COPT)
MAC_SHARED
=
-flat_namespace
-bundle
-undefined
suppress
LINFLAGS
=
-ldl
-pthread
$(CFLAGS)
LIB
=
_
$(PROG)
.so
CFLAGS
=
-W
-Wall
-std
=
c99
-pedantic
-O2
$(COPT)
MAC_SHARED
=
-flat_namespace
-bundle
-undefined
suppress
LINFLAGS
=
-ldl
-pthread
$(CFLAGS)
LIB
=
_
$(PROG)
.so
CC
=
g++
# Make sure that the compiler flags come last in the compilation string.
# If not so, this can break some on some Linux distros which use
...
...
mongoose.c
View file @
2a3f31f5
...
...
@@ -24,6 +24,7 @@
#define _XOPEN_SOURCE 600 // For flockfile() on Linux
#define _LARGEFILE_SOURCE // Enable 64-bit file offsets
#define __STDC_FORMAT_MACROS // <inttypes.h> wants this for C++
#define __STDC_LIMIT_MACROS // C++ wants that for INT64_MAX
#endif
#if defined(__SYMBIAN32__)
...
...
@@ -779,7 +780,7 @@ static int match_prefix(const char *pattern, int pattern_len, const char *str) {
const
char
*
or_str
;
int
i
,
j
,
len
,
res
;
if
((
or_str
=
memchr
(
pattern
,
'|'
,
pattern_len
))
!=
NULL
)
{
if
((
or_str
=
(
const
char
*
)
memchr
(
pattern
,
'|'
,
pattern_len
))
!=
NULL
)
{
res
=
match_prefix
(
pattern
,
or_str
-
pattern
,
str
);
return
res
>
0
?
res
:
match_prefix
(
or_str
+
1
,
(
pattern
+
pattern_len
)
-
(
or_str
+
1
),
str
);
...
...
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