Remove mktime_tz.

Bug: http://b/15765976
Change-Id: Ifc8cd19ae621e611d66173ae927ef9a0445965c1
This commit is contained in:
Elliott Hughes 2016-01-06 09:15:02 -08:00
parent 74d7aa1c34
commit 76dfa6e351
12 changed files with 0 additions and 97 deletions

View file

@ -687,7 +687,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -688,7 +688,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -581,7 +581,6 @@ LIBC {
mkstemps64;
mktemp;
mktime;
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -691,7 +691,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -673,7 +673,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -674,7 +674,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -581,7 +581,6 @@ LIBC {
mkstemps64;
mktemp;
mktime;
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -671,7 +671,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -672,7 +672,6 @@ LIBC {
mktemp;
mktime;
mktime64; # arm x86 mips
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -581,7 +581,6 @@ LIBC {
mkstemps64;
mktemp;
mktime;
mktime_tz;
mlock;
mlockall;
mmap;

View file

@ -1,41 +0,0 @@
/*
* Copyright (C) 2011 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _BIONIC_TIME_H
#define _BIONIC_TIME_H
#include <time.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
// We can't remove this (and this file) until we fix MtpUtils.cpp.
time_t mktime_tz(struct tm* const, char const*);
__END_DECLS
#endif /* _BIONIC_TIME_H */

View file

@ -2462,50 +2462,4 @@ static int __bionic_open_tzdata(const char* olson_id) {
return fd;
}
// Caches the most recent timezone (http://b/8270865).
static int __bionic_tzload_cached(const char* name, struct state* const sp, const int doextend) {
lock();
// Our single-item cache.
static char* g_cached_time_zone_name;
static struct state g_cached_time_zone;
// Do we already have this timezone cached?
if (g_cached_time_zone_name != NULL && strcmp(name, g_cached_time_zone_name) == 0) {
*sp = g_cached_time_zone;
unlock();
return 0;
}
// Can we load it?
int rc = tzload(name, sp, doextend);
if (rc == 0) {
// Update the cache.
free(g_cached_time_zone_name);
g_cached_time_zone_name = strdup(name);
g_cached_time_zone = *sp;
}
unlock();
return rc;
}
// Non-standard API: mktime(3) but with an explicit timezone parameter.
// This can't actually be hidden/removed until we fix MtpUtils.cpp
__attribute__((visibility("default"))) time_t mktime_tz(struct tm* const tmp, const char* tz) {
struct state* st = malloc(sizeof(*st));
time_t return_value;
if (st == NULL)
return 0;
if (__bionic_tzload_cached(tz, st, true) != 0) {
// TODO: not sure what's best here, but for now, we fall back to gmt.
gmtload(st);
}
return_value = time1(tmp, localsub, st, 0L);
free(st);
return return_value;
}
// END android-added