Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c3c44544
Commit
c3c44544
authored
Sep 25, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Call MSVCRT_strtoi64_l in strtol implementation.
parent
b01f8881
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
34 deletions
+18
-34
string.c
dlls/msvcrt/string.c
+18
-34
No files found.
dlls/msvcrt/string.c
View file @
c3c44544
...
@@ -727,40 +727,6 @@ int CDECL __STRINGTOLD( MSVCRT__LDOUBLE *value, char **endptr, const char *str,
...
@@ -727,40 +727,6 @@ int CDECL __STRINGTOLD( MSVCRT__LDOUBLE *value, char **endptr, const char *str,
}
}
/******************************************************************
/******************************************************************
* strtol (MSVCRT.@)
*/
MSVCRT_long
CDECL
MSVCRT_strtol
(
const
char
*
nptr
,
char
**
end
,
int
base
)
{
/* wrapper to forward libc error code to msvcrt's error codes */
long
ret
;
errno
=
0
;
ret
=
strtol
(
nptr
,
end
,
base
);
switch
(
errno
)
{
case
ERANGE
:
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
break
;
case
EINVAL
:
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
break
;
default:
/* cope with the fact that we may use 64bit long integers on libc
* while msvcrt always uses 32bit long integers
*/
if
(
ret
>
MSVCRT_LONG_MAX
)
{
ret
=
MSVCRT_LONG_MAX
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
}
else
if
(
ret
<
-
MSVCRT_LONG_MAX
-
1
)
{
ret
=
-
MSVCRT_LONG_MAX
-
1
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
}
break
;
}
return
ret
;
}
/******************************************************************
* strtoul (MSVCRT.@)
* strtoul (MSVCRT.@)
*/
*/
MSVCRT_ulong
CDECL
MSVCRT_strtoul
(
const
char
*
nptr
,
char
**
end
,
int
base
)
MSVCRT_ulong
CDECL
MSVCRT_strtoul
(
const
char
*
nptr
,
char
**
end
,
int
base
)
...
@@ -934,6 +900,24 @@ int __cdecl MSVCRT_atoi(const char *str)
...
@@ -934,6 +900,24 @@ int __cdecl MSVCRT_atoi(const char *str)
return
minus
?
-
ret
:
ret
;
return
minus
?
-
ret
:
ret
;
}
}
/******************************************************************
* strtol (MSVCRT.@)
*/
MSVCRT_long
CDECL
MSVCRT_strtol
(
const
char
*
nptr
,
char
**
end
,
int
base
)
{
__int64
ret
=
MSVCRT_strtoi64_l
(
nptr
,
end
,
base
,
NULL
);
if
(
ret
>
MSVCRT_LONG_MAX
)
{
ret
=
MSVCRT_LONG_MAX
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
}
else
if
(
ret
<
MSVCRT_LONG_MIN
)
{
ret
=
MSVCRT_LONG_MIN
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
}
return
ret
;
}
/*********************************************************************
/*********************************************************************
* _strtoui64_l (MSVCRT.@)
* _strtoui64_l (MSVCRT.@)
*
*
...
...
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