Skip to content

Commit

Permalink
auto import //branches/master/...@140412
Browse files Browse the repository at this point in the history
  • Loading branch information
The Android Open Source Project committed Mar 19, 2009
1 parent f614d64 commit b1487e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions include/cutils/tztime.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@
#ifndef _CUTILS_TZTIME_H
#define _CUTILS_TZTIME_H

#include <time.h>

#ifdef __cplusplus
extern "C" {
#endif

time_t mktime_tz(struct tm * const tmp, char const * tz);
void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);

#ifndef HAVE_ANDROID_OS
/* the following is defined in <time.h> in Bionic */

struct strftime_locale {
const char *mon[12]; /* short names */
const char *month[12]; /* long names */
Expand All @@ -39,6 +44,8 @@ struct strftime_locale {

size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale *locale);

#endif /* !HAVE_ANDROID_OS */

#ifdef __cplusplus
}
#endif
Expand Down
13 changes: 9 additions & 4 deletions libcutils/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ commonSources := \
properties.c \
threads.c

commonHostSources := \
ashmem-host.c

# some files must not be compiled when building against Mingw
# they correspond to features not used by our host development tools
# which are also hard or even impossible to port to native Win32
Expand All @@ -60,16 +63,18 @@ else
selector.c \
fdevent.c \
tztime.c \
tzstrftime.c \
adb_networking.c \
zygote.c
zygote.c

commonHostSources += \
tzstrftime.c
endif


# Static library for host
# ========================================================
LOCAL_MODULE := libcutils
LOCAL_SRC_FILES := $(commonSources) ashmem-host.c
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources)
LOCAL_LDLIBS := -lpthread
LOCAL_STATIC_LIBRARIES := liblog
include $(BUILD_HOST_STATIC_LIBRARY)
Expand All @@ -81,7 +86,7 @@ ifeq ($(TARGET_SIMULATOR),true)
# ========================================================
include $(CLEAR_VARS)
LOCAL_MODULE := libcutils
LOCAL_SRC_FILES := $(commonSources) memory.c dlmalloc_stubs.c ashmem-host.c
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) memory.c dlmalloc_stubs.c
LOCAL_LDLIBS := -lpthread
LOCAL_SHARED_LIBRARIES := liblog
include $(BUILD_SHARED_LIBRARY)
Expand Down

0 comments on commit b1487e4

Please sign in to comment.