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
cd6b95db
Commit
cd6b95db
authored
6 years ago
by
Tom Parker-Shemilt
Browse files
Options
Downloads
Patches
Plain Diff
Split out windows strcase* work into gnu/msvc files
parent
d75fc9c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/windows/gnu.rs
+8
-0
8 additions, 0 deletions
src/windows/gnu.rs
src/windows/mod.rs
+12
-30
12 additions, 30 deletions
src/windows/mod.rs
src/windows/msvc.rs
+10
-0
10 additions, 0 deletions
src/windows/msvc.rs
with
30 additions
and
30 deletions
src/windows/gnu.rs
0 → 100644
+
8
−
0
View file @
cd6b95db
pub
const
L_tmpnam
:
::
c_uint
=
14
;
pub
const
TMP_MAX
:
::
c_uint
=
0x7fff
;
extern
{
pub
fn
strcasecmp
(
s1
:
*
const
::
c_char
,
s2
:
*
const
::
c_char
)
->
::
c_int
;
pub
fn
strncasecmp
(
s1
:
*
const
::
c_char
,
s2
:
*
const
::
c_char
,
n
:
::
size_t
)
->
::
c_int
;
}
This diff is collapsed.
Click to expand it.
src/windows.rs
→
src/windows
/mod
.rs
+
12
−
30
View file @
cd6b95db
...
...
@@ -111,18 +111,6 @@ pub const BUFSIZ: ::c_uint = 512;
pub
const
FOPEN_MAX
:
::
c_uint
=
20
;
pub
const
FILENAME_MAX
:
::
c_uint
=
260
;
cfg_if!
{
if
#[cfg(all(target_env
=
"gnu"
))]
{
pub
const
L_tmpnam
:
::
c_uint
=
14
;
pub
const
TMP_MAX
:
::
c_uint
=
0x7fff
;
}
else
if
#[cfg(all(target_env
=
"msvc"
))]
{
pub
const
L_tmpnam
:
::
c_uint
=
260
;
pub
const
TMP_MAX
:
::
c_uint
=
0x7fff_ffff
;
}
else
{
// Unknown target_env
}
}
pub
const
O_RDONLY
:
::
c_int
=
0
;
pub
const
O_WRONLY
:
::
c_int
=
1
;
pub
const
O_RDWR
:
::
c_int
=
2
;
...
...
@@ -381,24 +369,6 @@ extern {
locale
:
*
const
wchar_t
)
->
*
mut
wchar_t
;
}
cfg_if!
{
extern
{
if
#[cfg(all(target_env
=
"gnu"
))]
{
pub
fn
strcasecmp
(
s1
:
*
const
c_char
,
s2
:
*
const
c_char
)
->
c_int
;
pub
fn
strncasecmp
(
s1
:
*
const
c_char
,
s2
:
*
const
c_char
,
n
:
size_t
)
->
c_int
;
}
else
if
#[cfg(all(target_env
=
"msvc"
))]
{
#[link_name
=
"_stricmp"
]
pub
fn
stricmp
(
s1
:
*
const
c_char
,
s2
:
*
const
c_char
)
->
c_int
;
#[link_name
=
"_strnicmp"
]
pub
fn
strnicmp
(
s1
:
*
const
c_char
,
s2
:
*
const
c_char
,
n
:
size_t
)
->
c_int
;
}
else
{
// Unknown target_env
}
}
}
cfg_if!
{
if
#[cfg(core_cvoid)]
{
pub
use
core
::
ffi
::
c_void
;
...
...
@@ -416,3 +386,15 @@ cfg_if! {
}
}
}
cfg_if!
{
if
#[cfg(all(target_env
=
"gnu"
))]
{
mod
gnu
;
pub
use
self
::
gnu
::
*
;
}
else
if
#[cfg(all(target_env
=
"msvc"
))]
{
mod
msvc
;
pub
use
self
::
msvc
::
*
;
}
else
{
// Unknown target_env
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/windows/msvc.rs
0 → 100644
+
10
−
0
View file @
cd6b95db
pub
const
L_tmpnam
:
::
c_uint
=
260
;
pub
const
TMP_MAX
:
::
c_uint
=
0x7fff_ffff
;
extern
{
#[link_name
=
"_stricmp"
]
pub
fn
stricmp
(
s1
:
*
const
::
c_char
,
s2
:
*
const
::
c_char
)
->
::
c_int
;
#[link_name
=
"_strnicmp"
]
pub
fn
strnicmp
(
s1
:
*
const
::
c_char
,
s2
:
*
const
::
c_char
,
n
:
::
size_t
)
->
::
c_int
;
}
\ No newline at end of file
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