eina: fixup.

This commit is contained in:
Cedric BAIL 2015-05-14 18:38:36 +02:00
parent 9c571f01f7
commit 0ed04f7681
2 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@
* API * * API *
*============================================================================*/ *============================================================================*/
EAPI Eina_Tmpstr * EAPI const char *
eina_environment_home_get(void) eina_environment_home_get(void)
{ {
#ifdef _WIN32 #ifdef _WIN32
@ -50,13 +50,13 @@ eina_environment_home_get(void)
if (!home) home = getenv("WINDIR"); if (!home) home = getenv("WINDIR");
if (!home) home = "C:\\"; if (!home) home = "C:\\";
return eina_tmpstr_add(home); return home;
#else #else
return eina_tmpstr_add(getenv("HOME")); return getenv("HOME");
#endif #endif
} }
EAPI Eina_Tmpstr * EAPI const char *
eina_environment_tmp_get(void) eina_environment_tmp_get(void)
{ {
char *tmp; char *tmp;
@ -68,12 +68,12 @@ eina_environment_tmp_get(void)
if (!tmp) tmp = getenv("WINDIR"); if (!tmp) tmp = getenv("WINDIR");
if (!tmp) tmp = "C:\\"; if (!tmp) tmp = "C:\\";
return eina_tmpstr_add(tmp); return tmp;
#else #else
tmp = getenv("TMPDIR"); tmp = getenv("TMPDIR");
if (!tmp) tmp = getenv("XDG_RUNTIME_DIR"); if (!tmp) tmp = getenv("XDG_RUNTIME_DIR");
if (!tmp) tmp = "/tmp"; if (!tmp) tmp = "/tmp";
return eina_tmpstr_add(tmp); return tmp;
#endif #endif
} }

View File

@ -32,7 +32,7 @@
* @note The result of this call is highly system dependent and you better use * @note The result of this call is highly system dependent and you better use
* it instead of the naive getenv("HOME"). * it instead of the naive getenv("HOME").
*/ */
EAPI Eina_Tmpstr *eina_environment_home_get(void); EAPI const char *eina_environment_home_get(void);
/** /**
* @brief Return the content of the environment refered as TMPDIR on this system. * @brief Return the content of the environment refered as TMPDIR on this system.
@ -41,6 +41,6 @@ EAPI Eina_Tmpstr *eina_environment_home_get(void);
* @note The result of this call is highly system dependent and you better use * @note The result of this call is highly system dependent and you better use
* it instead of the naive getenv("TMPDIR"). * it instead of the naive getenv("TMPDIR").
*/ */
EAPI Eina_Tmpstr *eina_environment_tmp_get(void); EAPI const char *eina_environment_tmp_get(void);
#endif #endif