Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
relibc
Commits
d0a4f2f8
Verified
Commit
d0a4f2f8
authored
6 years ago
by
jD91mZM2
Browse files
Options
Downloads
Patches
Plain Diff
Delete a bunch of leftover constants
parent
76959416
No related branches found
No related tags found
No related merge requests found
Pipeline
#1319
failed
6 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/header/time/constants.rs
+2
-32
2 additions, 32 deletions
src/header/time/constants.rs
with
2 additions
and
32 deletions
src/header/time/constants.rs
+
2
−
32
View file @
d0a4f2f8
...
@@ -10,33 +10,6 @@ pub mod sys;
...
@@ -10,33 +10,6 @@ pub mod sys;
#[path
=
"redox.rs"
]
#[path
=
"redox.rs"
]
pub
mod
sys
;
pub
mod
sys
;
// Move epoch from 01.01.1970 to 01.03.0000 (yes, Year 0) - this is the first
// day of a 400-year long "era", right after additional day of leap year.
// This adjustment is required only for date calculation, so instead of
// modifying time_t value (which would require 64-bit operations to work
// correctly) it's enough to adjust the calculated number of days since epoch.
pub
(
crate
)
const
EPOCH_ADJUSTMENT_DAYS
:
c_long
=
719468
;
// year to which the adjustment was made
pub
(
crate
)
const
ADJUSTED_EPOCH_YEAR
:
c_int
=
0
;
// 1st March of year 0 is Wednesday
pub
(
crate
)
const
ADJUSTED_EPOCH_WDAY
:
c_long
=
3
;
pub
(
crate
)
const
DAYS_PER_ERA
:
c_long
=
(
400
-
97
)
*
365
+
97
*
366
;
pub
(
crate
)
const
DAYS_PER_CENTURY
:
c_ulong
=
(
100
-
24
)
*
365
+
24
*
366
;
pub
(
crate
)
const
DAYS_PER_4_YEARS
:
c_ulong
=
3
*
365
+
366
;
pub
(
crate
)
const
DAYS_PER_YEAR
:
c_int
=
365
;
pub
(
crate
)
const
DAYS_IN_JANUARY
:
c_int
=
31
;
pub
(
crate
)
const
DAYS_IN_FEBRUARY
:
c_int
=
28
;
pub
(
crate
)
const
YEARS_PER_ERA
:
c_int
=
400
;
pub
(
crate
)
const
SECSPERMIN
:
c_long
=
60
;
pub
(
crate
)
const
MINSPERHOUR
:
c_long
=
60
;
pub
(
crate
)
const
HOURSPERDAY
:
c_long
=
24
;
pub
(
crate
)
const
SECSPERHOUR
:
c_long
=
SECSPERMIN
*
MINSPERHOUR
;
pub
(
crate
)
const
SECSPERDAY
:
c_long
=
SECSPERHOUR
*
HOURSPERDAY
;
pub
(
crate
)
const
DAYSPERWEEK
:
c_int
=
7
;
pub
(
crate
)
const
YEAR_BASE
:
c_int
=
1900
;
pub
(
crate
)
const
UTC
:
*
const
c_char
=
b"UTC
\0
"
as
*
const
u8
as
*
const
c_char
;
pub
(
crate
)
const
UTC
:
*
const
c_char
=
b"UTC
\0
"
as
*
const
u8
as
*
const
c_char
;
pub
(
crate
)
const
DAY_NAMES
:
[
&
str
;
7
]
=
[
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
];
pub
(
crate
)
const
DAY_NAMES
:
[
&
str
;
7
]
=
[
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
];
...
@@ -44,9 +17,6 @@ pub(crate) const MON_NAMES: [&str; 12] = [
...
@@ -44,9 +17,6 @@ pub(crate) const MON_NAMES: [&str; 12] = [
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
,
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
,
];
];
pub
const
CLOCK_REALTIME
:
clockid_t
=
0
;
pub
const
CLOCK_PROCESS_CPUTIME_ID
:
clockid_t
=
2
;
pub
const
CLOCK_MONOTONIC
:
clockid_t
=
1
;
pub
(
crate
)
const
CLOCK_PROCESS_CPUTIME_ID
:
clockid_t
=
2
;
// Can't be time_t because cbindgen UGH
// Can't be time_t because cbindgen UGH
pub
(
crate
)
const
CLOCKS_PER_SEC
:
c_long
=
1_000_000
;
pub
const
CLOCKS_PER_SEC
:
c_long
=
1_000_000
;
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