Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
relibc
Commits
4f187efc
Verified
Commit
4f187efc
authored
Sep 26, 2018
by
jD91mZM2
Browse files
Change BUFSIZ type to work with cbindgen
parent
243ce18e
Pipeline
#1382
failed with stages
in 9 minutes and 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/header/stdio/constants.rs
View file @
4f187efc
use
platform
::
types
::
*
;
pub
const
EOF
:
c_int
=
-
1
;
pub
const
BUFSIZ
:
size_
t
=
1024
;
pub
const
BUFSIZ
:
c_in
t
=
1024
;
pub
const
UNGET
:
size_
t
=
8
;
pub
const
UNGET
:
c_in
t
=
8
;
pub
const
FILENAME_MAX
:
c_int
=
4096
;
...
...
src/header/stdio/default.rs
View file @
4f187efc
...
...
@@ -17,7 +17,7 @@ impl GlobalFile {
file
,
flags
:
constants
::
F_PERM
|
flags
,
read_buf
:
Buffer
::
Owned
(
vec!
[
0
;
BUFSIZ
]),
read_buf
:
Buffer
::
Owned
(
vec!
[
0
;
BUFSIZ
as
usize
]),
read_pos
:
0
,
read_size
:
0
,
unget
:
None
,
...
...
src/header/stdio/mod.rs
View file @
4f187efc
...
...
@@ -709,7 +709,7 @@ pub extern "C" fn setvbuf(stream: *mut FILE, buf: *mut c_char, mode: c_int, mut
// Set a buffer of size `size` if no buffer is given
stream
.read_buf
=
if
buf
.is_null
()
||
size
==
0
{
if
size
==
0
{
size
=
BUFSIZ
;
size
=
BUFSIZ
as
usize
;
}
// TODO: Make it unbuffered if _IONBF
// if mode == _IONBF {
...
...
Write
Preview
Supports
Markdown
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