Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3ad249b9
Commit
3ad249b9
authored
Jul 14, 2003
by
Gabriel Dos Reis
Committed by
Gabriel Dos Reis
Jul 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include <cstring> and <cstdlib>.
From-SVN: r69329
parent
55ece1b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
libstdc++-v3/ChangeLog
+5
-0
libstdc++-v3/config/locale/gnu/c_locale.h
+9
-7
No files found.
libstdc++-v3/ChangeLog
View file @
3ad249b9
2003-07-14 Gabriel Dos Reis <gcc@integrable-solutions.net>
* config/locale/gnu/c_locale.h (__convert_from_v): Include
<cstring> and <cstdlib>. Qualify names.
2003-07-13 Mark Mitchell <mark@codesourcery.com>
* config/locale/generic/c_locale.h: Include <cstdlib> and
...
...
libstdc++-v3/config/locale/gnu/c_locale.h
View file @
3ad249b9
...
...
@@ -38,6 +38,8 @@
#pragma GCC system_header
#include <cstring> // get std::strlen
#include <cstdlib> // get std::malloc
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
...
...
@@ -73,10 +75,10 @@ namespace std
_Tv
__v
,
const
__c_locale
&
,
int
__prec
=
-
1
)
{
char
*
__old
=
setlocale
(
LC_ALL
,
NULL
);
char
*
__sav
=
static_cast
<
char
*>
(
malloc
(
strlen
(
__old
)
+
1
));
char
*
__sav
=
static_cast
<
char
*>
(
std
::
malloc
(
std
::
strlen
(
__old
)
+
1
));
if
(
__sav
)
strcpy
(
__sav
,
__old
);
setlocale
(
LC_ALL
,
"C"
);
st
d
::
st
rcpy
(
__sav
,
__old
);
s
td
::
s
etlocale
(
LC_ALL
,
"C"
);
#endif
int
__ret
;
...
...
@@ -87,16 +89,16 @@ namespace std
__ret
=
snprintf
(
__out
,
__size
,
__fmt
,
__v
);
#else
if
(
__prec
>=
0
)
__ret
=
sprintf
(
__out
,
__fmt
,
__prec
,
__v
);
__ret
=
s
td
::
s
printf
(
__out
,
__fmt
,
__prec
,
__v
);
else
__ret
=
sprintf
(
__out
,
__fmt
,
__v
);
__ret
=
s
td
::
s
printf
(
__out
,
__fmt
,
__v
);
#endif
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__gnu_cxx
::
__uselocale
(
__old
);
#else
setlocale
(
LC_ALL
,
__sav
);
free
(
__sav
);
s
td
::
s
etlocale
(
LC_ALL
,
__sav
);
std
::
free
(
__sav
);
#endif
return
__ret
;
}
...
...
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