mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
Fix some conditional compilation. CONFIG_LIBC_LOCALTIME should be checked in most of the same places wehre CONFIG_TIME_EXTENDED is checked
This commit is contained in:
+1
-1
Submodule Documentation updated: 9ad99e6fed...1972785856
+1
-1
Submodule arch updated: 6e383188c0...6fa995b0aa
@@ -291,7 +291,7 @@ struct rtc_time
|
|||||||
int tm_mday; /* Day of the month (1-31) */
|
int tm_mday; /* Day of the month (1-31) */
|
||||||
int tm_mon; /* Month (0-11) */
|
int tm_mon; /* Month (0-11) */
|
||||||
int tm_year; /* Years since 1900 */
|
int tm_year; /* Years since 1900 */
|
||||||
#ifdef CONFIG_LIBC_LOCALTIME
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
int tm_wday; /* Day of the week (0-6) (unused) */
|
int tm_wday; /* Day of the week (0-6) (unused) */
|
||||||
int tm_yday; /* Day of the year (0-365) (unused) */
|
int tm_yday; /* Day of the year (0-365) (unused) */
|
||||||
int tm_isdst; /* Non-0 if daylight savings time is in effect (unused) */
|
int tm_isdst; /* Non-0 if daylight savings time is in effect (unused) */
|
||||||
|
|||||||
+1
-1
@@ -205,7 +205,7 @@ FAR struct tm *localtime_r(FAR const time_t *timep, FAR struct tm *result);
|
|||||||
size_t strftime(FAR char *s, size_t max, FAR const char *format,
|
size_t strftime(FAR char *s, size_t max, FAR const char *format,
|
||||||
FAR const struct tm *tm);
|
FAR const struct tm *tm);
|
||||||
|
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
FAR char *asctime(FAR const struct tm *tp);
|
FAR char *asctime(FAR const struct tm *tp);
|
||||||
FAR char *asctime_r(FAR const struct tm *tp, FAR char *buf);
|
FAR char *asctime_r(FAR const struct tm *tp, FAR char *buf);
|
||||||
FAR char *ctime(FAR const time_t *timep);
|
FAR char *ctime(FAR const time_t *timep);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -70,4 +70,4 @@ FAR char *asctime(FAR const struct tm *tp)
|
|||||||
return asctime_r(tp, buf);
|
return asctime_r(tp, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_TIME_EXTENDED */
|
#endif /* CONFIG_LIBC_LOCALTIME || CONFIG_TIME_EXTENDED */
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -94,4 +94,4 @@ FAR char *asctime_r(FAR const struct tm *tp, FAR char *buf)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_TIME_EXTENDED */
|
#endif /* CONFIG_LIBC_LOCALTIME || CONFIG_TIME_EXTENDED */
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -79,4 +79,4 @@ FAR char *ctime(FAR const time_t *timep)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_TIME_EXTENDED */
|
#endif /* CONFIG_LIBC_LOCALTIME || CONFIG_TIME_EXTENDED */
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -80,4 +80,4 @@ FAR char *ctime_r(FAR const time_t *timep, FAR char *buf)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_TIME_EXTENDED */
|
#endif /* CONFIG_LIBC_LOCALTIME || CONFIG_TIME_EXTENDED */
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ size_t strftime(FAR char *s, size_t max, FAR const char *format,
|
|||||||
|
|
||||||
switch (*format++)
|
switch (*format++)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_TIME_EXTENDED
|
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
|
||||||
/* %a: A three-letter abbreviation for the day of the week. */
|
/* %a: A three-letter abbreviation for the day of the week. */
|
||||||
|
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|||||||
Reference in New Issue
Block a user