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
bc40aa54
Commit
bc40aa54
authored
Jul 14, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed strtoll() for win32: using _atoi64
parent
5fb9aca2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
mongoose.c
mongoose.c
+2
-2
unit_test.c
test/unit_test.c
+8
-0
No files found.
mongoose.c
View file @
bc40aa54
...
...
@@ -104,8 +104,8 @@ typedef long off_t;
#define STRX(x) #x
#define STR(x) STRX(x)
#define __func__ __FILE__ ":" STR(__LINE__)
#define strtoull(x, y, z)
strtoul(x, y, z
)
#define strtoll(x, y, z)
strtol(x, y, z
)
#define strtoull(x, y, z)
(unsigned __int64) _atoi64(x
)
#define strtoll(x, y, z)
_atoi64(x
)
#else
#define __func__ __FUNCTION__
#define strtoull(x, y, z) _strtoui64(x, y, z)
...
...
test/unit_test.c
View file @
bc40aa54
...
...
@@ -635,6 +635,13 @@ static void test_mg_get_cookie(void) {
ASSERT
(
mg_get_cookie
(
"a=1; b=2; c; d"
,
"c"
,
buf
,
sizeof
(
buf
))
==
-
1
);
}
static
void
test_strtoll
(
void
)
{
ASSERT
(
strtoll
(
"0"
,
NULL
,
10
)
==
0
);
ASSERT
(
strtoll
(
"123"
,
NULL
,
10
)
==
123
);
ASSERT
(
strtoll
(
"-34"
,
NULL
,
10
)
==
-
34
);
ASSERT
(
strtoll
(
"3566626116"
,
NULL
,
10
)
==
3566626116
);
}
int
__cdecl
main
(
void
)
{
test_mg_strcasestr
();
test_alloc_vprintf
();
...
...
@@ -654,6 +661,7 @@ int __cdecl main(void) {
test_api_calls
();
test_url_decode
();
test_mg_get_cookie
();
test_strtoll
();
#ifdef USE_LUA
test_lua
();
#endif
...
...
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