fixing LE hy11 build
define ALOGx for HY11 build, which doesn't have liblog Change-Id: I151d451997f71179e4c4bba3946d7fd52e1f345f CRs-Fixed: 2190714
This commit is contained in:
parent
bb529c50e9
commit
be207684d6
1 changed files with 20 additions and 1 deletions
|
@ -39,13 +39,32 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <cutils/log.h>
|
||||
|
||||
#ifndef LOG_TAG
|
||||
#define LOG_TAG "GPS_UTILS"
|
||||
#endif /* LOG_TAG */
|
||||
|
||||
// LE targets with no logcat support
|
||||
#define TS_PRINTF(format, x...) \
|
||||
{ \
|
||||
struct timeval tv; \
|
||||
struct timezone tz; \
|
||||
int hh, mm, ss; \
|
||||
gettimeofday(&tv, &tz); \
|
||||
hh = tv.tv_sec/3600%24; \
|
||||
mm = (tv.tv_sec%3600)/60; \
|
||||
ss = tv.tv_sec%60; \
|
||||
fprintf(stdout,"%02d:%02d:%02d.%06ld]" format "\n", hh, mm, ss, tv.tv_usec, ##x); \
|
||||
}
|
||||
|
||||
#define ALOGE(format, x...) TS_PRINTF("E/%s (%d): " format , LOG_TAG, getpid(), ##x)
|
||||
#define ALOGW(format, x...) TS_PRINTF("W/%s (%d): " format , LOG_TAG, getpid(), ##x)
|
||||
#define ALOGI(format, x...) TS_PRINTF("I/%s (%d): " format , LOG_TAG, getpid(), ##x)
|
||||
#define ALOGD(format, x...) TS_PRINTF("D/%s (%d): " format , LOG_TAG, getpid(), ##x)
|
||||
#define ALOGV(format, x...) TS_PRINTF("V/%s (%d): " format , LOG_TAG, getpid(), ##x)
|
||||
|
||||
#endif /* #if defined (USE_ANDROID_LOGGING) || defined (ANDROID) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in a new issue