forked from enlightenment/efl
* src/lib/evil_stdio.c:
make vasprintf() compile on Windows CE * src/lib/evil_time.c: * src/lib/evil_time.h: add stub tzset() for Windows CE SVN revision: 57273
This commit is contained in:
parent
5677e35855
commit
04ccb0a4b4
|
@ -1,3 +1,12 @@
|
||||||
|
2011-02-23 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
|
* src/lib/evil_stdio.c:
|
||||||
|
make vasprintf() compile on Windows CE
|
||||||
|
|
||||||
|
* src/lib/evil_time.c:
|
||||||
|
* src/lib/evil_time.h:
|
||||||
|
add stub tzset() for Windows CE
|
||||||
|
|
||||||
2011-02-04 Vincent Torri <doursse at users dot sf dot net>
|
2011-02-04 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* src/lib/evil_stdio.c:
|
* src/lib/evil_stdio.c:
|
||||||
|
|
|
@ -217,6 +217,21 @@ int evil_fclose_native(FILE *stream)
|
||||||
int
|
int
|
||||||
vasprintf(char **strp, const char *fmt, va_list ap)
|
vasprintf(char **strp, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
char buf[1024];
|
||||||
|
char *res;
|
||||||
|
int len;
|
||||||
|
|
||||||
|
len = _vsnprintf(buf, 1023, fmt, ap);
|
||||||
|
if (len < 0) return -1;
|
||||||
|
|
||||||
|
res = (char *)malloc(len + 1);
|
||||||
|
if (!res) return -1;
|
||||||
|
|
||||||
|
memcpy(res, buf, len);
|
||||||
|
res[len] = '\0';
|
||||||
|
|
||||||
|
#else
|
||||||
char *res;
|
char *res;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
@ -224,10 +239,11 @@ vasprintf(char **strp, const char *fmt, va_list ap)
|
||||||
res = (char *)malloc(len);
|
res = (char *)malloc(len);
|
||||||
if (!res) return -1;
|
if (!res) return -1;
|
||||||
|
|
||||||
*strp = res;
|
|
||||||
len = vsprintf(res, fmt, ap);
|
len = vsprintf(res, fmt, ap);
|
||||||
if (len < 0) len = -1;
|
if (len < 0) len = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
*strp = res;
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,3 +30,13 @@ localtime_r(const time_t *timep, struct tm *result)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UNDER_CE
|
||||||
|
|
||||||
|
void
|
||||||
|
tzset(void)
|
||||||
|
{
|
||||||
|
/* does nothing... */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* UNDER_CE */
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* representation. The result is stored in the buffer @p result
|
* representation. The result is stored in the buffer @p result
|
||||||
* supplied by the user. If @p timep or @p result are @c NULL, or if
|
* supplied by the user. If @p timep or @p result are @c NULL, or if
|
||||||
* an error occurred, this function returns @c NULL and the values in
|
* an error occurred, this function returns @c NULL and the values in
|
||||||
* @p result might be undefined. Otherwise it returns @p result.
|
* @p result might be undefined. Otherwise it returns @p result.
|
||||||
*
|
*
|
||||||
* Conformity: Non applicable.
|
* Conformity: Non applicable.
|
||||||
*
|
*
|
||||||
|
@ -33,6 +33,21 @@
|
||||||
*/
|
*/
|
||||||
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
|
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||||
|
|
||||||
|
#ifdef UNDER_CE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Stub implementation of tzset().
|
||||||
|
*
|
||||||
|
* This function does nothing.
|
||||||
|
*
|
||||||
|
* Conformity: Non applicable.
|
||||||
|
*
|
||||||
|
* Supported OS: Windows CE.
|
||||||
|
*/
|
||||||
|
EAPI void tzset(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
Loading…
Reference in New Issue