Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
5dfe0132
Commit
5dfe0132
authored
4 years ago
by
Marko Mijalkovic
Browse files
Options
Downloads
Patches
Plain Diff
Add c typedefs for the Sony PSP
parent
bb734e32
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib.rs
+6
-0
6 additions, 0 deletions
src/lib.rs
src/psp.rs
+47
-0
47 additions, 0 deletions
src/psp.rs
with
53 additions
and
0 deletions
src/lib.rs
+
6
−
0
View file @
5dfe0132
...
@@ -115,6 +115,12 @@ cfg_if! {
...
@@ -115,6 +115,12 @@ cfg_if! {
mod
switch
;
mod
switch
;
pub
use
switch
::
*
;
pub
use
switch
::
*
;
}
else
if
#[cfg(target_os
=
"psp"
)]
{
mod
fixed_width_ints
;
pub
use
fixed_width_ints
::
*
;
mod
psp
;
pub
use
psp
::
*
;
}
else
if
#[cfg(target_os
=
"vxworks"
)]
{
}
else
if
#[cfg(target_os
=
"vxworks"
)]
{
mod
fixed_width_ints
;
mod
fixed_width_ints
;
pub
use
fixed_width_ints
::
*
;
pub
use
fixed_width_ints
::
*
;
...
...
This diff is collapsed.
Click to expand it.
src/psp.rs
0 → 100644
+
47
−
0
View file @
5dfe0132
//! PSP C type definitions
pub
type
c_schar
=
i8
;
pub
type
c_uchar
=
u8
;
pub
type
c_short
=
i16
;
pub
type
c_ushort
=
u16
;
pub
type
c_int
=
i32
;
pub
type
c_uint
=
u32
;
pub
type
c_float
=
f32
;
pub
type
c_double
=
f64
;
pub
type
c_longlong
=
i64
;
pub
type
c_ulonglong
=
u64
;
pub
type
intmax_t
=
i64
;
pub
type
uintmax_t
=
u64
;
pub
type
size_t
=
usize
;
pub
type
ptrdiff_t
=
isize
;
pub
type
intptr_t
=
isize
;
pub
type
uintptr_t
=
usize
;
pub
type
ssize_t
=
isize
;
pub
type
c_char
=
u8
;
pub
type
c_long
=
i64
;
pub
type
c_ulong
=
u64
;
pub
const
INT_MIN
:
c_int
=
-
2147483648
;
pub
const
INT_MAX
:
c_int
=
2147483647
;
cfg_if!
{
if
#[cfg(libc_core_cvoid)]
{
pub
use
::
ffi
::
c_void
;
}
else
{
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help
// enable more optimization opportunities around it recognizing things
// like malloc/free.
#[repr(u8)]
#[allow(missing_copy_implementations)]
#[allow(missing_debug_implementations)]
pub
enum
c_void
{
// Two dummy variants so the #[repr] attribute can be used.
#[doc(hidden)]
__variant1
,
#[doc(hidden)]
__variant2
,
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment