File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -120,33 +120,6 @@ static int64_t computeRemainingYears(int64_t daysPerYears,
120120 return years;
121121}
122122
123- char *get_env_var (const char *input) {
124- char **env_ptr = reinterpret_cast <char **>(LIBC_NAMESPACE::app.env_ptr );
125-
126- if (input == nullptr || env_ptr == nullptr )
127- return nullptr ;
128-
129- LIBC_NAMESPACE::cpp::string_view env_var_name (input);
130- if (env_var_name.size () == 0 )
131- return nullptr ;
132-
133- for (char **env = env_ptr; *env != nullptr ; ++env) {
134- LIBC_NAMESPACE::cpp::string_view cur (*env);
135- if (!cur.starts_with (env_var_name))
136- continue ;
137-
138- if (cur[env_var_name.size ()] != ' =' )
139- continue ;
140-
141- // Remove the name and the equals sign.
142- cur.remove_prefix (env_var_name.size () + 1 );
143- // We know that data is null terminated, so this is safe.
144- return const_cast <char *>(cur.data ());
145- }
146-
147- return nullptr ;
148- }
149-
150123// First, divide "total_seconds" by the number of seconds in a day to get the
151124// number of days since Jan 1 1970. The remainder will be used to calculate the
152125// number of Hours, Minutes and Seconds.
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ cpp::optional<time_t> mktime_internal(const tm *tm_out);
3737// "total_seconds" is the number of seconds since January 1st, 1970.
3838int64_t update_from_seconds (time_t total_seconds, tm *tm);
3939
40- #ifdef LIBC_TARGET_OS_IS_LINUX
41- extern char *get_env_var (const char *var_name);
42- #endif
43-
4440// TODO(michaelrj): move these functions to use ErrorOr instead of setting
4541// errno. They always accompany a specific return value so we only need the one
4642// variable.
You can’t perform that action at this time.
0 commit comments