Merge branch 'hotfixes-1.0.1' into develop

This commit is contained in:
Jinhao
2015-05-04 03:22:55 +08:00
5 changed files with 74 additions and 33 deletions

View File

@@ -41,6 +41,7 @@ namespace nana
int day_of_week() const;
const value & read() const;
void set(const std::tm&);
static int day_of_week(int year, int month, int day);
static unsigned year_days(unsigned year); ///< the number of days in the specified year.
@@ -67,6 +68,7 @@ namespace nana
time(const std::tm&);
time(unsigned hour, unsigned minute, unsigned second);
const value& read() const;
void set(const std::tm&);
private:
value value_;
};//end class time

View File

@@ -93,6 +93,20 @@ namespace nana
{
std::size_t strlen(const char_t* str);
char_t* strcpy(char_t* dest, const char_t* source);
#ifdef _MSC_VER
template <size_t N>
inline char* strcpy(char (&dest)[N], const char* source)
{
::strncpy_s(dest, source, _TRUNCATE);
return dest;
}
template <size_t N>
inline wchar_t* strcpy(wchar_t (&dest)[N], const wchar_t* source)
{
::wcsncpy_s(dest, source, _TRUNCATE);
return dest;
}
#endif // #ifdef _MSC_VER
}
#if defined(NANA_WINDOWS)